Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShowMDIChield Routine
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00811297
Message ID:
00811305
Views:
14
Hi Bruno,

Here is some sample code:
Dim frm As Form
For Each frm In Me.MdiChildren
    If TypeOf frm Is Form1 Then
        MessageBox.Show("Child of type Form1 exists.")
        Exit For
    End If
Next frm
>I'm updating a vb6 routine for vb.net that show chield forms. The routine check first if the form is in use, if the form aren't in use then create a instance and show it.
>Anyone call tell me what to write this example in vb.net?
>
>Thanks,
>
>
>The code in vb6 :
>
>Sub ShowChield(frmWindow as Form)
> Dim intForm as Integer, bolExist as Booleam
>
> For intForm = 1 to Forms.Count -1
> If Forms(intForm).Name = frmWindow.Name Then
> If Forms(intForm).WindowState = 1 Then Forms(intForm).WindowState = 0
> Forms(intForm).SetFocus
> bolExist = True
> Exit For
> Else
> bolExiste = False
> End If
> Next
>
> If bolExiste = False Then frmWindow.Show
>
>End Sub
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform