Click here to Skip to main content
15,894,825 members
Home / Discussions / C#
   

C#

 
AnswerRe: sraw method Pin
Dalek Dave17-Feb-11 12:49
professionalDalek Dave17-Feb-11 12:49 
AnswerRe: sraw method Pin
RaviRanjanKr21-Feb-11 17:53
professionalRaviRanjanKr21-Feb-11 17:53 
QuestionHelp getting Sacl information from AllDirectories and Files. Pin
Twdeveloper17-Feb-11 7:42
Twdeveloper17-Feb-11 7:42 
AnswerRe: Help getting Sacl information from AllDirectories and Files. Pin
Wendelius17-Feb-11 8:40
mentorWendelius17-Feb-11 8:40 
GeneralRe: Help getting Sacl information from AllDirectories and Files. Pin
#realJSOP17-Feb-11 9:41
mve#realJSOP17-Feb-11 9:41 
GeneralRe: Help getting Sacl information from AllDirectories and Files. Pin
Wendelius17-Feb-11 10:37
mentorWendelius17-Feb-11 10:37 
GeneralRe: Help getting Sacl information from AllDirectories and Files. Pin
Richard MacCutchan17-Feb-11 22:09
mveRichard MacCutchan17-Feb-11 22:09 
QuestionHelp with sendkey or postmessage Pin
turbosupramk317-Feb-11 5:00
turbosupramk317-Feb-11 5:00 
I am trying to send an "F2" keystroke to a window to refresh it.

I would like to send it to the window while it is minimized, I have Vista just as a little more information.

Here is the code I was testing on, it seems like PostMessage might be my best option, I am able to find the window handle through the code below, just not sure how to send an "F2" to it when minimized.

Thanks for reading.


private void button1_Click(object sender, EventArgs e)
{
    const int WM_KEYDOWN = 0x100;

    const int WM_KEYUP = 0x101;

    //IntPtr windowHandle = Win("notepad");

    //PostMessage(windowHandle, WM_KEYDOWN, (int)Keys.A, 0);

    Thread.Sleep(3000);
    Process[] processes = Process.GetProcessesByName("keytest.txt - Notepad");

    foreach (Process p in processes)
    {

        IntPtr pFoundWindow = p.MainWindowHandle;


    }
    MessageBox.Show("Done");

}

AnswerRe: Help with sendkey or postmessage Pin
musefan17-Feb-11 5:13
musefan17-Feb-11 5:13 
GeneralRe: Help with sendkey or postmessage Pin
turbosupramk317-Feb-11 5:37
turbosupramk317-Feb-11 5:37 
AnswerRe: Help with sendkey or postmessage [modified] Pin
musefan17-Feb-11 6:05
musefan17-Feb-11 6:05 
GeneralRe: Help with sendkey or postmessage Pin
musefan17-Feb-11 6:07
musefan17-Feb-11 6:07 
GeneralRe: Help with sendkey or postmessage Pin
turbosupramk317-Feb-11 7:25
turbosupramk317-Feb-11 7:25 
AnswerRe: Help with sendkey or postmessage Pin
Henry Minute17-Feb-11 6:26
Henry Minute17-Feb-11 6:26 
GeneralRe: Help with sendkey or postmessage Pin
turbosupramk317-Feb-11 7:19
turbosupramk317-Feb-11 7:19 
AnswerRe: Help with sendkey or postmessage Pin
Luc Pattyn17-Feb-11 7:39
sitebuilderLuc Pattyn17-Feb-11 7:39 
QuestionConstructing a class from a static function Pin
musefan17-Feb-11 1:37
musefan17-Feb-11 1:37 
AnswerRe: Constructing a class from a static function Pin
Xmen Real 17-Feb-11 1:45
professional Xmen Real 17-Feb-11 1:45 
GeneralRe: Constructing a class from a static function Pin
musefan17-Feb-11 2:08
musefan17-Feb-11 2:08 
GeneralRe: Constructing a class from a static function Pin
PIEBALDconsult17-Feb-11 4:27
mvePIEBALDconsult17-Feb-11 4:27 
AnswerRe: Constructing a class from a static function Pin
Not Active17-Feb-11 2:25
mentorNot Active17-Feb-11 2:25 
GeneralRe: Constructing a class from a static function Pin
musefan17-Feb-11 2:43
musefan17-Feb-11 2:43 
Questiontext file > Binary and Binary > Text file Pin
grmihel217-Feb-11 0:39
grmihel217-Feb-11 0:39 
AnswerRe: text file > Binary and Binary > Text file Pin
Ravi Sant17-Feb-11 1:15
Ravi Sant17-Feb-11 1:15 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 1:26
grmihel217-Feb-11 1:26 

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.