|
-
Jun 28th, 2009, 05:00 PM
#1
Thread Starter
New Member
Stupid Questions, I Know... But I'm Stumped
1) I've only been using VB.NET for a few days, doing a simple application for a friend. One thing has me stumped. I need to do some intialization *before* my form is first displayed. The obvious thing seemed to be to add a New method, and do it there. Trouble is, the New method NEVER get called! I've resorted to using one of the display event handlers to invoke an initialization method and set the flag indicating it's been done. In other words, a kludge. So why does my New method never get invoked? What SHOULD I be doing??
2) To handle the resize events, I have a resize event handler to recalculate the sizes and positions of the controls. To do this, I need to know the design-time sizes. So, one of the things the initialization routine above does is save off enough information about the control sizes and positions to enable me to do this. There HAS to be a better way.... What is it?
3) Is it just me, or is it truly brain-dead that doing the following:
Dim X As Integer = 3
Dim Y As Integer = X / 2
sets Y to 2! I've never seen a language that treated integers in that way. Division should truncate, not round!
Thanks!
Regards,
Ray L.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|