Click here to Skip to main content
16,012,223 members
Home / Discussions / C#
   

C#

 
GeneralRe: Refreshing a page at frequent intervals Pin
Pete O'Hanlon8-Dec-06 2:27
mvePete O'Hanlon8-Dec-06 2:27 
GeneralRe: Refreshing a page at frequent intervals Pin
meeram39511-Dec-06 23:54
meeram39511-Dec-06 23:54 
Questionethernet comm instead of serial Pin
faladrim7-Dec-06 23:09
faladrim7-Dec-06 23:09 
AnswerRe: ethernet comm instead of serial Pin
Ed.Poore7-Dec-06 23:13
Ed.Poore7-Dec-06 23:13 
GeneralRe: ethernet comm instead of serial Pin
faladrim7-Dec-06 23:21
faladrim7-Dec-06 23:21 
GeneralRe: ethernet comm instead of serial Pin
Ed.Poore8-Dec-06 7:40
Ed.Poore8-Dec-06 7:40 
QuestionPostMessage(WM_CLOSE) Pin
Dewald7-Dec-06 22:37
Dewald7-Dec-06 22:37 
AnswerRe: PostMessage(WM_CLOSE) Pin
Luc Pattyn8-Dec-06 2:00
sitebuilderLuc Pattyn8-Dec-06 2:00 
What is the problem ?

You can post or send messages to any process, it needs PInvoke and a prototype such as
the one below (argument types may vary, depending on what you need exactly).

[DllImport("user32.dll", EntryPoint="SendMessageA", CallingConvention=CallingConvention.StdCall)] 
private static extern int SendMessage(int Hdc, uint Msg_Const, int wParam, int lParam);


For WM_CLOSE you would need Msg_Const==0x10, wParam=0, lParam=0.

It only becomes tricky when you want to post/send another message that needs a pointer
to something, since that pointer then must be valid in the target process (there are some
articles on this on CP).

Smile | :)

Luc Pattyn

GeneralRe: PostMessage(WM_CLOSE) Pin
Dewald8-Dec-06 3:11
Dewald8-Dec-06 3:11 
GeneralRe: PostMessage(WM_CLOSE) Pin
Luc Pattyn8-Dec-06 4:54
sitebuilderLuc Pattyn8-Dec-06 4:54 
QuestionDeterming SQL Express Instance name using C# Pin
wasife7-Dec-06 22:05
wasife7-Dec-06 22:05 
AnswerRe: Determing SQL Express Instance name using C# Pin
Ed.Poore7-Dec-06 23:14
Ed.Poore7-Dec-06 23:14 
QuestionHow to Use Sql Transactions With DataRow ? Pin
hdv2127-Dec-06 21:55
hdv2127-Dec-06 21:55 
QuestionSelect more than one subitem in ListView Pin
Sarvan AL7-Dec-06 21:16
Sarvan AL7-Dec-06 21:16 
AnswerRe: Select more than one subitem in ListView Pin
Ed.Poore7-Dec-06 23:15
Ed.Poore7-Dec-06 23:15 
QuestionException:System.IndexOutOfRangeException (Urgent) Pin
Saira Tanwir7-Dec-06 21:15
Saira Tanwir7-Dec-06 21:15 
AnswerRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
chravisankar7-Dec-06 21:21
chravisankar7-Dec-06 21:21 
AnswerRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
Saira Tanwir7-Dec-06 21:37
Saira Tanwir7-Dec-06 21:37 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
chravisankar7-Dec-06 21:47
chravisankar7-Dec-06 21:47 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
Saira Tanwir7-Dec-06 21:55
Saira Tanwir7-Dec-06 21:55 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
chravisankar7-Dec-06 22:02
chravisankar7-Dec-06 22:02 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
quiteSmart7-Dec-06 22:02
quiteSmart7-Dec-06 22:02 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
Saira Tanwir7-Dec-06 22:08
Saira Tanwir7-Dec-06 22:08 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
quiteSmart7-Dec-06 22:16
quiteSmart7-Dec-06 22:16 
GeneralRe: Exception:System.IndexOutOfRangeException (Urgent) Pin
Saira Tanwir7-Dec-06 22:26
Saira Tanwir7-Dec-06 22: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.