DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 12 of 12

Thread: Figuring Things Out

  1. #1
    Jonathan Wood Guest

    Figuring Things Out

    Just curious how most other people are doing figuring out VB.NET. I don't
    even recall a learning curve to VB but I seem to be having a lot of trouble
    even doing simple stuff in VB.NET.

    For example, I created a UserControl and added a paint event. It took me a
    while to figure out how to even draw a simple line. I came up with the
    following:
    Public Sub UserControl1_Paint(ByVal sender As Object, ByVal e As
    System.WinForms.PaintEventArgs) Handles UserControl1.Paint
    Dim p As New Pen(system.Drawing.Color.Blue)
    e.Graphics.DrawLine(p, 0, 0, 50, 50)
    End Sub

    Then I found out this wasn't even being called. I found an OnPaint event and
    that does get called but then what is the UserControl1_Paint event for?

    Finding stuff in the help when you don't already know the class you want
    help on is next to impossible. Is anyone else having these sort of problems
    or is it just me?

    --
    Jonathan Wood
    SoftCircuits Programming
    http://www.softcircuits.com



  2. #2
    Michael \(michka\) Kaplan Guest

    Re: Figuring Things Out

    Its everyone, Jonathan.... we are stumbling around in the dark, cursing
    whatever CLR compatibility rule seemed to make sure that all of the new
    flashlights are not compatible with the old batteries (the new ones are
    apparently not available in beta1 and only some will be available before
    ship).

    --
    MichKa

    a new book on internationalization in VB at
    http://www.i18nWithVB.com/

    "Jonathan Wood" <jwood@softcircuits.com> wrote in message
    news:3a293737@news.devx.com...
    > Just curious how most other people are doing figuring out VB.NET. I don't
    > even recall a learning curve to VB but I seem to be having a lot of

    trouble
    > even doing simple stuff in VB.NET.
    >
    > For example, I created a UserControl and added a paint event. It took me a
    > while to figure out how to even draw a simple line. I came up with the
    > following:
    > Public Sub UserControl1_Paint(ByVal sender As Object, ByVal e As
    > System.WinForms.PaintEventArgs) Handles UserControl1.Paint
    > Dim p As New Pen(system.Drawing.Color.Blue)
    > e.Graphics.DrawLine(p, 0, 0, 50, 50)
    > End Sub
    >
    > Then I found out this wasn't even being called. I found an OnPaint event

    and
    > that does get called but then what is the UserControl1_Paint event for?
    >
    > Finding stuff in the help when you don't already know the class you want
    > help on is next to impossible. Is anyone else having these sort of

    problems
    > or is it just me?
    >
    > --
    > Jonathan Wood
    > SoftCircuits Programming
    > http://www.softcircuits.com
    >
    >




  3. #3
    Mark Boulter Guest

    Re: Figuring Things Out

    Jonathan did you look at the Quick Starts? Did they help? If they didn't
    what could
    we do to make them better?

    I don't understand why your paint event below was not being invoked. I'll
    investigate
    It look like a bug.

    For the events on Form and UserControl there are 2 ways to handle them
    either
    the "VB way" by adding an appropriate event handler as you did with
    UserControl
    or the inheritance way by overriding the "Onxxxx" protected method.

    We expected advanced users writing custom controls to use the Onxxx methods
    and users
    putting user controls together using existing controls to use the events.
    Thats why there are both.

    If you look in the Win Forms Quick Start at the sections on Graphics and
    GDI+ it
    gives an overview of most of the common drawing operations:

    http://www.gotdotnet.com/quickstart/...msGDIPlus.aspx

    mark


    "Jonathan Wood" <jwood@softcircuits.com> wrote in message
    news:3a293737@news.devx.com...
    > Just curious how most other people are doing figuring out VB.NET. I don't
    > even recall a learning curve to VB but I seem to be having a lot of

    trouble
    > even doing simple stuff in VB.NET.
    >
    > For example, I created a UserControl and added a paint event. It took me a
    > while to figure out how to even draw a simple line. I came up with the
    > following:
    > Public Sub UserControl1_Paint(ByVal sender As Object, ByVal e As
    > System.WinForms.PaintEventArgs) Handles UserControl1.Paint
    > Dim p As New Pen(system.Drawing.Color.Blue)
    > e.Graphics.DrawLine(p, 0, 0, 50, 50)
    > End Sub
    >
    > Then I found out this wasn't even being called. I found an OnPaint event

    and
    > that does get called but then what is the UserControl1_Paint event for?
    >
    > Finding stuff in the help when you don't already know the class you want
    > help on is next to impossible. Is anyone else having these sort of

    problems
    > or is it just me?
    >
    > --
    > Jonathan Wood
    > SoftCircuits Programming
    > http://www.softcircuits.com
    >
    >




  4. #4
    Jonathan Wood Guest

    Re: Figuring Things Out

    Michael,

    > Its everyone, Jonathan.... we are stumbling around in the dark, cursing
    > whatever CLR compatibility rule seemed to make sure that all of the new
    > flashlights are not compatible with the old batteries (the new ones are
    > apparently not available in beta1 and only some will be available before
    > ship).


    I could sure use some sort of "Getting Started" guide.

    Oh well, glad to hear I'm not the only one.

    --
    Jonathan Wood
    SoftCircuits Programming
    http://www.softcircuits.com



  5. #5
    Jonathan Wood Guest

    Re: Figuring Things Out

    Mark,

    > Jonathan did you look at the Quick Starts? Did they help? If they didn't
    > what could
    > we do to make them better?


    To be perfectly honest, I hadn't been able to find them. Thanks for the
    link. I'll take a look!

    > I don't understand why your paint event below was not being invoked. I'll
    > investigate
    > It look like a bug.


    Thanks. I saw the note on including Handles UserControl1.Paint but that was
    included automatically. Seems like it would work.

    > For the events on Form and UserControl there are 2 ways to handle them
    > either
    > the "VB way" by adding an appropriate event handler as you did with
    > UserControl
    > or the inheritance way by overriding the "Onxxxx" protected method.
    >
    > We expected advanced users writing custom controls to use the Onxxx

    methods
    > and users
    > putting user controls together using existing controls to use the events.
    > Thats why there are both.


    Okay. Cool. I guess the Onxxxx method gives you the choice of doing things
    before, after, or instead of default processing.

    --
    Jonathan Wood
    SoftCircuits Programming
    http://www.softcircuits.com



  6. #6
    Mark Boulter Guest

    Re: Figuring Things Out

    You might also want to look at the Windows Forms overview docs in the SDK -
    you can find these online at:

    http://msdn.microsoft.com/library/do...windowsformsap
    plications.htm

    "Jonathan Wood" <jwood@softcircuits.com> wrote in message
    news:3a295b73@news.devx.com...
    > Mark,
    >
    > > Jonathan did you look at the Quick Starts? Did they help? If they didn't
    > > what could
    > > we do to make them better?

    >
    > To be perfectly honest, I hadn't been able to find them. Thanks for the
    > link. I'll take a look!
    >
    > > I don't understand why your paint event below was not being invoked.

    I'll
    > > investigate
    > > It look like a bug.

    >
    > Thanks. I saw the note on including Handles UserControl1.Paint but that

    was
    > included automatically. Seems like it would work.
    >
    > > For the events on Form and UserControl there are 2 ways to handle them
    > > either
    > > the "VB way" by adding an appropriate event handler as you did with
    > > UserControl
    > > or the inheritance way by overriding the "Onxxxx" protected method.
    > >
    > > We expected advanced users writing custom controls to use the Onxxx

    > methods
    > > and users
    > > putting user controls together using existing controls to use the

    events.
    > > Thats why there are both.

    >
    > Okay. Cool. I guess the Onxxxx method gives you the choice of doing things
    > before, after, or instead of default processing.
    >
    > --
    > Jonathan Wood
    > SoftCircuits Programming
    > http://www.softcircuits.com
    >
    >




  7. #7
    Rob Teixeira Guest

    Re: Figuring Things Out


    The best formula I have so far is:
    When in doubt, think like Java. (sadly)

    It helped a lot to go over the SDK documentation (which is now also online
    at msdn.microsoft.com). It's a lot to cover, but reading it thoroughly helped
    quite a bit.

    You're not in Kansas anymore!!

    -Rob


    "Jonathan Wood" <jwood@softcircuits.com> wrote:
    >Just curious how most other people are doing figuring out VB.NET. I don't
    >even recall a learning curve to VB but I seem to be having a lot of trouble
    >even doing simple stuff in VB.NET.
    >
    >For example, I created a UserControl and added a paint event. It took me

    a
    >while to figure out how to even draw a simple line. I came up with the
    >following:
    >Public Sub UserControl1_Paint(ByVal sender As Object, ByVal e As
    >System.WinForms.PaintEventArgs) Handles UserControl1.Paint
    > Dim p As New Pen(system.Drawing.Color.Blue)
    > e.Graphics.DrawLine(p, 0, 0, 50, 50)
    >End Sub
    >
    >Then I found out this wasn't even being called. I found an OnPaint event

    and
    >that does get called but then what is the UserControl1_Paint event for?
    >
    >Finding stuff in the help when you don't already know the class you want
    >help on is next to impossible. Is anyone else having these sort of problems
    >or is it just me?
    >
    >--
    >Jonathan Wood
    >SoftCircuits Programming
    >http://www.softcircuits.com
    >
    >



  8. #8
    Jonathan Wood Guest

    Re: Figuring Things Out

    Rob,

    > The best formula I have so far is:
    > When in doubt, think like Java. (sadly)


    Even sadder if you haven't used Java.

    > It helped a lot to go over the SDK documentation (which is now also online
    > at msdn.microsoft.com). It's a lot to cover, but reading it thoroughly

    helped
    > quite a bit.


    I found the help to be of limited use because it was most helpful when you
    already knew which specific class or technique you wanted help about.
    Anyway, some of Mark's posts guided me to some getting started materials
    (although many of them were incomplete and/or contain errors).

    > You're not in Kansas anymore!!


    Quite right!

    --
    Jonathan Wood
    SoftCircuits Programming
    http://www.softcircuits.com



  9. #9
    Todd B - Agendum Software Guest

    Re: Figuring Things Out

    Mark,

    This is my opinion only and does not reflect anyone else's point of view.

    Before you get too involved helping everyone, I just want to pass along a
    Kudos' to you and the MS team. Although VB.Net is quite different than what
    we are all used to, although there is a learning curve and although many
    products and projects will need re-coding in areas, I think VB.Net is a
    major leap forward and will open a whole lot of doors in the future once
    everyone gets acclimated to it.

    The interface design is very nice and the new features and languages
    capabilities are exciting. It is a big change to be sure. There has been
    and will be some dismay over some of the changes and problems, but overall I
    think the new VB.net is elegant, powerful and in the future will give all of
    us much more capability than we can right now imagine.

    VB6 will need to be viable and supported for quite a time to come and like
    many others, we pray Microsoft does recognize this. Many businesses and
    developers rely on VB6 and will continue to do so for quite a while. But
    I do think VB.net is an exciting move toward the future and as people start
    to see what it has to offer and as they learn how to take advantage of the
    new design, VB.net will allow all of us to have much more capability and
    power than we have had available to this point.

    I just wanted to pass that along before I started 'hitting you up' with my
    'issues'. ;-)

    --
    Sincerely,

    Todd B - CEO - Agendum Software
    http://www.AgendumSoftware.com | Mailto:ToddB@AgendumSoftware.com
    (608) 837-6736 Voice (419) 821-9599 Fax

    ** New Version of AgWindowWatch, AgOnlineUpdate and AgFastform released!
    Visit our website for more information!


    "Mark Boulter" <markbou@microsoft.com> wrote in message
    news:3a294e09$1@news.devx.com...
    > Jonathan did you look at the Quick Starts? Did they help? If they didn't
    > what could
    > we do to make them better?
    >
    > I don't understand why your paint event below was not being invoked. I'll
    > investigate
    > It look like a bug.
    >
    > For the events on Form and UserControl there are 2 ways to handle them
    > either
    > the "VB way" by adding an appropriate event handler as you did with
    > UserControl
    > or the inheritance way by overriding the "Onxxxx" protected method.
    >
    > We expected advanced users writing custom controls to use the Onxxx

    methods
    > and users
    > putting user controls together using existing controls to use the events.
    > Thats why there are both.
    >
    > If you look in the Win Forms Quick Start at the sections on Graphics and
    > GDI+ it
    > gives an overview of most of the common drawing operations:
    >
    > http://www.gotdotnet.com/quickstart/...msGDIPlus.aspx
    >
    > mark
    >
    >
    > "Jonathan Wood" <jwood@softcircuits.com> wrote in message
    > news:3a293737@news.devx.com...
    > > Just curious how most other people are doing figuring out VB.NET. I

    don't
    > > even recall a learning curve to VB but I seem to be having a lot of

    > trouble
    > > even doing simple stuff in VB.NET.
    > >
    > > For example, I created a UserControl and added a paint event. It took me

    a
    > > while to figure out how to even draw a simple line. I came up with the
    > > following:
    > > Public Sub UserControl1_Paint(ByVal sender As Object, ByVal e As
    > > System.WinForms.PaintEventArgs) Handles UserControl1.Paint
    > > Dim p As New Pen(system.Drawing.Color.Blue)
    > > e.Graphics.DrawLine(p, 0, 0, 50, 50)
    > > End Sub
    > >
    > > Then I found out this wasn't even being called. I found an OnPaint event

    > and
    > > that does get called but then what is the UserControl1_Paint event for?
    > >
    > > Finding stuff in the help when you don't already know the class you want
    > > help on is next to impossible. Is anyone else having these sort of

    > problems
    > > or is it just me?
    > >
    > > --
    > > Jonathan Wood
    > > SoftCircuits Programming
    > > http://www.softcircuits.com
    > >
    > >

    >
    >




  10. #10
    Richard Curzon Guest

    Re: Figuring Things Out

    People with only VB in their programming backgrounds are going to get
    suckered by CLR all right, but I'd thought it's no harder than the Borland
    class library, Smalltalk class library, MFC etc.

    Do you guys think it's harder to suss out than those comparable examples?

    I guess one big factor is, you often really learn those libraries by
    following examples, and there isn't that much example yet.

    regards
    Richard.



  11. #11
    Sjoerd Verweij Guest

    Re: Figuring Things Out

    Mark,

    > Jonathan did you look at the Quick Starts? Did they help? If they didn't
    > what could we do to make them better?


    The QSs are wonderful. I think a lot of the people around here have more
    trouble learning VB.Net than VBn because there is so much to unlearn.

    Personally, I could really use a "things that will not work anymore and
    here's how to do them" rundown, instead of just how-to's. For example, I
    still haven't figured out where App.PrevInstance went (although I haven't
    looked all that hard in the past few days)...

    Sjoerd




  12. #12
    The NiteFrog.- Guest

    Re: Figuring Things Out

    Yeah, but with the Borland products they have extensive help files,
    unlike MS.

    Kev.-


    On Sun, 3 Dec 2000 19:48:48 -0800, "Richard Curzon" <ssi@interlog.com>
    wrote:

    >People with only VB in their programming backgrounds are going to get
    >suckered by CLR all right, but I'd thought it's no harder than the Borland
    >class library, Smalltalk class library, MFC etc.
    >
    >Do you guys think it's harder to suss out than those comparable examples?
    >
    >I guess one big factor is, you often really learn those libraries by
    >following examples, and there isn't that much example yet.
    >
    >regards
    >Richard.
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center