Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
AnswerRe: OdbcCommand not taking Pin
Guffa10-Jul-06 7:06
Guffa10-Jul-06 7:06 
GeneralRe: OdbcCommand not taking Pin
HahnTech10-Jul-06 10:19
HahnTech10-Jul-06 10:19 
GeneralRe: OdbcCommand not taking Pin
led mike10-Jul-06 10:39
led mike10-Jul-06 10:39 
GeneralRe: OdbcCommand not taking Pin
HahnTech10-Jul-06 11:34
HahnTech10-Jul-06 11:34 
GeneralRe: OdbcCommand not taking Pin
led mike10-Jul-06 12:08
led mike10-Jul-06 12:08 
GeneralRe: OdbcCommand not taking Pin
HahnTech10-Jul-06 13:21
HahnTech10-Jul-06 13:21 
AnswerRe: OdbcCommand not taking Pin
Guffa10-Jul-06 12:26
Guffa10-Jul-06 12:26 
QuestionSendMessage problem Pin
psyonara10-Jul-06 5:52
psyonara10-Jul-06 5:52 
I am using SendMessage from the Win32 API to send keystrokes to the foreground window. The keystrokes do not arrive, though, somehow. I have checked, and the handle to the window that I get is correct. When I use SendMessage to send a character to the application itself it works, but not to another window.

I use the following API functions:

<br />
[DllImport("user32.dll")]<br />
public static extern int SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);<br />
		<br />
[DllImport("user32.dll")]<br />
public static extern IntPtr GetForegroundWindow();<br />


And the following to send the message:

<br />
char a = new char();<br />
a = 'A';<br />
this.WindowState = FormWindowState.Minimized;<br />
IntPtr handle = GetForegroundWindow();<br />
SendMessage(handle, (int)Win32API.Messages.Char, (IntPtr)a, (IntPtr)0);<br />


The char enum is set to 0x0102, which is equivalent to WM_CHAR.

Does anyone know what I'm doing wrong? I would appreciate some help!

Thanks!
AnswerRe: SendMessage problem Pin
LongRange.Shooter10-Jul-06 8:16
LongRange.Shooter10-Jul-06 8:16 
AnswerRe: SendMessage problem Pin
mav.northwind10-Jul-06 9:02
mav.northwind10-Jul-06 9:02 
QuestionHiding a control Pin
joshp121710-Jul-06 5:21
joshp121710-Jul-06 5:21 
AnswerRe: Hiding a control Pin
Ravi Bhavnani10-Jul-06 5:31
professionalRavi Bhavnani10-Jul-06 5:31 
GeneralRe: Hiding a control Pin
joshp121710-Jul-06 5:45
joshp121710-Jul-06 5:45 
GeneralRe: Hiding a control Pin
Ravi Bhavnani10-Jul-06 5:55
professionalRavi Bhavnani10-Jul-06 5:55 
GeneralRe: Hiding a control Pin
Jun Du10-Jul-06 5:59
Jun Du10-Jul-06 5:59 
GeneralRe: Hiding a control Pin
Christian Graus10-Jul-06 8:17
protectorChristian Graus10-Jul-06 8:17 
AnswerRe: Hiding a control Pin
Andrew Lygin10-Jul-06 8:48
Andrew Lygin10-Jul-06 8:48 
QuestionThis.Left Pin
joshp121710-Jul-06 5:11
joshp121710-Jul-06 5:11 
AnswerRe: This.Left Pin
Ravi Bhavnani10-Jul-06 5:17
professionalRavi Bhavnani10-Jul-06 5:17 
AnswerRe: This.Left Pin
Not Active10-Jul-06 5:19
mentorNot Active10-Jul-06 5:19 
GeneralRe: This.Left Pin
Judah Gabriel Himango10-Jul-06 6:27
sponsorJudah Gabriel Himango10-Jul-06 6:27 
GeneralRe: This.Left Pin
Not Active10-Jul-06 6:51
mentorNot Active10-Jul-06 6:51 
AnswerRe: This.Left Pin
wasife10-Jul-06 8:23
wasife10-Jul-06 8:23 
AnswerRe: This.Left Pin
Andrew Lygin10-Jul-06 9:14
Andrew Lygin10-Jul-06 9:14 
QuestioncomboBox with value & text Pin
TAREQ F ABUZUHRI10-Jul-06 5:09
TAREQ F ABUZUHRI10-Jul-06 5:09 

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.