Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

MessageBox.Show(this.RTB1.Location.X+" "+this.RTB1.Location.Y+"\n"+this.RTB1.Location);

 

I want to use Cursor.Clip() but I cannot because the location is never right. . .

That text box is not near point 0 0 but it always shows that it is, why?

C#
Posted

Ok, same problem exept more weird.

 

Cursor.Position=new Point(saveButton.Location.X, saveButton.Location.Y);

 

That should put the cursor right on the upper left corner of the button but instead, no matter what object I put it on it is always about 20 pixels above where it needs to be and those are objects that are directly on the form, no panels.

 

I had the same problem with the paneled objects, I figured out how to get the point of a text box relative to the panles but it is always about 20 pixels above where it needs to be.

C#
  • *Experts*
Posted

Use the myButton.PointToScreen(myButton.Location) to get

the location of the button on the screen, rather than relative to the

form.

Posted

Cursor.Position= this.ExpandedViewB.PointToScreen(this.ExpandedViewB.Location);

 

If I did that right it is even worse than before. Any idea what is going on? I even tried it on a much less complicated form.

C#

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...