At 12:45 AM +0100 8/20/06, Richard Hillsdon wrote:
In theory this is easy. My code can create the name of the next required form easily, such as "Window105". But how on earth can I now load Window105 using a String as my reference? It's such a simple requirement, but I cannot find a simple way to do it. In Visual Basic (and I know this isn't the same language but just to show what I need), I would simply have said forms(myNextForm) or forms("Window105"). How can I do this in RB?

You could use either a dictionary to map from a string or number to a specific window instance. Or you could also use an array to get a window from an integer. But the downside is that you would have to initially load the dictionary or array with all of your windows, which could be very resource intensive with 150 windows.

The other approach would be to use a Select Case statement to run code to create each window based on the value of you window name string.

Regards,
Joe Huber
_______________________________________________
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