Détecter lorsqu'un nouvel écran est connecté

Détecter lorsqu'un nouvel écran est connecté

Regardez ici :http://msdn.microsoft.com/en-us/library/system.windows.forms.control.wndproc.aspx

Il y a un exemple qui devrait vous aider. Essayez quelque chose comme ceci :

protected override void WndProc(ref Message m) 
{
    const uint WM_DISPLAYCHANGE = 0x007e;

    // Listen for operating system messages. 
    switch (m.Msg)
    {
        case WM_DISPLAYCHANGE:

            // The WParam value is the new bit depth
            uint width = (uint)(m.LParam & 0xffff);
            uint height = (uint)(m.LParam >> 16);
            break;                
    }
    base.WndProc(ref m);
}