Click here to Skip to main content
15,923,015 members
Home / Discussions / C#
   

C#

 
GeneralRe: windows not in focus Pin
michaelgr117-Jan-10 6:40
michaelgr117-Jan-10 6:40 
QuestionHow to reject changes between two equal DataTables? Pin
obarahmeh16-Jan-10 21:13
obarahmeh16-Jan-10 21:13 
AnswerRe: How to reject changes between two equal DataTables? Pin
dan!sh 16-Jan-10 21:20
professional dan!sh 16-Jan-10 21:20 
QuestionUSB read Pin
michaelgr116-Jan-10 20:39
michaelgr116-Jan-10 20:39 
AnswerRe: USB read Pin
Alex Manolescu16-Jan-10 21:24
Alex Manolescu16-Jan-10 21:24 
QuestionMicrosoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
Mohammad Dayyan16-Jan-10 20:28
Mohammad Dayyan16-Jan-10 20:28 
AnswerRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
dan!sh 16-Jan-10 21:15
professional dan!sh 16-Jan-10 21:15 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
Mohammad Dayyan16-Jan-10 21:21
Mohammad Dayyan16-Jan-10 21:21 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
dan!sh 16-Jan-10 21:54
professional dan!sh 16-Jan-10 21:54 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
Mohammad Dayyan16-Jan-10 23:29
Mohammad Dayyan16-Jan-10 23:29 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
dan!sh 16-Jan-10 23:57
professional dan!sh 16-Jan-10 23:57 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
Mohammad Dayyan17-Jan-10 0:20
Mohammad Dayyan17-Jan-10 0:20 
Questionwriting a windows service Pin
benams16-Jan-10 20:26
benams16-Jan-10 20:26 
AnswerRe: writing a windows service Pin
dan!sh 16-Jan-10 20:59
professional dan!sh 16-Jan-10 20:59 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 3:25
professional#realJSOP17-Jan-10 3:25 
GeneralRe: writing a windows service Pin
PIEBALDconsult17-Jan-10 5:15
mvePIEBALDconsult17-Jan-10 5:15 
GeneralRe: writing a windows service Pin
dan!sh 17-Jan-10 6:10
professional dan!sh 17-Jan-10 6:10 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 7:19
professional#realJSOP17-Jan-10 7:19 
GeneralRe: writing a windows service Pin
Ravi Bhavnani17-Jan-10 9:33
professionalRavi Bhavnani17-Jan-10 9:33 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 23:52
professional#realJSOP17-Jan-10 23:52 
AnswerRe: writing a windows service Pin
PIEBALDconsult17-Jan-10 5:17
mvePIEBALDconsult17-Jan-10 5:17 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 7:20
professional#realJSOP17-Jan-10 7:20 
Questionsaving images in C# Pin
djsproject16-Jan-10 18:27
djsproject16-Jan-10 18:27 
AnswerRe: saving images in C# Pin
OriginalGriff16-Jan-10 21:35
mveOriginalGriff16-Jan-10 21:35 
QuestionSetWindowPos, MoveWindow and GetWindowRect screen handling issues Pin
Electric Eddy16-Jan-10 17:17
Electric Eddy16-Jan-10 17:17 
Hi,

Has anyone experienced issues using functions such as SetWindowPos() when moving maximized remote desktop windows over extended desktops.
When I maximize the remote desktop to one of my screens and move the remote desktop to another screen using the c# MoveWindow() function the Remote Desktop yellow title tool bar gets left behind.

What I want to do is take the remote desktop out of full screen mode and run it in a restored state on another screen.

Is there an alternative as SetWindowPos only seems to handle regular windows.

It also seems to not handle multiple screens very well as when I use the functionality to maximize a screen the edges take up 4 pixel columns from point -4 to 0 and from point 1024 - 1028, where I have to manually adjust.

Hopefully I’m just using the wrong functions to position windows.

Functions uses: GetWindowRect, SetWindowPos, MoveWindow, GetWindowPlacement.

As per the following using parameters:

SW_HIDE = 0;
SW_SHOWNORMAL = 1;
SW_SHOWMINIMIZED = 2;
SW_SHOWMAXIMIZED = 3;
SW_SHOWNOACTIVATE = 4;
SW_RESTORE = 9;
SW_SHOWDEFAULT = 10;

For Min, Max and Normal:

WINDOWPLACEMENT param = new DisplayManager.WINDOWPLACEMENT();
GetWindowPlacement(referenceHandle, ref param);
param.showCmd = SW_SHOWMINIMIZED;
SetWindowPlacement(referenceHandle, ref param);

To bring a window to top:

SetWindowPos(Handle, HWND_TOPMOST, xPos, yPos, width, height, TOPMOST_FLAGS);

To move a window to a specific location:

MoveWindow((IntPtr)positionHandle, (offset + xPos), yPos, width, height, true);

Getting the position of a window:

GetWindowRect((IntPtr)positionHandle, ref activeAreaApp);

Patrick.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.