PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Loading Dynamic Forms

Reply

Loading Dynamic Forms

 
Thread Tools Rate Thread
Old 08-07-2003, 12:06 PM   #1
Zahid
Guest
 
Posts: n/a
Default Loading Dynamic Forms


Hi,

Ive written a custom button using graphics and I override
the button_Click event in my button. The trouble is, most
of my buttons will display an alert but there will be a
few (only known at runtime - dynamic) that will load
another form if clicked. How could I code for this? Also,
the name of the forms that are loaded by the button is
NOT known in advance.

What i was thinking is:

1. have a field in the custom button (Dim IsLink As
Boolean)that is set to true if the button loads another
page.
2. Have another field that holds the value of the field
it will load up as this can be obtained when button is
created (Dim FormToLoad As String).
3. In the button_Click event check to see if IsLink is
true, if it is then load up FormToLoad.

My question is: How do i write the statement to load up
FormToLoad?

Will it work if I write:
FormToLoad.ShowDialog
or
FormToLoad.Visible = true?

I dont think this will work so i need an alternative
please.

Thanks in advance.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off