Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

postion of form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doug - 07 Jan 2008 09:52 GMT
Hi

I am using a form in an application that i have attached to the context menu
using a program called right click configurator.  The position of the
applicaiton when called through the context menu is important.

Is it possible for a form's load position to be made relative to the context
menu?  I see that there are several options such as center, and windows
default, but I would like to be able to have more control over the initial
location relative to the context menu.

Thanks

Doug
Olie - 07 Jan 2008 10:19 GMT
The form will load wherever you tell it to load in the Location
properties. That is unless it is overriden by another property.

Just set the location before calling Show().
Doug - 07 Jan 2008 11:34 GMT
thanks for your advice but my question was how to get it to load in a
positon relative to the context menu if I use that to lauch the application.

Doug

> The form will load wherever you tell it to load in the Location
> properties. That is unless it is overriden by another property.
>
> Just set the location before calling Show().
Marc Gravell - 07 Jan 2008 11:58 GMT
Probably not. Perhaps a question for the maker of the context-menu
program? Or write your own shell extension (not easy).

Marc
Ignacio Machin ( .NET/ C# MVP ) - 07 Jan 2008 14:15 GMT
Hi,

That is rather difficult, unless that the context menu app provide that info
when loading the app (which I doubt).

Thinking now, a possible solution would be if you know the name of the
context menu window you could try to get its properties, I'm pretty sure
that tehre is an API call in win32 that let you know the position of a
window (if you know the hWnd).
So you best shot is exploring the win32 API and try to find a way through
there.
The first step is to get the hWnd of the context menu though, without that
you will get nowhere

Signature

Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.

> thanks for your advice but my question was how to get it to load in a
> positon relative to the context menu if I use that to lauch the
[quoted text clipped - 6 lines]
>>
>> Just set the location before calling Show().

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.