On Aug 17, 2006, at 10:55 AM, Brad Rhine wrote:
I'm not sure what Load does in VB

REALbasic automatically loads and unloads windows when you show and close them.

This is not automatic is Visual Basic.  Here are some equivalents:

(VB) Form1.Load -> (RB) New Window1 where Window1.Visible = False in the IDE
(VB) Form1.Show  ->  (RB) Window1.Show
(VB) Form1.Hide -> (RB) Window1.Hide (only if the window was already showing)
(VB) Unload Form1  ->  (RB) Window1.Close

Also, same as in VB, using any code or accessing any properties or anything inside an unloaded window will cause it to load. Different from VB, your window will show if it's visible property is set to true in the IDE; it won't if it was set to false.

Also, different from VB 6, but similar to VB.Net is how you make new windows. There are two ways to make a new window in RB.

Window1.Show

And poof. Your Window1 has been shown. Repeating the above code will show the same window again and again, bringing it to the front each time. This method is quick and easy if you are absolutely positive that you will never need more than one instance of the window. If you could want more instances of the window, use this instead:

Dim w As Window1
w = New Window1
Window1.Show

( if you wish, the first and second lines can be condensed to...  )

Dim w As New Window1
Window1.Show

Repeating the above code will make a new window each time, and the Show command brings it to the front.


HTH
Andrew Keller

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to