We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

XPmenus and PointToClient

Thread ID:

Created:

Updated:

Platform:

Replies:

32349 Jul 27,2005 05:36 PM UTC Aug 8,2005 09:35 PM UTC WinForms 6
loading
Tags: Tools
Administrator [Syncfusion]
Asked On July 27, 2005 05:36 PM UTC

I am trying to position a MDI child window from code in an application that uses XPMenus. I have a point in screen coordinates which I convert with PointToClient. The result is a bit off. It seems that the conversion ignores the space taken up by the XPmenus. Im fairly convinced that this is the reason, since when I dock all the menus (and detached command bars) at the bottom or right, the result is correct. What can I do to avoid this problem?

Ebenezer P [Syncfusion]
Replied On July 28, 2005 02:19 PM UTC

Hi Kjetil, If the space occupied by XPMenus has to be excluded the function Screen.GetWorkingArea should be used to get working area of the display which can then be used to position the form.I have attached a sample that illustrates this.We appreciate your interest in Syncfusion products. Regards, Ebenezer.P XPMenus_9940.zip

Administrator [Syncfusion]
Replied On July 28, 2005 03:50 PM UTC

Hi Ebenezer. Thanks for your feedback. However, unless I have misunderstood something, I don''t think your sample solves the problem. It simply places the child form at Location (0,0). What is needed is a function that converts a set of screen coordinates to a set of client coordinates, accounting for the space taken up by the XP menus. The winforms PointToClient only does the conversion that would be correct if there were no the XP-menus.

Administrator [Syncfusion]
Replied On August 2, 2005 07:12 PM UTC

Hi Kjetil, Thanks for the additional information. I understand your requirements better now. I am afraid, the PointToClient method does not take into account the space occupied by the XPMenus.Bars. We have considered this as a feature request (#321) and will add a new method PointToClientWithMenus to the BarManager for this purpose. You could track the progress of this feature request at this link below : Feature Request #321 - Add support for PointToClientWithMenus method in the BarManager We will try our best to implement the same at the earliest. We appreciate your feedback, and thanks for your patience. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On August 3, 2005 03:40 PM UTC

Hi Kjetil, After further investigating this issue, we do see that the child form is indeed positioned correctly by the PointToClient method. However, due to the presence of the scrollbars, it gives an impression of not having the desired effect. Please refer to the test sample attached that illustrates this and let me know your thoughts on this. We appreciate your feedback. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On August 5, 2005 11:47 AM UTC

Hi Guru. I tried your last sample and it seemed to work fine with the given position. However, there are some strange things going on. I tried the following: 1. Changed the position to (10,10). 2. Clicked "Child". (This brings up the child form positioned correctly, but because the scroll bar form some reason is brougth up it appears to be positioned wrong.) 3. Repositioned the scroll bar to the top. 4. Repeated 2-3. This brought up a new child, but also the changed the position of the previsous child! Indeed, repeating 2-3 many times gives a series of children, each positioned at a different point. Since there currently seemed to by no straightforward solution to the positioning issue, I have been able to find another solution for my original problem, that does not involve positioning of the child window. The issue is thus not critical to me any longer, but thanks a lot for your effort. P.S. I think it is very important that (the possibly related issue) of arranging the MDI childrent with TileVertical, etc works correctly. Fourtunately this works nicely, taking the XP menus correctly into account.

Administrator [Syncfusion]
Replied On August 8, 2005 09:35 PM UTC

Hi Kjetil, Thanks for the update. I do see this discrepancy in the positioning of the MDI child forms using the PointToClient method. So we will go ahead with feature request 321. Though I am unable to promise you any turnaround time on this, we will try our very best to implement this feature as soon as possible. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;