Throw this code in a MDI form and see if it helps out at all. Private Sub MDIParent1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ChildForm1 As New System.Windows.Forms.Form Dim btnButton1 As New Button Dim ChildForm2 As New System.Windows.Forms.Form Dim btnButton2 As New Button ChildForm1.Text = "Form1" ChildForm2.Text = "Form2" btnButton1.Text = "I Control 2" btnButton2.Text = "I Control 1" ChildForm1.MdiParent = Me ChildForm1.Controls.Add(btnButton1) ChildForm1.Show() ChildForm1.Name = "Form1" ChildForm2.MdiParent = Me ChildForm2.Controls.Add(btnButton2) ChildForm2.Show() ChildForm2.Name = "Form2" AddHandler btnButton1.Click, AddressOf button_click AddHandler btnButton2.Click, AddressOf button_click End Sub Sub button_click(ByVal sender As Object, ByVal e As EventArgs) For Each frm As Form In Me.MdiChildren If frm.Name <> sender.parent.Name Then If frm.Visible Then frm.Hide() Else frm.Show() End If End If Next End Sub
jwakeman
Posts
-
Open/Close Forms VB.Net -
Open/Close Forms VB.NetI agree that the me.hide seems strange but I think it is even more important that they are not saying frmChaindata.show() in the if part of the if/else statement! -- modified at 9:02 Friday 12th May, 2006
-
Open/Close Forms VB.NetI noticed that you do not show the form in the if part of your if/else. You only bring to front and focus and the form is not shown....weird -- modified at 18:02 Thursday 11th May, 2006
-
Open/Close Forms VB.Netwhy me.hide()?
-
Decimal Places in a DoubleI think this is what you want. It does not actually reduce the number of decimal places the variable is holding but allows for a reasonable number to be displayed. Create a windows form. add a textbox. use this as the load code.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dbl As Double dbl = 10 / 3 Me.TextBox1.Text = Format(dbl, "##.##") End Sub
-
Equation Editor Interface/Nested Text Boxes?Hello, I have become interested in trying to create a form/control which emulates the behavior of the MS Word Equation Editor(EE). When you are using the MS Word EE it feels like you are working with textboxes inside of textboxes. I am refering especially to the ratio feature. What really gets me is that these textboxes behave like text. You can highlight, copy, cut, paste, etc. Can anyone provide some insight into how this is accomplished? I have written some fairly unimpressive code which lines up textboxes beside and above eachother and autosizes the textboxes to fit their contents but that as far as I got. I would be glad to share my code if anyone is interested. -- modified at 11:36 Saturday 13th May, 2006