Results 1 to 8 of 8

Thread: [RESOLVED][02/03] How to make the focus on activated form only

Threaded View

  1. #5

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    Re: [02/03] How to make the focus on activated form only

    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
    Name:  Screen Capture.JPG
Views: 160
Size:  94.0 KB

    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 ?
    Last edited by nUflAvOrS; Aug 14th, 2007 at 08:08 PM.
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width