|
-
Dec 17th, 2003, 05:21 AM
#1
Thread Starter
New Member
close mdi child
Hi!
I have a container,in this container i have a button,when i click in the button a new form is open(mdichild).What i have to do to every time i click the button,when a new form is open the other is closed?
The code:
sub button_click()
If (tipo = 1) Then
Dim tipoTexto As New Texto()
tipoTexto.MdiParent = Me
tipoTexto.Show()
end if
If (tipo = 2) Then
Dim tipoImagem As New Imagem()
tipoImagem.MdiParent = Me
tipoImagem.Show()
end if
end sub
When the form "tipoImagem" open i want that the form "TipoTexto" is closed.
tanks!
-
Dec 17th, 2003, 05:46 AM
#2
maybe something like this...
VB Code:
Sub button_Click()
If tipo = 1 Then
Dim tipoTexto As New Texto()
tipoTexto.MdiParent = Me
tipoTexto.Show()
ElseIf tipo = 2 Then
Dim tipoImagem As New Imagem()
tipoImagem.MdiParent = Me
tipoImagem.Show()
If Not tipoTexto Is Nothing Then '/// make sure tipoTexto isn't Nothing.
tipoTexto.Close()
End If
End If
End Sub
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
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
|