Click here to Skip to main content
15,912,504 members
Home / Discussions / C#
   

C#

 
AnswerRe: Page.RegisterStartupScript("PopupScript", popupScript); Pin
indianet9-Nov-06 9:52
indianet9-Nov-06 9:52 
GeneralRe: Page.RegisterStartupScript("PopupScript", popupScript); Pin
Jagannatha1089-Nov-06 9:54
Jagannatha1089-Nov-06 9:54 
GeneralRe: Page.RegisterStartupScript("PopupScript", popupScript); Pin
Guffa9-Nov-06 13:58
Guffa9-Nov-06 13:58 
AnswerRe: Page.RegisterStartupScript("PopupScript", popupScript); Pin
Guffa9-Nov-06 14:00
Guffa9-Nov-06 14:00 
QuestionEnvironment Variables not Updating Pin
jgallen239-Nov-06 7:53
jgallen239-Nov-06 7:53 
AnswerRe: Environment Variables not Updating Pin
Ami Bar9-Nov-06 9:29
Ami Bar9-Nov-06 9:29 
GeneralRe: Environment Variables not Updating Pin
jgallen239-Nov-06 9:33
jgallen239-Nov-06 9:33 
GeneralRe: Environment Variables not Updating Pin
Ami Bar9-Nov-06 10:10
Ami Bar9-Nov-06 10:10 
If you have WinForm application you can override the WndProc method:

public class Form1 : Form
{
    private const int WM_SETTINGCHANGE = 0x001A;

    public Form1()
    {
        InitializeComponent();
    }

    protected override void WndProc(ref Message m)
    {
        // This is a message code that is sent when system-wide setting is changed
        if (WM_SETTINGCHANGE == m.Msg)
        {
            if (m.LParam != IntPtr.Zero)
            {
                // Convert the LParam to string 
                string whatChanged = System.Runtime.InteropServices.Marshal.PtrToStringAuto(m.LParam);

                // Check if an Environment variable was changed 
                if (null != whatChanged && "Environment" == whatChanged)
                {
                    // Here goes the code that updates your application
                    MessageBox.Show("Environment variable changed");
                }
            }
        }
        // Don't forget to execute the message so the GUI will work.
        base.WndProc(ref m);
    }
}


Ami
QuestionScreen Shot Pin
Jad Jadallah9-Nov-06 6:54
Jad Jadallah9-Nov-06 6:54 
AnswerRe: Screen Shot Pin
Jun Du9-Nov-06 7:54
Jun Du9-Nov-06 7:54 
AnswerRe: Screen Shot Pin
Eric Dahlvang9-Nov-06 10:59
Eric Dahlvang9-Nov-06 10:59 
QuestionHow to list the shared folders for an IP Address Pin
AmitDey9-Nov-06 6:50
AmitDey9-Nov-06 6:50 
Question[Message Deleted] Pin
gr8est_chic9-Nov-06 6:49
gr8est_chic9-Nov-06 6:49 
AnswerRe: URGENT help needed Pin
Guffa9-Nov-06 7:42
Guffa9-Nov-06 7:42 
AnswerRe: URGENT help needed Pin
ednrgc9-Nov-06 9:40
ednrgc9-Nov-06 9:40 
AnswerRe: URGENT help needed Pin
Professor Sharada Ulhas9-Nov-06 10:16
Professor Sharada Ulhas9-Nov-06 10:16 
AnswerRe: URGENT help NEEDEED Pin
Guffa9-Nov-06 7:46
Guffa9-Nov-06 7:46 
General[Message Deleted] Pin
gr8est_chic9-Nov-06 8:00
gr8est_chic9-Nov-06 8:00 
GeneralRe: URGENT help NEEDEED Pin
Christian Graus9-Nov-06 9:07
protectorChristian Graus9-Nov-06 9:07 
GeneralRe: URGENT help NEEDEED Pin
Drew McGhie9-Nov-06 9:21
Drew McGhie9-Nov-06 9:21 
GeneralRe: URGENT help NEEDEED Pin
gr8est_chic9-Nov-06 23:21
gr8est_chic9-Nov-06 23:21 
QuestionHow to list the shared folders for an IP Address Pin
AmitDey9-Nov-06 6:48
AmitDey9-Nov-06 6:48 
QuestionChange datagridview scrollbar color Pin
Mertli Ozgur Nevres9-Nov-06 6:23
Mertli Ozgur Nevres9-Nov-06 6:23 
AnswerRe: Change datagridview scrollbar color Pin
led mike9-Nov-06 6:49
led mike9-Nov-06 6:49 
GeneralRe: Change datagridview scrollbar color Pin
Mertli Ozgur Nevres9-Nov-06 22:05
Mertli Ozgur Nevres9-Nov-06 22: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.