473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

adjusting X, Y location

MAF
I am draggin an object into a user control that contains a tree view and
want to insert the object into the tree. The problem I have is that the X,
Y(coordinates for the form that contains the user control) are not within
the underlying treeview control. Isn't there a calculation that I can use
to adjust the x, y coordinates?

Thanks
Nov 17 '05 #1
1 1847
MAF,

This is a two step operation. First, you want to call the PointToScreen
method on the form, passing the point, which is converted into screen
coordinates.

Then, you call the PointToClient method on the treeview control, passing
the converted point (in screen coordinates) and it will give you the point
in the coordinate system of the tree view control.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:OP**************@TK2MSFTNGP14.phx.gbl...
I am draggin an object into a user control that contains a tree view and
want to insert the object into the tree. The problem I have is that the X,
Y(coordinates for the form that contains the user control) are not within
the underlying treeview control. Isn't there a calculation that I can use
to adjust the x, y coordinates?

Thanks

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ken Fine | last post by:
No joy on Macromedia's boards after a few days; maybe someone can help me here. I got an excellent string handling function off of planet-source-code.com that converts text strings to proper...
5
by: Don Garrett | last post by:
I have an XML document at the root of a directory tree that contains relative URIs to resources in a directory tree. During XSLT processing, these URI's can be used without any problems to...
1
by: Jesse Joseph Acosta | last post by:
Hi, Im working on a site for a friend, and we've setup a popup window for a couple pages, but with the code we have, the variables for the width and height are in the <script> portion of the code,...
8
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
7
by: Jim Davis | last post by:
I'm (still) working on an ISO 8601 date parser. I want to convert at least the formats described here: http://www.w3.org/TR/NOTE-datetime Well.. I've got most of it working (via RegEx's) good...
0
by: argniw | last post by:
I have a schedule of annual events that need to occur in different locations throughout the year. Each event has a due date associated with it. I also have an optimal schedule that consolidates...
7
by: marfi95 | last post by:
I'm trying to implement some code in vb.net to allow the user to adjust the brightness or contrast on an image (through the use of a slider) that is already black & white in the bitmap. I have...
1
by: Mark | last post by:
Hi All, I have set up a simple database to create labels for bottles. I insert a set number of records into a table and have produced a label report based on that table. After a bit of tweaking,...
2
by: pramodh | last post by:
adjusting the baseline of an external text to import in flash
3
by: bmahussain | last post by:
Anybody having javascript coding for adjusting brightness and contrast of an image using slider control. If yes, then kindly forward the same. regards, hussain.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.