Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
GeneralDirectX Window Pin
SherKar26-Feb-04 6:23
SherKar26-Feb-04 6:23 
GeneralRe: DirectX Window Pin
Dave Kreskowiak26-Feb-04 8:37
mveDave Kreskowiak26-Feb-04 8:37 
GeneralRe: DirectX Window Pin
SherKar26-Feb-04 15:29
SherKar26-Feb-04 15:29 
GeneralRe: DirectX Window Pin
Dave Kreskowiak26-Feb-04 16:40
mveDave Kreskowiak26-Feb-04 16:40 
GeneralRe: DirectX Window Pin
SherKar27-Feb-04 3:15
SherKar27-Feb-04 3:15 
GeneralRe: DirectX Window Pin
Dave Kreskowiak27-Feb-04 4:02
mveDave Kreskowiak27-Feb-04 4:02 
GeneralRe: DirectX Window Pin
SherKar27-Feb-04 5:03
SherKar27-Feb-04 5:03 
GeneralRe: DirectX Window Pin
Dave Kreskowiak27-Feb-04 7:48
mveDave Kreskowiak27-Feb-04 7:48 
Finally! OK. What you ask is not that easy and is problematic at best.

You can look into using SendKeys to stuff keystrokes into the message stream of the app you want. But since the focus can bechanged between the time you activate the app you need to send keystrokes to, or even during sending the keystrokes, the focus can change to another app.

Doing stuff with the applications windows will require you to look into the Win32 API and creating the structures and function declarations for C#. This includes something as simple as moving a window or maximizing or minimizing it. You'll have to use functions like GetWindow, GetWindowPlacement, SetWindowPlacement, SetForegroundWindow, SwitchToThisWindow, MoveWindow, ... plus all the structures that these functions use!

You might want to consider writing the bulk of this code in C++ instead of C# because all of the functions and structures already come in the header files and libraries natively used by C++ to write Windows apps.

Have fun and stock up on some Advil or Excedrin. You'll need it!


RageInTheMachine9532
QuestionHow to count the running applications? Pin
yyf26-Feb-04 5:55
yyf26-Feb-04 5:55 
AnswerRe: How to count the running applications? Pin
SherKar26-Feb-04 6:19
SherKar26-Feb-04 6:19 
AnswerRe: How to count the running applications? Pin
Nick Parker26-Feb-04 6:56
protectorNick Parker26-Feb-04 6:56 
AnswerRe: How to count the running applications? Pin
turbochimp26-Feb-04 6:57
turbochimp26-Feb-04 6:57 
GeneralRe: How to count the running applications? Pin
yyf26-Feb-04 8:35
yyf26-Feb-04 8:35 
GeneralRe: How to count the running applications? Pin
Nick Parker26-Feb-04 8:45
protectorNick Parker26-Feb-04 8:45 
GeneralRe: How to count the running applications? Pin
yyf26-Feb-04 9:53
yyf26-Feb-04 9:53 
GeneralTreeView ToolTip Pin
Guinness4Strength26-Feb-04 4:40
Guinness4Strength26-Feb-04 4:40 
GeneralRe: TreeView ToolTip Pin
Heath Stewart26-Feb-04 5:26
protectorHeath Stewart26-Feb-04 5:26 
GeneralCheckboxes in TreeView Pin
torrud26-Feb-04 3:47
torrud26-Feb-04 3:47 
GeneralRe: Checkboxes in TreeView Pin
Heath Stewart26-Feb-04 4:50
protectorHeath Stewart26-Feb-04 4:50 
GeneralRe: Checkboxes in TreeView Pin
Heath Stewart26-Feb-04 4:56
protectorHeath Stewart26-Feb-04 4:56 
GeneralTreeView and ContextMenu Pin
torrud26-Feb-04 3:43
torrud26-Feb-04 3:43 
GeneralRe: TreeView and ContextMenu Pin
Heath Stewart26-Feb-04 4:48
protectorHeath Stewart26-Feb-04 4:48 
GeneralMSSQL Linked Server Pin
y_seval26-Feb-04 2:48
y_seval26-Feb-04 2:48 
GeneralRe: MSSQL Linked Server Pin
Heath Stewart26-Feb-04 3:00
protectorHeath Stewart26-Feb-04 3:00 
GeneralAutoComplete ComboBox Pin
gr8tushar26-Feb-04 0:36
gr8tushar26-Feb-04 0:36 

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.