Thanks ya ...
Code:If Not IsNothing(frmadd) Then If Not frmadd.IsDisposed Then frmadd.BringToFront() Else frmadd = New frmAdd frmadd.lblForm.Text = "Add New Machine Type" frmadd.lvlItem.Columns.Add("Machine Type", frmadd.lvlItem.Width - 10, HorizontalAlignment.Left) frmadd.ShowDialog() frmadd.BringToFront() End If Else frmadd = New frmAdd frmadd.lblForm.Text = "Add New Machine Type" frmadd.lvlItem.Columns.Add("Machine Type", frmadd.lvlItem.Width - 10, HorizontalAlignment.Left) frmadd.ShowDialog() frmadd.BringToFront() End If frmadd.MdiParent = Me.MdiParent frmadd.Dock = DockStyle.Top
The area i mark with circle show that when i open a new Childform.by using .showdialog() it is the way i want, the problem is it will open up a new icon in window panel.However, it would not create a new icon in window panel by using .show() method but it is not the way i want.
hmm~~ Sorry, how to stop the form_closing event ?




Reply With Quote