Click here to Skip to main content
15,905,420 members
Home / Discussions / C#
   

C#

 
Generalcontrolling lcd Pin
Member 208806922-Aug-05 19:44
Member 208806922-Aug-05 19:44 
Generalread more bytes Pin
levi's22-Aug-05 19:44
levi's22-Aug-05 19:44 
GeneralRe: read more bytes Pin
HumanOsc23-Aug-05 0:15
HumanOsc23-Aug-05 0:15 
GeneralRe: read more bytes Pin
levi's23-Aug-05 17:39
levi's23-Aug-05 17:39 
GeneralContext menu in windows explorer Pin
Anonymous22-Aug-05 18:55
Anonymous22-Aug-05 18:55 
GeneralDetect SMTP MailServer Pin
machocr22-Aug-05 17:18
machocr22-Aug-05 17:18 
GeneralOwnerDraw PropertyGrid Pin
Shane Stevens22-Aug-05 15:51
Shane Stevens22-Aug-05 15:51 
GeneralTotal newb needs help. Pin
tomlog22-Aug-05 14:16
tomlog22-Aug-05 14:16 
I'm very much a novice so please make any replies idiot proof. Smile | :)

Here's a snippet of code I'm working on...

RegistryKey regkey;/* new Microsoft.Win32 Registry Key */
regkey = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Session Manager\Environment"); //Set global environment variable
regkey.SetValue("IPv4Pri", ipaddress);
Registry.LocalMachine.Flush();
SendNotifyMessage(HWND_BROADCAST,WM_SETTINGCHANGE,0,0);

Everything works great in that the registry key I wrote is in the registry and will ba available once I reboot. But I was googling and hoping that I don't have to reboot.

I'm trying to get the "SendNotifyMessage(HWND_BROADCAST,WM_SETTINGCHANGE,0,0);" thing to work and having a great amount of difficulty. It doesn't even recognize the SendNotifyMessage method.

Any insights on how I can "publish" my new registry setting so any new windows opened will have the key available?

Any help is greatly appreciated.
GeneralRe: Total newb needs help. Pin
Christian Graus22-Aug-05 14:31
protectorChristian Graus22-Aug-05 14:31 
GeneralRe: Total newb needs help. Pin
tomlog23-Aug-05 6:30
tomlog23-Aug-05 6:30 
GeneralRe: Total newb needs help. Pin
Christian Graus23-Aug-05 13:27
protectorChristian Graus23-Aug-05 13:27 
GeneralProblem getting drag and drop to work between listbox with mode set to MultiExtended Pin
22-Aug-05 13:04
suss22-Aug-05 13:04 
GeneralRe: Problem getting drag and drop to work between listbox with mode set to MultiExtended Pin
Luis Alonso Ramos22-Aug-05 18:58
Luis Alonso Ramos22-Aug-05 18:58 
GeneralRe: Problem getting drag and drop to work between listbox with mode set to MultiExtended Pin
Member 221063323-Aug-05 12:34
Member 221063323-Aug-05 12:34 
Generalcomparing computation Pin
Sasuko22-Aug-05 12:57
Sasuko22-Aug-05 12:57 
GeneralRe: comparing computation Pin
Christian Graus22-Aug-05 13:04
protectorChristian Graus22-Aug-05 13:04 
Generaladding 2 buttons to a data grid Pin
Member 221087122-Aug-05 11:56
Member 221087122-Aug-05 11:56 
GeneralRe: adding 2 buttons to a data grid Pin
Christian Graus22-Aug-05 12:07
protectorChristian Graus22-Aug-05 12:07 
GeneralRe: adding 2 buttons to a data grid Pin
Member 221087122-Aug-05 13:37
Member 221087122-Aug-05 13:37 
GeneralRe: adding 2 buttons to a data grid Pin
Christian Graus22-Aug-05 13:57
protectorChristian Graus22-Aug-05 13:57 
GeneralRe: adding 2 buttons to a data grid Pin
Member 221087122-Aug-05 15:58
Member 221087122-Aug-05 15:58 
GeneralCould you please... Pin
KORCARI22-Aug-05 10:53
KORCARI22-Aug-05 10:53 
GeneralRe: Could you please... Pin
Christian Graus22-Aug-05 10:57
protectorChristian Graus22-Aug-05 10:57 
GeneralRe: Could you please... Pin
KORCARI22-Aug-05 18:01
KORCARI22-Aug-05 18:01 
GeneralRe: Could you please... Pin
Christian Graus22-Aug-05 18:23
protectorChristian Graus22-Aug-05 18:23 

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.