Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
GeneralRe: Catch C++ exception in C# Pin
Not Knuth15-Oct-07 8:15
Not Knuth15-Oct-07 8:15 
AnswerRe: Catch C++ exception in C# Pin
Liam O'Hagan15-Oct-07 20:57
Liam O'Hagan15-Oct-07 20:57 
GeneralRe: Catch C++ exception in C# Pin
Not Knuth16-Oct-07 5:26
Not Knuth16-Oct-07 5:26 
AnswerRe: Catch C++ exception in C# Pin
Marshall16-Oct-07 6:11
Marshall16-Oct-07 6:11 
GeneralRe: Catch C++ exception in C# Pin
Not Knuth16-Oct-07 7:47
Not Knuth16-Oct-07 7:47 
QuestionPrevent Monitor Standby and ScreenSaver Activation Pin
Sukhjinder_K15-Oct-07 6:05
Sukhjinder_K15-Oct-07 6:05 
AnswerRe: Prevent Monitor Standby and ScreenSaver Activation Pin
led mike15-Oct-07 6:42
led mike15-Oct-07 6:42 
GeneralSome code which can do the trick Pin
Sukhjinder_K15-Oct-07 6:58
Sukhjinder_K15-Oct-07 6:58 
I got the following suggestion from someone
START
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_SYSCOMMAND:

switch (wParam)
{
// disable screen saver and monitor power-saving mode
case SC_SCREENSAVE:
case SC_MONITORPOWER:

return 0;
}

break;

case WM_DESTROY:

PostQuitMessage(0);

return 0;
}

return DefWindowProc(hwnd, message, wParam, lParam);
}
END

I goggled and tried to find various Constants used and replaced them with their values

protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
//case WM_SYSCOMMAND: //REPLACED
case 0x0112:


switch (m.WParam.ToInt32())
{
// disable screen saver and monitor power-saving mode

//case SC_SCREENSAVE: //REPLACED
case 0xF140:

//case SC_MONITORPOWER: //REPLACED
case 0xF170:

return;
}
break;
//case WM_DESTROY: //REPLACED
case 0003:
PostQuitMessage(0); // Wont Compile in C#
return;
}

base.DefWndProc(ref m);
//return DefWindowProc(hwnd, message, wParam, lParam);
}

NOw the Function PostQuitMessage(0) wont compile and without my whole Control layout goes wrong

I checked the link you provided but being very new to Windows Programming & C# I dont know how to use all this.

So your thoughts...

Thanks...


GeneralRe: Some code which can do the trick Pin
Skippums15-Oct-07 7:30
Skippums15-Oct-07 7:30 
GeneralRe: Some code which can do the trick Pin
Sukhjinder_K15-Oct-07 18:35
Sukhjinder_K15-Oct-07 18:35 
GeneralRe: Some code which can do the trick Pin
Skippums16-Oct-07 5:05
Skippums16-Oct-07 5:05 
GeneralRe: Some code which can do the trick Pin
led mike15-Oct-07 7:41
led mike15-Oct-07 7:41 
GeneralNew to C# and Writing Media Player Pin
Sukhjinder_K15-Oct-07 17:03
Sukhjinder_K15-Oct-07 17:03 
GeneralRe: Some code which can do the trick Pin
Hariharan.R16-Oct-07 2:31
Hariharan.R16-Oct-07 2:31 
AnswerSolution Pin
Sukhjinder_K16-Oct-07 18:27
Sukhjinder_K16-Oct-07 18:27 
QuestionHow to read JavaScript's variables values in webBrowser control using C# Pin
A.Asif15-Oct-07 5:41
A.Asif15-Oct-07 5:41 
AnswerRe: How to read JavaScript's variables values in webBrowser control using C# Pin
led mike15-Oct-07 6:36
led mike15-Oct-07 6:36 
GeneralRe: How to read JavaScript's variables values in webBrowser control using C# Pin
A.Asif15-Oct-07 9:30
A.Asif15-Oct-07 9:30 
GeneralRe: How to read JavaScript's variables values in webBrowser control using C# Pin
leppie16-Oct-07 2:45
leppie16-Oct-07 2:45 
GeneralRe: How to read JavaScript's variables values in webBrowser control using C# Pin
A.Asif16-Oct-07 3:34
A.Asif16-Oct-07 3:34 
QuestionGetting text from one form into second form Pin
MumbleB15-Oct-07 5:37
MumbleB15-Oct-07 5:37 
AnswerRe: Getting text from one form into second form Pin
Giorgi Dalakishvili15-Oct-07 5:46
mentorGiorgi Dalakishvili15-Oct-07 5:46 
Questionhow to track backgroundworker threads Pin
jikubhai15-Oct-07 5:28
jikubhai15-Oct-07 5:28 
AnswerEvent Listeners Pin
Ennis Ray Lynch, Jr.15-Oct-07 5:41
Ennis Ray Lynch, Jr.15-Oct-07 5:41 
AnswerRe: how to track backgroundworker threads Pin
Giorgi Dalakishvili15-Oct-07 5:45
mentorGiorgi Dalakishvili15-Oct-07 5: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.