Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
Questionusing lparam parameter of SendMessage function Pin
Sandeep Kalra13-Oct-08 22:37
Sandeep Kalra13-Oct-08 22:37 
AnswerRe: using lparam parameter of SendMessage function Pin
Simon P Stevens13-Oct-08 23:12
Simon P Stevens13-Oct-08 23:12 
GeneralRe: using lparam parameter of SendMessage function Pin
Sandeep Kalra13-Oct-08 23:47
Sandeep Kalra13-Oct-08 23:47 
GeneralRe: using lparam parameter of SendMessage function Pin
Simon P Stevens14-Oct-08 0:30
Simon P Stevens14-Oct-08 0:30 
GeneralRe: using lparam parameter of SendMessage function Pin
Sandeep Kalra14-Oct-08 0:52
Sandeep Kalra14-Oct-08 0:52 
GeneralRe: using lparam parameter of SendMessage function Pin
Simon P Stevens14-Oct-08 2:47
Simon P Stevens14-Oct-08 2:47 
QuestionRe: using lparam parameter of SendMessage function Pin
Mark Salsbery14-Oct-08 4:42
Mark Salsbery14-Oct-08 4:42 
AnswerRe: using lparam parameter of SendMessage function Pin
Sandeep Kalra14-Oct-08 18:23
Sandeep Kalra14-Oct-08 18:23 
I have the handle of that window to which i wanted to send the message.

I have also found that the PostMessage API which has same parameters as that of SendMessage ,is working fine.

Declared this above in code

[DllImport("user32.dll",EnteryPoint="PostMessage"]
public static extern bool PostMessage(int hwnd,int msg,int wparam,int lparam)

[DllImport("user32.dll",EnteryPoint="SendMessage"]
public static extern int SendMessage(int hwnd,int msg,int wparam,int lparam)


I am transferribg same parameters to the PostMessage and SendMessage by declaring them public ,on two different button_click event on my form

Button with a PostMessage is working fine.But button_click with SendMessage is not working at all.I am not getting any warning, error or runtime errror.


Also found that WM_KILLFOCUS,WM_QUIT are not working on PostMessage.However WM_CLOSE ,WM_KEYDOWN,WM_KEYUP worked fine.


I do not know whats wrong(sure not coding).Please suggest.

And I also want to know whic among SendMessage and PostMessage is more reliable
AnswerRe: using lparam parameter of SendMessage function [modified] Pin
#realJSOP13-Oct-08 23:49
professional#realJSOP13-Oct-08 23:49 
QuestionAjax modal pop extender query Pin
dsaikrishna13-Oct-08 22:18
dsaikrishna13-Oct-08 22:18 
QuestionInvalid character while using xmldocument.load? Pin
.NetRams13-Oct-08 20:32
.NetRams13-Oct-08 20:32 
AnswerRe: Invalid character while using xmldocument.load? Pin
Guffa13-Oct-08 20:34
Guffa13-Oct-08 20:34 
AnswerRe: Invalid character while using xmldocument.load? Pin
Brij13-Oct-08 22:56
mentorBrij13-Oct-08 22:56 
AnswerRe: Invalid character while using xmldocument.load? Pin
Jakob Olsen14-Oct-08 0:58
Jakob Olsen14-Oct-08 0:58 
JokeRe: Invalid character while using xmldocument.load? Pin
Guffa14-Oct-08 2:51
Guffa14-Oct-08 2:51 
GeneralRe: Invalid character while using xmldocument.load? Pin
Mark Salsbery14-Oct-08 4:46
Mark Salsbery14-Oct-08 4:46 
QuestionHelp in WMI Pin
lal001213-Oct-08 20:20
lal001213-Oct-08 20:20 
AnswerRe: Help in WMI Pin
Uros Calakovic14-Oct-08 4:38
Uros Calakovic14-Oct-08 4:38 
QuestionXML as DataBase Pin
E_Gold13-Oct-08 19:58
E_Gold13-Oct-08 19:58 
AnswerRe: XML as DataBase Pin
bcozican13-Oct-08 20:10
bcozican13-Oct-08 20:10 
GeneralRe: XML as DataBase Pin
E_Gold13-Oct-08 20:33
E_Gold13-Oct-08 20:33 
GeneralRe: XML as DataBase Pin
bcozican13-Oct-08 20:56
bcozican13-Oct-08 20:56 
AnswerRe: XML as DataBase Pin
Guffa13-Oct-08 20:38
Guffa13-Oct-08 20:38 
GeneralRe: XML as DataBase Pin
E_Gold13-Oct-08 22:15
E_Gold13-Oct-08 22:15 
AnswerRe: XML as DataBase Pin
Guffa13-Oct-08 22:45
Guffa13-Oct-08 22:45 

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.