|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
moving the formhey all,
is there a way to have it where if a user clicks and holds down left mouse button on a TextBox they will be able to move the form around the desktop? thanks, rodchar yea...look at the textbox's mousedown and mousemove events.....but this is a
very curious question....can i ask the purpose of this? -- -iwdu15 i want to make something like post it notes for personal use.
Show quoteHide quote "iwdu15" wrote: > yea...look at the textbox's mousedown and mousemove events.....but this is a > very curious question....can i ask the purpose of this? > -- > -iwdu15 ok, so its something like this
''GLobal Var Private ptOld as Point Private boolDown as Boolean = False Private Sub txtStuff_MouseDown(..) If e.Button = MouseButtons.Left then ptOld.X = e.x ptOld.Y = e.y boolDown = true end if end sub Private SUb txtStuff_MouseMove(.,..) if boolDown then Me.left = ptOld.X - e.x Me.Top = ptOld.Y - e.Y end if end sub Private Sub txtStuff_MouseUp(...) boolDown = false end sub something along those lines hope this helps -- -iwdu15 thank you very much.
Show quoteHide quote "iwdu15" wrote: > ok, so its something like this > > ''GLobal Var > Private ptOld as Point > > Private boolDown as Boolean = False > > Private Sub txtStuff_MouseDown(..) > > If e.Button = MouseButtons.Left then > > ptOld.X = e.x > ptOld.Y = e.y > > boolDown = true > > end if > > end sub > > > Private SUb txtStuff_MouseMove(.,..) > > if boolDown then > > Me.left = ptOld.X - e.x > Me.Top = ptOld.Y - e.Y > > end if > > end sub > > > Private Sub txtStuff_MouseUp(...) > > boolDown = false > > end sub > > > > something along those lines > > hope this helps > > -- > -iwdu15 Shouldn't that be:
Me.left = Me.left + ptOld.X - e.x Me.Top = Me.Left + ptOld.Y - e.Y Me.Refresh -- Show quoteHide quoteDennis in Houston "iwdu15" wrote: > ok, so its something like this > > ''GLobal Var > Private ptOld as Point > > Private boolDown as Boolean = False > > Private Sub txtStuff_MouseDown(..) > > If e.Button = MouseButtons.Left then > > ptOld.X = e.x > ptOld.Y = e.y > > boolDown = true > > end if > > end sub > > > Private SUb txtStuff_MouseMove(.,..) > > if boolDown then > > Me.left = ptOld.X - e.x > Me.Top = ptOld.Y - e.Y > > end if > > end sub > > > Private Sub txtStuff_MouseUp(...) > > boolDown = false > > end sub > > > > something along those lines > > hope this helps > > -- > -iwdu15 Sorry, that is:
Me.left = Me.Left + ptOld.X - e.x Me.Top = Me.Top + ptOld.Y - e.Y -- Show quoteHide quoteDennis in Houston "iwdu15" wrote: > ok, so its something like this > > ''GLobal Var > Private ptOld as Point > > Private boolDown as Boolean = False > > Private Sub txtStuff_MouseDown(..) > > If e.Button = MouseButtons.Left then > > ptOld.X = e.x > ptOld.Y = e.y > > boolDown = true > > end if > > end sub > > > Private SUb txtStuff_MouseMove(.,..) > > if boolDown then > > Me.left = ptOld.X - e.x > Me.Top = ptOld.Y - e.Y > > end if > > end sub > > > Private Sub txtStuff_MouseUp(...) > > boolDown = false > > end sub > > > > something along those lines > > hope this helps > > -- > -iwdu15 Rodchar
Maybe a little bit late after that Iwdu15 has given you the correct answer, but I should have given you this link for your problem. I like forever to give this one. http://www.vb-tips.com/dbpages.aspx?ID=72f58d3f-2cb5-4d51-b148-a2eda88e06ee Cor Show quoteHide quote "rodchar" <rodc***@discussions.microsoft.com> schreef in bericht news:2FE2AD84-B552-417C-AE3C-A2B62356D727@microsoft.com... > hey all, > is there a way to have it where if a user clicks and holds down left mouse > button on a TextBox they will be able to move the form around the desktop? > > thanks, > rodchar
Can anyone help with proper use of operator CType in VB.net?
Data Source error... help!? Autosaving? in VB2005 express Help on DataSets Confussing error .. help needed PrintPreview control does not print CPU Temperature I can't seem to find BorderStyle Problem with a COM control... key generation in dictionaries |
|||||||||||||||||||||||