Click here to Skip to main content
15,917,795 members
Home / Discussions / C#
   

C#

 
GeneralDrag object between tab pages Pin
RoyceF22-Mar-05 6:45
RoyceF22-Mar-05 6:45 
GeneralRe: Drag object between tab pages Pin
Nick Parker22-Mar-05 16:50
protectorNick Parker22-Mar-05 16:50 
Generalregular expressions exclusion and alternation Pin
Anonymous22-Mar-05 4:51
Anonymous22-Mar-05 4:51 
GeneralDTS FLAT File Pin
vchalla22-Mar-05 4:23
vchalla22-Mar-05 4:23 
GeneralRe: DTS FLAT File Pin
Joshua Lunsford22-Mar-05 11:40
Joshua Lunsford22-Mar-05 11:40 
GeneralUser selected color dropout Pin
montu337722-Mar-05 4:21
montu337722-Mar-05 4:21 
GeneralScreen Saver Enabling/Disabling Pin
B D Richardson22-Mar-05 4:21
B D Richardson22-Mar-05 4:21 
GeneralRe: Screen Saver Enabling/Disabling Pin
Heath Stewart22-Mar-05 5:47
protectorHeath Stewart22-Mar-05 5:47 
I would first suggest you don't use magic numbers like 17, but instead define them as constants (typically using the same name as their native equivalent):
const int SPI_SETSCREENSAVEACTIVE = 0x0011; // 17
const int SPIF_UPDATEINIFILE = 0x01; // 1
const int SPIF_SENDCHANGE = 0x02; // 2
You should also consider setting the last parameter to SPIF_UPDATEINIFILE | SPIF_SENDCHANGE to make sure the setting is persisted and to make sure that other apps are notified if the screensaver is disabled, even if temporary (apps that handle the message may react in certain ways as required by their functionality). What could possibly be the problem is that Windows doesn't realize the screensaver has been disabled (at least some component of it). I've always send SPIF_SENDCHANGE at the very least and have never run into this problem.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Screen Saver Enabling/Disabling Pin
B D Richardson22-Mar-05 22:13
B D Richardson22-Mar-05 22:13 
GeneralRe: Screen Saver Enabling/Disabling Pin
B D Richardson23-Mar-05 1:39
B D Richardson23-Mar-05 1:39 
GeneralRe: Screen Saver Enabling/Disabling Pin
Heath Stewart23-Mar-05 12:43
protectorHeath Stewart23-Mar-05 12:43 
GeneralWorking with DNS class Pin
vad_kr22-Mar-05 3:39
vad_kr22-Mar-05 3:39 
GeneralRe: Working with DNS class Pin
leppie22-Mar-05 4:13
leppie22-Mar-05 4:13 
GeneralRe: Working with DNS class Pin
stinGfasT22-Mar-05 9:06
stinGfasT22-Mar-05 9:06 
GeneralRe: Working with DNS class Pin
Anonymous22-Mar-05 9:25
Anonymous22-Mar-05 9:25 
GeneralSearching DataSets with multiple strings Pin
Joshua Lunsford22-Mar-05 3:27
Joshua Lunsford22-Mar-05 3:27 
GeneralSystem.NullReferenceException occurred in Unknown Module Pin
AO-Action22-Mar-05 1:36
AO-Action22-Mar-05 1:36 
GeneralRe: System.NullReferenceException occurred in Unknown Module Pin
Robert Rohde22-Mar-05 2:05
Robert Rohde22-Mar-05 2:05 
GeneralRe: System.NullReferenceException occurred in Unknown Module Pin
AO-Action22-Mar-05 2:31
AO-Action22-Mar-05 2:31 
QuestionHow to get text on screen Pin
levgiang22-Mar-05 0:39
levgiang22-Mar-05 0:39 
AnswerRe: How to get text on screen Pin
leppie22-Mar-05 1:07
leppie22-Mar-05 1:07 
AnswerRe: How to get text on screen Pin
Dave Kreskowiak22-Mar-05 4:48
mveDave Kreskowiak22-Mar-05 4:48 
Generallist view goes blank Pin
maheshfour21-Mar-05 23:12
maheshfour21-Mar-05 23:12 
GeneralRe: list view goes blank Pin
Dave Kreskowiak22-Mar-05 4:45
mveDave Kreskowiak22-Mar-05 4:45 
Generaltabs in tree view Pin
Anonymous21-Mar-05 23:05
Anonymous21-Mar-05 23:05 

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.