Click here to Skip to main content
15,890,982 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Minimize window to gain memory space??? Pin
Pete O'Hanlon13-Aug-10 21:36
mvePete O'Hanlon13-Aug-10 21:36 
GeneralRe: Minimize window to gain memory space??? Pin
Dave Kreskowiak14-Aug-10 3:19
mveDave Kreskowiak14-Aug-10 3:19 
GeneralRe: Minimize window to gain memory space??? Pin
Richard Blythe14-Aug-10 5:03
Richard Blythe14-Aug-10 5:03 
GeneralRe: Minimize window to gain memory space??? Pin
AnnieMacD11-Aug-10 11:15
AnnieMacD11-Aug-10 11:15 
GeneralRe: Minimize window to gain memory space??? [modified] Pin
Heinz_15-Aug-10 21:06
Heinz_15-Aug-10 21:06 
GeneralRe: Minimize window to gain memory space??? Pin
Dave Kreskowiak16-Aug-10 1:44
mveDave Kreskowiak16-Aug-10 1:44 
Questioncan window form manipulate keyboard and mouse movement? Pin
neodeaths9-Aug-10 6:43
neodeaths9-Aug-10 6:43 
AnswerRe: can window form manipulate keyboard and mouse movement? Pin
Luc Pattyn9-Aug-10 7:10
sitebuilderLuc Pattyn9-Aug-10 7:10 
yes it is possible.

AFAIK you need P/Invoke for mouse automation, see functions SendInput and SetCursorPos in user32.dll; for keyboard automation the .NET System.Windows.Forms.SendKeys class could be sufficient.

For all of them, you must make sure you are talking to the right window, which needs to have focus; so you will probably need even more P/Invoke and use functions GetForegroundWindow, SetForegroundWindow, GetWindowText, and maybe more.

Warnings:
1. you probably need to include some delays, say Thread.Sleep(100), so the target application can react to your automation inputs (which otherwise would come much faster than a human user would provide them);
2. whatever you do it will not be absolutely safe. For one, there could still be a user typing/mousing around; second, target apps may suddenly throw unexpected stuff at you, maybe a dialog telling you the disk got full, the network connection was lost, etc.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


QuestionApplication Security - Design Question Pin
imak4-Aug-10 9:09
imak4-Aug-10 9:09 
AnswerRe: Application Security - Design Question Pin
Mycroft Holmes7-Aug-10 0:50
professionalMycroft Holmes7-Aug-10 0:50 
AnswerRe: Application Security - Design Question Pin
T M Gray9-Aug-10 8:20
T M Gray9-Aug-10 8:20 
JokeRe: Application Security - Design Question Pin
johannesnestler26-Aug-10 4:13
johannesnestler26-Aug-10 4:13 
AnswerRe: Application Security - Design Question Pin
All Time Programming3-Sep-10 3:49
All Time Programming3-Sep-10 3:49 
QuestionForm with FormBorderStyle=FixedToolWindow && No close button [modified] Pin
King Balkoth2-Aug-10 12:46
King Balkoth2-Aug-10 12:46 
AnswerRe: Form with FormBorderStyle=FixedToolWindow && No close button Pin
Luc Pattyn2-Aug-10 13:03
sitebuilderLuc Pattyn2-Aug-10 13:03 
GeneralRe: Form with FormBorderStyle=FixedToolWindow && No close button Pin
King Balkoth2-Aug-10 21:33
King Balkoth2-Aug-10 21:33 
Answer[Update] Re: Form with FormBorderStyle=FixedToolWindow && No close button Pin
King Balkoth16-Aug-10 6:39
King Balkoth16-Aug-10 6:39 
QuestionManaging tabs in a multiline tab control Pin
ruanr29-Jul-10 23:11
ruanr29-Jul-10 23:11 
AnswerRe: Managing tabs in a multiline tab control Pin
Eddy Vluggen2-Aug-10 1:09
professionalEddy Vluggen2-Aug-10 1:09 
QuestionWhat is best way to convert desktop app to web app? Pin
bobishkindaguy20-Jul-10 12:18
bobishkindaguy20-Jul-10 12:18 
AnswerRe: What is best way to convert desktop app to web app? Pin
Abhinav S20-Jul-10 18:30
Abhinav S20-Jul-10 18:30 
GeneralRe: What is best way to convert desktop app to web app? [modified] Pin
bobishkindaguy21-Jul-10 6:25
bobishkindaguy21-Jul-10 6:25 
AnswerRe: What is best way to convert desktop app to web app? Pin
Mycroft Holmes20-Jul-10 19:45
professionalMycroft Holmes20-Jul-10 19:45 
GeneralRe: What is best way to convert desktop app to web app? Pin
bobishkindaguy21-Jul-10 6:24
bobishkindaguy21-Jul-10 6:24 
GeneralRe: What is best way to convert desktop app to web app? Pin
Max Peck22-Jul-10 15:56
Max Peck22-Jul-10 15:56 

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.