|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to drag a form around the screen?Hi,
I am wanting to code a way to drag a form around the screen - but can't remember how to do this in vb.net. Can someone please post a code snippet? Thanks ooops...I found it..
For anyone who's interested: Private MouseDownLoc As Point Private Sub pb_T_Title_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pb_T_Title.MouseDown MouseDownLoc.X = e.X MouseDownLoc.Y = e.Y End Sub Private Sub pb_T_Title_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pb_T_Title.MouseMove If e.Button = MouseButtons.Left Then Me.Left += e.X - MouseDownLoc.X Me.Top += e.Y - MouseDownLoc.Y End If End Sub Blarneystone wrote: Show quoteHide quote > Hi, > > I am wanting to code a way to drag a form around the screen - but can't > remember how to do this in vb.net. > > Can someone please post a code snippet? > > Thanks Blarneystone wrote:
> Hi, Why would you want to do this in VB? Windows does it for you.> > I am wanting to code a way to drag a form around the screen - but can't > remember how to do this in vb.net. > > Can someone please post a code snippet? > On 6 Jul 2006 13:53:33 -0700, za***@construction-imaging.com wrote:
> Borderless Form (No TitleBar) is the usual reason.>Blarneystone wrote: >> Hi, >> >> I am wanting to code a way to drag a form around the screen - but can't >> remember how to do this in vb.net. >> >> Can someone please post a code snippet? >> > >Why would you want to do this in VB? Windows does it for you. Gene
Valid file name
timer control Validating Data Using a Error Provider EM_CHARFROMPOS with RichTextBox CheckedListbox - change check event DBNull problem Data binding to an object Somebody please help - Request for the permission of type 'System.Web.AspNetHostingPermission' [...] Q: Deleting a table with constraints Q: skipping a For Each |
|||||||||||||||||||||||