본문으로 바로가기


using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace CaptionTimetableSupporet
{
    public partial class MainForm : Form
    {

        // P/Invoke constants
        private const int WM_SYSCOMMAND = 0x112;
        private const int MF_STRING = 0x0;
        private const int MF_SEPARATOR = 0x800;

        // P/Invoke declarations
        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern bool AppendMenu(IntPtr hMenu, int uFlags, int uIDNewItem, string lpNewItem);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        private static extern bool InsertMenu(IntPtr hMenu, int uPosition, int uFlags, int uIDNewItem, string lpNewItem);

        // ID for the About item on the system menu
        private int SYSMENU_ABOUT_ID = 0x1;




        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);

            // Get a handle to a copy of this form's system (window) menu
            IntPtr hSysMenu = GetSystemMenu(this.Handle, false);

            // Add a separator
            AppendMenu(hSysMenu, MF_SEPARATOR, 0, string.Empty);

            // Add the About menu item
            AppendMenu(hSysMenu, MF_STRING, SYSMENU_ABOUT_ID, "&About…");
        }

        protected override void WndProc(ref Message m)
        {
            base.WndProc(ref m);

            // Test if the About item was selected from the system menu
            if ((m.Msg == WM_SYSCOMMAND) && ((int)m.WParam == SYSMENU_ABOUT_ID))
            {
                MessageBox.Show("Custom About Dialog");
            }

        }
    }
}
크리에이티브 커먼즈 라이센스
Creative Commons License

트랙백

http://trudy.kr/trackback/181
  1. sòng bạc FB88

    Trudy ::

    I found a great... 2020/06/04 16:39

  2. sòng bạc FB88

    Trudy ::

    I found a great... 2020/06/04 17:07

  3. đăng ký FB88

    Trudy ::

    I found a great... 2020/06/04 18:42

  4. ecoups.net

    ecoups.net

    Trudy :: [C#] WinForm 시스템 메뉴에 나만의 메뉴 추가하기 2020/06/08 23:05

  5. cedgg.org

    cedgg.org

    Trudy :: [C#] WinForm 시스템 메뉴에 나만의 메뉴 추가하기 2020/06/08 23:07

  6. guysdomain.com.au

    guysdomain.com.au

    Trudy :: [C#] WinForm 시스템 메뉴에 나만의 메뉴 추가하기 2020/06/08 23:12

  7. tiền thưởng SBOBet

    Trudy ::

    I found a great... 2020/06/09 21:29

  8. sòng bạc uy tín SBOBet

    Trudy ::

    I found a great... 2020/06/09 21:50

  9. đăng ký SBOBet

    Trudy ::

    I found a great... 2020/06/09 21:51

  10. tiền thưởng SBOBet

    Trudy ::

    I found a great... 2020/06/09 21:51

  11. sòng bạc trực tuyến SBOBet

    Trudy ::

    I found a great... 2020/06/09 21:59

  12. đăng ký SBOBet

    Trudy ::

    I found a great... 2020/06/09 22:02

  13. sòng bạc trực tuyến SBOBet

    Trudy ::

    I found a great... 2020/06/09 22:43

  14. tiền thưởng SBOBet

    Trudy ::

    I found a great... 2020/06/09 22:46

  15. sòng bạc SBOBet

    Trudy ::

    I found a great... 2020/06/09 23:00

  16. pharmacyreviews2018.com

    pharmacyreviews2018.com

    Trudy :: [C#] WinForm 시스템 메뉴에 나만의 메뉴 추가하기 2020/06/10 13:00

  17. xraju.com

    xraju.com

    Trudy :: [C#] WinForm 시스템 메뉴에 나만의 메뉴 추가하기 2020/06/17 18:10

  18. tiền thưởng tiền gửi Happistar

    Trudy ::

    I found a great... 2020/06/18 00:48

  19. Happistar

    Trudy ::

    I found a great... 2020/06/18 00:51

  20. tiền thưởng Happistar

    Trudy ::

    I found a great... 2020/06/18 01:23

  21. sòng bạc trực tuyến OppaBet

    Trudy ::

    I found a great... 2020/06/26 15:39

  22. đăng ký OppaBet

    Trudy ::

    I found a great... 2020/06/26 15:58

  23. OppaBet

    Trudy ::

    I found a great... 2020/06/26 16:42

  24. tiền thưởng OppaBet

    Trudy ::

    I found a great... 2020/06/26 16:49

  25. sòng bạc trực tuyến OppaBet

    Trudy ::

    I found a great... 2020/06/26 16:56

  26. đăng ký W88

    Trudy ::

    I found a great... 2020/07/03 23:18

  27. đăng ký W88

    Trudy ::

    I found a great... 2020/07/03 23:33

  28. tiền thưởng tiền gửi W88

    Trudy ::

    I found a great... 2020/07/03 23:40

댓글을 달아 주세요

Trudy
Trudy 님의 블로그
MENU
VISITOR 오늘397 / 전체615977