Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jiugarte

@jiugarte
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • exit, minimize, maximize buttons on the form title bar
    J jiugarte

    try it. private const int SC_CLOSE = 0xF060; private const int SC_MAXIMIZE = 0xF030; private const int SC_MINIMIZE = 0xF020; private const int SC_RESTORE = 0xF120; private const int MF_GRAYED = 0x1; [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert); [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern int EnableMenuItem(IntPtr hMenu, int wIDEnableItem, int wEnable); private void Disable_opt() { EnableMenuItem(GetSystemMenu(this.Handle, false), SC_CLOSE, MF_GRAYED); EnableMenuItem(GetSystemMenu(this.Handle, false), SC_MAXIMIZE, MF_GRAYED); EnableMenuItem(GetSystemMenu(this.Handle, false), SC_MINIMIZE, MF_GRAYED); EnableMenuItem(GetSystemMenu(this.Handle, false), SC_RESTORE, MF_GRAYED); } :)

    C# tutorial question

  • How can I go to the last visited tab when the current tab is removed?
    J jiugarte

    to use a variable doesn't just solve the problem. for instance if you turn off 2 or more tabs consecutively it won't work. if you use a routine that allows to include and to remove several tabs then it should use a LIFO. when eliminating a tab it removes all the occurrences of this in the LIFO and go back to the last tab of the LIFO. :)

    C# question help

  • exit, minimize, maximize buttons on the form title bar
    J jiugarte

    to remove. go to publishing Designer selects the form and change the property ControlBox to false. to intercept. public const int WM_SYSCOMMAND = 0x0112; public const int SC_CLOSE = 0xF060; protected override void WndProc(ref Message m) { if( m.Msg == WM_SYSCOMMAND) { if( (int) m.WParam.ToInt32() == SC_CLOSE ) { if (ProjectIsOpen) { return; } else { this.Close(); Application.Exit(); } } } base.WndProc (ref m); } :)

    C# tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups