|
-
Jul 11th, 2000, 06:32 AM
#1
Thread Starter
New Member
Hi!
I have a big proplem. I have a TV guide program which take's it's data from my frends server. Ok that works fine, but the proplem is that i would like to present the info on mdichild forms. Thats still ok, but the proplem is that I would like to have a index for these forms so I could have one form as a base form and make more forms like that to present different channels on the fly. Is there a way to do that? I know how that you can use the load command for images so there must be a way to do this too.
Thanks in advance,
Worf
-
Jul 11th, 2000, 07:08 AM
#2
_______
<?>
you could try something like giving a generic name to the form such as TvForm and then as you add forms you would name them TvForm1, TvForm2, etc
then you could call them in a loop
for i = 1 to forms count
load TvForm & i
show TvForm & i
next
or out of a loop
load TvForm & yourVariableNumber
Maybe?
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 11th, 2000, 08:32 AM
#3
Thread Starter
New Member
No, sorry.
The big proplem is that I have to make all the forms by hand and so they take a lot of space in the exe file when insted of this I could just tell vb to make a dublicat of the orginal. To do what you just told me you have to do this:
Private Sub Command1_Click()
openfrm 1
End Sub
Private Sub openfrm(frm As Integer)
Select Case frm
Case 1
frmtv1.Show
Case 2
frmtv2.Show
.
.
.
End Select
End Sub
So does any one know how to open a new form with code.
-
Jul 11th, 2000, 08:39 AM
#4
Example is more accurate then I can explain it.
Try This:
Code:
Private Sub Command1_Click()
Dim frmNewTVGuid As Form
Set frmNewTVGuid = New Form2 'Add new Form
frmNewTVGuid.Caption = Forms.Count 'Show Form Count for test
frmNewTVGuid.Show 'Show the new form
End Sub
Hope it helps
-
Jul 11th, 2000, 08:55 AM
#5
Thread Starter
New Member
Thanks alot I got it working.
I just but the baseform in the place of form2.
Thanks you very much I got my project up and
running again!
Worf
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
|