Re: MS VB Newbie Tutorial



Any idea what the equivalent way to do it is in v2003?

Cor Ligthert [MVP] wrote:
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: OOP object instance assignment in sub new()
    ... Cor Ligthert [MVP] wrote: ... the shared keyword for methods doesn't really have anything to do with sharing the method between users. ... If you aren't familiar with the concept, a factory method is used to get an instance of a class instead of directly using the constructor. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: refresh from DataGridView to bound DataSet
    ... Cor Ligthert [MVP] wrote: ... but mostly are the grid events not the most proper place ... The datagridview has not data part, it shows the data from the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: refresh from DataGridView to bound DataSet
    ... Cor Ligthert [MVP] wrote: ... The datagridview has not data part, it shows the data from the ... bound DataSet so that it stays in sync with the DataGridView. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Difference between file version and assembly versions
    ... to check the version numbers on the client machine, ... Cor Ligthert [MVP] wrote: ... There is an Assembly file which contains as file File Info and in it Assembly info. ...
    (microsoft.public.dotnet.general)
  • Re: MS VB Newbie Tutorial
    ... Is there something different in this old version that must be causing ... Cor Ligthert [MVP] wrote: ... How do I declare 'My'? ...
    (microsoft.public.dotnet.languages.vb)