-
July 26th, 2011, 12:10 PM
#1
Can't Resize Window using SetWindowPos
Hi,
I'm developing on Windows XP and I need to resize a Remote Desktop window.
I'm using the following code:
Code:
try
{
SetWindowPos(hwnd, HWND_TOP, 801, 2, 1000, 743, SWP_SHOWWINDOW);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString(), "Resize Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
The window does not get resized, but I do not get an exception. I know for sure that my hwnd is valid because the SWP_SHOWWINDOW brings the window to the forefront.
I've tested the code on Notepad and it works.
Do some windows classes impose resizing restrictions that my code does not address?
Thanks for your help,
Steve
-
July 26th, 2011, 02:39 PM
#2
Re: Can't Resize Window using SetWindowPos
What window class are you trying to resize? It might also be a problem with some of the paramaters
-
July 26th, 2011, 03:01 PM
#3
Re: Can't Resize Window using SetWindowPos
Hannes,
Thanks,
The window class is TSSHELLWND (remote desktop).
Any help you can provide is appreciated.
Steve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|