Results 1 to 9 of 9

Thread: [RESOLVED] detect click event outside a form's boundary

Hybrid View

  1. #1
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: detect click event outside a form's boundary

    there is an easier way, where you change your formborderstyle back to the default formborderstyle, then use this code in your form_load event, which will give your form the look of no borders with the functionality of a form with default formborderstyle:

    vb Code:
    1. Dim gp As New Drawing.Drawing2D.GraphicsPath
    2. Dim r As Rectangle = Me.ClientRectangle
    3. r.Offset(0, SystemInformation.CaptionHeight + 2)
    4. gp.AddRectangle(r)
    5. Me.Region = New Region(gp)

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2009
    Posts
    376

    Re: detect click event outside a form's boundary

    hey both works great thanks. anyways this sound stupid but i cant find out how do we put the [VB 2008] tag?

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