Peter,
exactly what I needed. Thanks a bunch
--
Strah @ Langan
"Peter Proost" <(E-Mail Removed)> wrote in message
news:eHzZ%(E-Mail Removed)...
> Maybe the PointToClient method can help you,
> or maybe this piece of code,
> place a label and a button on a form, call the label lblMouse and copy
> paste
> the following code
>
> <<<<<<<<code>>>>>>>>>
> Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As _
> System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
> lblMouse.Text = "X: " & e.X & " Y: " & e.Y
> lblMouse.Refresh()
> End Sub
>
> Private Sub Button1_MouseMove(ByVal sender As Object, ByVal e As _
> System.Windows.Forms.MouseEventArgs) Handles Button1.MouseMove
> lblMouse.Text = "X: " & e.X & " Y: " & e.Y
> lblMouse.Refresh()
> End Sub
>
> <<<<<<<<<code>>>>>>>>>>
>
> hth
> Peter
>
>
> "Strahimir Antoljak" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
>> I want to track the cursor location relative to a control on the form. I
> am
>> aware of System.Windows.Forms.Cursor.Position which provides absolute
> cursor
>> position relative to the screen. With right subtractions of the form
>> location and the control location it is possible to get the relative
> cursor
>> location to the screen.... with one exception - form has a title bar, and
>> border widths which I do not know the values of. Is there a way to find
> out
>> the title bar width and border widths? preferably programmatically?
>> thanks
>>
>>
>> --
>> Strah @ Langan
>>
>>
>
>
|