Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I Miss VB6! 2

Status
Not open for further replies.

RoguePoet01

Programmer
Oct 1, 2003
302
0
0
US
It seems like every time a package gets "upgraded" that they leave out some of the most basic, and helpful, features.

Take for instance, initializing a form.

In VB6 I could set calendar dates, set default directories, and set combo boxes and textboxes with the Form1_Load event.

Even more importantly, in order to use the event, there was a drop-down box over the edit window that let me pick from the load event or the keypress or the resize event, etc.

Why did they get rid of that feature in VB.net?

If anybody knows of a similar feature to that VB6 dropdown menu that exists in VB.net, please let me know.
 
RoguePoet01 -

If you notice the two drop down boxes in your .net IDE that sit directly above the code you're typing, you'll see your "dropdown salvation."

The box on the left lists all the controls (textboxes, forms, checkboxes, etc.) that are created on the form that's in focus. If you choose the control for which you wish to see possible events in the left drop down list, and then click on the right-hand drop down list, you will see what you have sorely been missing.

Also, I think the form_load functionality still exists in .NET - I know there's an event called Page_Load in ASP.NET that does this; surely a similar thing exists in winForms. Perhaps you could use the method above to figure it out :)

Hope this helps.

CHIX001
 
Look in the left hand drop down list, look for (formName Events), NOTE that it is in (), choose that, then you will find Load, and many others on the right hand side. Also, if you double click the form in design mode, it will place the form_Load event procedure on the code page.

The cool thing about the form load event in VB.net is you can name it any thing you like as long as it has the Handles MyBase.Load at the end. this allows you to create a standard form load event procedure that you can copy and paste on severl forms.

Becca

Somtimes, the easy answer is the hardest to find. :)
 
"Dropdown salvation"

That's got a nice ring to it. Maybe the name of a band?

Becca, thanks for that insight about the form_load event - that will come in handy since I do have some standard razmataz that I like to do with all my forms.

As usual, as soon as I asked the question here, I went back to the VS.net SDK and found it on my own.

What was throwing me off was it wasn't defaulted the same way VB6 was.

But I appreciate the help from both of you.
 
My pleasure.

Becca

Somtimes, the easy answer is the hardest to find. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top