Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Size and Program Area

Status
Not open for further replies.

LoneRanger123

Programmer
Dec 19, 2000
62
0
0
GB
I would like my program to automatically go to the left side of the screen, how do I find the screen resolution?

Also, does anyone know how to change the program area, like Programs such as ICQ, MSN etc do, so its at the side of teh screen, and when u maximise programs it doesnt go over these.
 
GetSystemMetrics(SM_CXSCREEN); x-resolution
GetSystemMetrics(SM_CYSCREEN); y-resolution
 
How do u lot find all this stuff?

cyprus u couldnt give me links to where u get your info, that might stop me bugging u lot so much :)

ty again :)
 
LoneRanger, I'd be happy to. I'll post a tip for everybody on the helpful sites that I know of. Try looking in the FAQs, I seem to remember some links in there, I think. Cyprus
[noevil]
 
I dont think you need to check resolution if
you only want the window to dock at the left.
set the position of the form to designed and the left
to 10 and the top to 10. This should put it just
off the upper left corner.
 
May be this will help

The following code determines the height of all forms on the screen and resizes any that are taller than the screen height.

for (int i = 0; i < Screen->FormCount; i++)

{
if (Screen->Forms->Height > Screen->Height)
Forms->Height = Screen->Height;
if (Screen->Forms->Width > Screen->Width)
Forms->Width = Screen->Width;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top