On Aug 17, 2006, at 7:27 AM, Steven Hedgepeth wrote:
How does RB compare to VB in terms of displaying a form? In VB
there is Load and Show, as well as Unload and Hide. Is Open
equivalent to Load and is Close equivalent to Unload in RB? If
they are equivalent, why doesn't "window.open" work?
The first major difference is that they're called "windows" in
REALbasic and not "forms". :)
I'm not sure what Load does in VB (so I can't offer much help there),
but there are a few ways to open a window in RB.
First, you can simply say something like this:
MyNiftyWindow.Show
This will automatically show an instance of MyNiftyWindow. This is
called implicit instantiation. And actually, I don't really recommend
it.
Another way is to say something like this:
Dim W As MyNiftyWindow
W=New MyNiftyWindow
W.Show
This gives you more control and also allows you to keep better track
of your currently open windows.
Note that calling Show on a window will trigger its Open event, where
you can have some code that needs to run when the window is
displayed. Since Open is an event and not a method, you can't call it
directly; the only way to trigger it is to Show a new instance of the
window.
Close is a method of the window, so you can call Window.Close at any
time.
Hope this helps!!
--
Brad Rhine
[EMAIL PROTECTED]
http://bradrhine.com
_______________________________________________
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>