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. Visual Basic
  4. VB6: Form-less app's hwnd

VB6: Form-less app's hwnd

Scheduled Pinned Locked Moved Visual Basic
questioncss
6 Posts 4 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.
  • P Offline
    P Offline
    Pablo ar
    wrote on last edited by
    #1

    How can I get the handle of an app that doesn't have a form? Pablo.ar

    D 1 Reply Last reply
    0
    • P Pablo ar

      How can I get the handle of an app that doesn't have a form? Pablo.ar

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      No window means no hWnd either. What are you trying to do? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      P 1 Reply Last reply
      0
      • D Dave Kreskowiak

        No window means no hWnd either. What are you trying to do? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        P Offline
        P Offline
        Pablo ar
        wrote on last edited by
        #3

        I'm trying to make a screensaver... Wait, let me rephrase that: I swear I'm trying to make a screensaver. With this program, you'll be able to set whatever program to run when the ssvr execs (using the Shell function) or whatever file, to be loaded by the system (using the ShellExecuteEx function, that needs an hWnd to execute). So... Pablo.ar

        D M 2 Replies Last reply
        0
        • P Pablo ar

          I'm trying to make a screensaver... Wait, let me rephrase that: I swear I'm trying to make a screensaver. With this program, you'll be able to set whatever program to run when the ssvr execs (using the Shell function) or whatever file, to be loaded by the system (using the ShellExecuteEx function, that needs an hWnd to execute). So... Pablo.ar

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          I still don't know why you need a hWnd to a window that doesn't exist. Why are you trying to get this? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          • P Pablo ar

            I'm trying to make a screensaver... Wait, let me rephrase that: I swear I'm trying to make a screensaver. With this program, you'll be able to set whatever program to run when the ssvr execs (using the Shell function) or whatever file, to be loaded by the system (using the ShellExecuteEx function, that needs an hWnd to execute). So... Pablo.ar

            M Offline
            M Offline
            MohammadAmiry
            wrote on last edited by
            #5

            Ok I got what you're looking for. Try using a handle to another window that is actually availible. I mean that i.e. use the GetForgroundWindow() API to get an availible handle and pass it to ShellExecute. Or you can use the handle to the Desktop window, etc. Hope it helps.

            A 1 Reply Last reply
            0
            • M MohammadAmiry

              Ok I got what you're looking for. Try using a handle to another window that is actually availible. I mean that i.e. use the GetForgroundWindow() API to get an availible handle and pass it to ShellExecute. Or you can use the handle to the Desktop window, etc. Hope it helps.

              A Offline
              A Offline
              Anonymous
              wrote on last edited by
              #6

              The 'desktop window' is a great idea, I'll investigate if there is such a thing, or something similar (with a handle!) that I can use. Thanks a lot, MohammadAmiry. Pablo.ar

              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