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
  1. Home
  2. General Programming
  3. C#
  4. Show proccess window

Show proccess window

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Scalee
    wrote on last edited by
    #1

    Im trying to open a minimized window, How would i do this? I tryed sendmessage(handle, 0x0112, ** , 0) ** = WM_SHOWWINDOW and WM_SETFOCUS both didnt work. Help please.

    M S 2 Replies Last reply
    0
    • S Scalee

      Im trying to open a minimized window, How would i do this? I tryed sendmessage(handle, 0x0112, ** , 0) ** = WM_SHOWWINDOW and WM_SETFOCUS both didnt work. Help please.

      M Offline
      M Offline
      Mark Greenwood
      wrote on last edited by
      #2

      On my wrong computer right now so don't have access to MSDN - but try WM_RESTOREWINDOW(or whatever it's called) or WM_MAXIMIZE - essentially Show Window is used when the window is hidden (different from minimized), and set focus just set's the focus, it won't restore it from it's minimized position.

      1 Reply Last reply
      0
      • S Scalee

        Im trying to open a minimized window, How would i do this? I tryed sendmessage(handle, 0x0112, ** , 0) ** = WM_SHOWWINDOW and WM_SETFOCUS both didnt work. Help please.

        S Offline
        S Offline
        Skippums
        wrote on last edited by
        #3

        [DllImport("user32.dll")]
        private static extern bool ShowWindow(IntPtr winHandle, uint op);

        public enum SW : uint {
        HIDE = 0,
        SHOWNORMAL = 1,
        NORMAL = 1,
        SHOWMINIMIZED = 2,
        SHOWMAXIMIZED = 3,
        MAXIMIZE = 3,
        SHOWNOACTIVATE = 4,
        SHOW = 5,
        MINIMIZE = 6,
        SHOWMINNOACTIVE = 7,
        SHOWNA = 8,
        RESTORE = 9,
        SHOWDEFAULT = 10,
        FORCEMINIMIZE = 11
        }

        ...
        ShowWindow(handle, (uint)SW.SHOW);
        ...

        Jeff

        S 1 Reply Last reply
        0
        • S Skippums

          [DllImport("user32.dll")]
          private static extern bool ShowWindow(IntPtr winHandle, uint op);

          public enum SW : uint {
          HIDE = 0,
          SHOWNORMAL = 1,
          NORMAL = 1,
          SHOWMINIMIZED = 2,
          SHOWMAXIMIZED = 3,
          MAXIMIZE = 3,
          SHOWNOACTIVATE = 4,
          SHOW = 5,
          MINIMIZE = 6,
          SHOWMINNOACTIVE = 7,
          SHOWNA = 8,
          RESTORE = 9,
          SHOWDEFAULT = 10,
          FORCEMINIMIZE = 11
          }

          ...
          ShowWindow(handle, (uint)SW.SHOW);
          ...

          Jeff

          S Offline
          S Offline
          Scalee
          wrote on last edited by
          #4

          Thanks! Works perfectly!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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