what i do is is something like:
dim loc as Point = Cursor.Position
myForm..SetDesktopLocation(loc .X, loc .Y)
myForm.Show
however, the window is never appearing where i want it to... what's
wrong?
thanks
Your myForm.Show is shown relative to the Desktop, whereas your
Cursor.Position is relative to the current Form.
Add the X,Y position of the current Form to the
myForm.SetDesktopLocation(loc.X, loc.Y) and you'll find your myForm.Show
will open in the correct position.
ShaneO
There are 10 kinds of people - Those who understand Binary and those who
don't.
Public Sub ShowThisForm(ByVal atPos As Point)
Me.SetDesktopLocation(atPos.X, atPos.Y)
Me.TopLevel = True
Me.Show()
End Sub
and it keeps showing all over the place... each time at a different
position. would you know why?
thanks again
Dim frm as FormToShow = New FormToShow
frm.StartPosition = FormStartPosition.Manual
frm.TopLevel = True
frm.Location = New Point(Cursor.Position.X + ActiveForm.Location.X, _
Cursor.Position.Y + ActiveForm.Location.Y)
frm.Show()