Click here to Skip to main content
11,707,470 members (71,630 online)
   

C#

 
GeneralRe: Fibonacci sequence Pin
harold aptroot22-Apr-13 7:23
memberharold aptroot22-Apr-13 7:23 
GeneralRe: Fibonacci sequence Pin
Jasmine250122-Apr-13 7:25
memberJasmine250122-Apr-13 7:25 
GeneralRe: Fibonacci sequence Pin
OriginalGriff22-Apr-13 8:51
mvpOriginalGriff22-Apr-13 8:51 
GeneralRe: Fibonacci sequence Pin
PIEBALDconsult22-Apr-13 15:37
memberPIEBALDconsult22-Apr-13 15:37 
GeneralRe: Fibonacci sequence Pin
Manfred R. Bihy22-Apr-13 20:18
professionalManfred R. Bihy22-Apr-13 20:18 
GeneralRe: Fibonacci sequence Pin
OriginalGriff22-Apr-13 21:46
mvpOriginalGriff22-Apr-13 21:46 
GeneralRe: Fibonacci sequence Pin
Manfred R. Bihy22-Apr-13 22:08
professionalManfred R. Bihy22-Apr-13 22:08 
AnswerRe: Fibonacci sequence Pin
PIEBALDconsult22-Apr-13 15:40
memberPIEBALDconsult22-Apr-13 15:40 
AnswerRe: Fibonacci sequence Pin
PIEBALDconsult22-Apr-13 16:02
memberPIEBALDconsult22-Apr-13 16:02 
AnswerRe: Fibonacci sequence Pin
Abhinav S22-Apr-13 18:01
mvpAbhinav S22-Apr-13 18:01 
AnswerRe: Fibonacci sequence Pin
Pete O'Hanlon22-Apr-13 19:48
protectorPete O'Hanlon22-Apr-13 19:48 
AnswerRe: Fibonacci sequence Pin
Kenneth Haugland22-Apr-13 22:00
professionalKenneth Haugland22-Apr-13 22:00 
AnswerRe: Fibonacci sequence Pin
Clifford Nelson24-Apr-13 15:49
memberClifford Nelson24-Apr-13 15:49 
QuestionThrow NullReferenceException in SendKeys.Send() Pin
tikcireviva22-Apr-13 3:49
membertikcireviva22-Apr-13 3:49 
Hi, I have encounted a NullReferenceException problem while using SendKeys.

'TestWinAPI.vshost.exe' (Managed): Loaded 'C:\TestWinAPI\bin\Debug\TestWinAPI.exe', Symbols loaded.
'TestWinAPI.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
A first chance exception of type 'System.NullReferenceException' occurred in System.Windows.Forms.dll


When I enable the exception capture, it shows the exception is being raised in SendKeys
private void btnAllinOne_Click(object sender, EventArgs e)
{
    int hwnd = 0;
    IntPtr hwndChild = IntPtr.Zero;
 
    if (tbxProc.Text.Length == 0)
    {
        MessageBox.Show("empty process string"); return;
    }
 
    hwnd = FindWindow(null, tbxProc.Text);
    if (hwnd == 0)
    {
        if (MessageBox.Show("Couldn't find the " + tbxProc.Text + " application. Do you want to start it?", "TestWinAPI", MessageBoxButtons.YesNo) == DialogResult.Yes)
        {
 
        }
    }
    else
    {
        SetForegroundWindow(hwnd);
 
        SendKeys.Send(tbxEditText.Text + "{ENTER}"); // <=== Exception happens here
    }
}
Anyone knows why is that?
AnswerRe: Throw NullReferenceException in SendKeys.Send() Pin
Eddy Vluggen22-Apr-13 4:56
mvpEddy Vluggen22-Apr-13 4:56 
AnswerRe: Throw NullReferenceException in SendKeys.Send() Pin
Alan N22-Apr-13 5:49
memberAlan N22-Apr-13 5:49 
QuestionDatabind won't work for Combobox and Checkbox Pin
yuifox22-Apr-13 3:08
memberyuifox22-Apr-13 3:08 
AnswerRe: Databind won't work for Combobox and Checkbox Pin
Eddy Vluggen22-Apr-13 4:58
mvpEddy Vluggen22-Apr-13 4:58 
GeneralRe: Databind won't work for Combobox and Checkbox Pin
yuifox22-Apr-13 11:46
memberyuifox22-Apr-13 11:46 
AnswerRe: Databind won't work for Combobox and Checkbox Pin
Eddy Vluggen23-Apr-13 10:35
mvpEddy Vluggen23-Apr-13 10:35 
QuestionManipulating taskbar right click applicatin menu Pin
Andreas X21-Apr-13 23:09
professionalAndreas X21-Apr-13 23:09 
AnswerRe: Manipulating taskbar right click applicatin menu Pin
Eddy Vluggen22-Apr-13 0:32
mvpEddy Vluggen22-Apr-13 0:32 
GeneralRe: Manipulating taskbar right click applicatin menu Pin
Andreas X22-Apr-13 1:31
professionalAndreas X22-Apr-13 1:31 
AnswerRe: Manipulating taskbar right click applicatin menu Pin
Richard Deeming22-Apr-13 1:48
professionalRichard Deeming22-Apr-13 1:48 
GeneralRe: Manipulating taskbar right click applicatin menu Pin
Andreas X22-Apr-13 7:15
professionalAndreas X22-Apr-13 7:15 
QuestionCode-Behind doesn't show Pin
larsp77721-Apr-13 22:56
memberlarsp77721-Apr-13 22:56 
AnswerRe: Code-Behind doesn't show Pin
OriginalGriff21-Apr-13 23:06
mvpOriginalGriff21-Apr-13 23:06 
AnswerRe: Code-Behind doesn't show Pin
Eddy Vluggen22-Apr-13 0:30
mvpEddy Vluggen22-Apr-13 0:30 
GeneralRe: Code-Behind doesn't show Pin
larsp77722-Apr-13 0:35
memberlarsp77722-Apr-13 0:35 
GeneralRe: Code-Behind doesn't show Pin
Pete O'Hanlon22-Apr-13 0:43
protectorPete O'Hanlon22-Apr-13 0:43 
GeneralRe: Code-Behind doesn't show Pin
larsp77722-Apr-13 1:00
memberlarsp77722-Apr-13 1:00 
GeneralRe: Code-Behind doesn't show Pin
Pete O'Hanlon22-Apr-13 1:45
protectorPete O'Hanlon22-Apr-13 1:45 
GeneralRe: Code-Behind doesn't show Pin
larsp77722-Apr-13 1:55
memberlarsp77722-Apr-13 1:55 
GeneralRe: Code-Behind doesn't show Pin
Eddy Vluggen22-Apr-13 1:05
mvpEddy Vluggen22-Apr-13 1:05 
AnswerRe: Code-Behind doesn't show Pin
Jasmine250122-Apr-13 8:47
memberJasmine250122-Apr-13 8:47 
AnswerRe: Code-Behind doesn't show Pin
Abhinav S22-Apr-13 18:03
mvpAbhinav S22-Apr-13 18:03 
Questionfinding square root of a number using scilab functions Pin
Member 913191921-Apr-13 20:52
memberMember 913191921-Apr-13 20:52 
AnswerRe: finding square root of a number using scilab functions Pin
Marco Bertschi21-Apr-13 21:12
professionalMarco Bertschi21-Apr-13 21:12 
GeneralRe: finding square root of a number using scilab functions Pin
Member 913191921-Apr-13 21:22
memberMember 913191921-Apr-13 21:22 
GeneralRe: finding square root of a number using scilab functions Pin
Marco Bertschi21-Apr-13 21:40
professionalMarco Bertschi21-Apr-13 21:40 
AnswerRe: finding square root of a number using scilab functions Pin
OriginalGriff21-Apr-13 23:04
mvpOriginalGriff21-Apr-13 23:04 
QuestionCalling mongoose API from .NET Pin
Tiger45621-Apr-13 16:57
memberTiger45621-Apr-13 16:57 
AnswerRe: Calling mongoose API from .NET Pin
Richard MacCutchan21-Apr-13 22:34
mvpRichard MacCutchan21-Apr-13 22:34 
QuestionPersonnel IO Pin
behrouz shamlo21-Apr-13 5:33
memberbehrouz shamlo21-Apr-13 5:33 
AnswerRe: Personnel IO Pin
Pete O'Hanlon21-Apr-13 5:48
protectorPete O'Hanlon21-Apr-13 5:48 
GeneralRe: Personnel IO Pin
behrouz shamlo21-Apr-13 6:25
memberbehrouz shamlo21-Apr-13 6:25 
GeneralRe: Personnel IO Pin
Pete O'Hanlon21-Apr-13 6:32
protectorPete O'Hanlon21-Apr-13 6:32 
AnswerRe: Personnel IO Pin
Eddy Vluggen21-Apr-13 8:39
mvpEddy Vluggen21-Apr-13 8:39 
GeneralRe: Personnel IO Pin
behrouz shamlo21-Apr-13 11:18
memberbehrouz shamlo21-Apr-13 11:18 
GeneralRe: Personnel IO Pin
Eddy Vluggen21-Apr-13 11:26
mvpEddy Vluggen21-Apr-13 11:26 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 30 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid