Re: MS VB Newbie Tutorial



Hi Cor,

Thanks for your response.

I am using VB .NET 2003.

Is there something different in this old version that must be causing
the problem?

Yes the "My" namespace is something new in VB 2005, AFAIK made with the
classic VB developpers in mind who had trouble with some of the OOP methods.

However there are some very handy things in it as by instance getting config
settings etc.

Cor

Peter.

Cor Ligthert [MVP] wrote:
Peter,

Are you using VBNet 2005?

This is new for that

Cor

"Peter" <petethegaijin@xxxxxxxxx> schreef in bericht
news:1155095155.811338.119290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,

I am trying to complete the tutorial on:
http://msdn.microsoft.com/vbasic/learning/newtodevelopment/choose/

I am up to this step:
# In the Form1_Load event handler, type the following code.

If My.Computer.Clock.LocalTime.DayOfWeek = DayOfWeek.Saturday Or _
My.Computer.Clock.LocalTime.DayOfWeek = DayOfWeek.Sunday Then
MsgBox("Happy Weekend!")
End If

# Press F5 to run your program.

However when I press F5, I get 2 build errors saying:
"Name 'My' is not declared."

How do I declare 'My'?

Can someone help me complete this tutorial?

Many thanks,

Peter.




.



Relevant Pages

  • Re: Getting rid of "declare -x" statements at Terminal login
    ... to get a functioning Meta key for Emacs, ... now causing me to get lots of "declare -x" variable statements every ...
    (comp.sys.mac.system)
  • Re: The 2009 Libertarian Futurist Society Hall of Fame Finalists
    ... that you can read Springsteen's mind, and that the truth of what ... he was thinking and doing is what you declare it to be. ... would expect and he has since publicly reacted with surprise. ...
    (rec.arts.sf.written)
  • Re: Web Hosting Disaster
    ... the front entrance, endangering many and causing $10,000s of dollars ... in damage. ... I would declare to them that they were violating my ...
    (misc.transport.road)
  • Re: The wicked untruths of our church leaders
    ... to declare that anyone is a human being. ... What imho would be especially unscientific would be to draw lines without ... sufficient evidence to theorise that there are lines in the first place. ... I don't think an opinion that leads you to claim you know my mind ...
    (uk.religion.christian)
  • Re: Property... why?
    ... >>>>if you want to access and modify your field, declare it as public is ... > that will be clear for the creator of the class and other developpers that ... >> It enables a class to encapsulate data which it has sole ...
    (microsoft.public.dotnet.languages.vb)