|
-
Aug 26th, 2005, 10:52 PM
#1
Thread Starter
Junior Member
Recalling duplicate windows
Hey guys - I'm way out of practice here and I just wanted to make a quick little app, but totally forgot how to recall a duplicate window.
Can somebody give me a head start or a hint on how I go about making an array of forms and bringing up a specific one out of the array when I need? I wish the forms had indexes!
Thanks a bunch!
-
Aug 26th, 2005, 11:10 PM
#2
Re: Recalling duplicate windows
What do you mean by duplicate windows?
-
Aug 26th, 2005, 11:16 PM
#3
Re: Recalling duplicate windows
Here's one way:
VB Code:
Option Explicit
Private Sub Form_Load()
Dim frm() As Form
Dim x As Integer
For x = 0 To 3
ReDim Preserve frm(x)
Set frm(x) = New Form2
frm(x).Left = Form1.Left + (x * 20)
frm(x).Show
Next x
End Sub
-
Aug 27th, 2005, 12:06 AM
#4
Re: Recalling duplicate windows
Forms(index).Show
I think indices work with that collection.
-
Aug 27th, 2005, 12:50 AM
#5
Thread Starter
Junior Member
Re: Recalling duplicate windows
Thank you for the help...
Heres one issue:
Now that I have the forms created... If one closes, x changes. Example : If I have form1 in an array and I have frm1(1) frm(2) frm(3) frm(4), and I close frm(2), frm(1) remains the same and frm(3) becomes frm(2) and frm(4) becomes frm(3) etc.
Is there a way to keep the index from changing?
It makes it very difficult to recall a window if it's index isn't constant.
Thanks!
-
Aug 27th, 2005, 12:58 AM
#6
Re: Recalling duplicate windows
You could use the form().tag property to keep track of which is which.
Or else, you could use the form().caption if it is different.
-
Aug 27th, 2005, 02:14 AM
#7
Thread Starter
Junior Member
Re: Recalling duplicate windows
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
|