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. Embed an EXE in a frame within your program

Embed an EXE in a frame within your program

Scheduled Pinned Locked Moved C#
comhostingtutorialquestion
7 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.
  • G Offline
    G Offline
    Goaty65109
    wrote on last edited by
    #1

    Hey all. First all let me say I am following this guide here: [^] I simply cannot just change the exe (notepad) to another application, it just doesn't work. What can I do to alter this so something like an emulator can have the same effect? I see in the notes below this project that many users have issues getting this to work with something other than notepad. I am also open to resources/guides much newer than this, just through my research I have found this to be the 'simplest' way of accomplishing what I am after. Thanks for any assistance!

    D A 2 Replies Last reply
    0
    • G Goaty65109

      Hey all. First all let me say I am following this guide here: [^] I simply cannot just change the exe (notepad) to another application, it just doesn't work. What can I do to alter this so something like an emulator can have the same effect? I see in the notes below this project that many users have issues getting this to work with something other than notepad. I am also open to resources/guides much newer than this, just through my research I have found this to be the 'simplest' way of accomplishing what I am after. Thanks for any assistance!

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

      The technique is also a hack and not guaranteed to work with all applications. There will simply be some applications that do not render properly when you parent their window to another application. But, you may want to look at this[^] as an alternative to the article you're linking to.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      G 1 Reply Last reply
      0
      • D Dave Kreskowiak

        The technique is also a hack and not guaranteed to work with all applications. There will simply be some applications that do not render properly when you parent their window to another application. But, you may want to look at this[^] as an alternative to the article you're linking to.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        G Offline
        G Offline
        Goaty65109
        wrote on last edited by
        #3

        Yeah I tried that as well, it works as intended, but you can still move the application around inside and resize and such. Is there a way to cut off the bnorders so it can only be resized via the application I create?

        D D 2 Replies Last reply
        0
        • G Goaty65109

          Yeah I tried that as well, it works as intended, but you can still move the application around inside and resize and such. Is there a way to cut off the bnorders so it can only be resized via the application I create?

          D Offline
          D Offline
          DaveyM69
          wrote on last edited by
          #4

          You can set Window Styles after creating using SetWindowLongPtr[^] followed by a call to SetWindowPos[^]. Not all styles can be changed, but if the ones you need can be then it should work for you.

          Dave
          Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

          1 Reply Last reply
          0
          • G Goaty65109

            Hey all. First all let me say I am following this guide here: [^] I simply cannot just change the exe (notepad) to another application, it just doesn't work. What can I do to alter this so something like an emulator can have the same effect? I see in the notes below this project that many users have issues getting this to work with something other than notepad. I am also open to resources/guides much newer than this, just through my research I have found this to be the 'simplest' way of accomplishing what I am after. Thanks for any assistance!

            A Offline
            A Offline
            Abhinav S
            wrote on last edited by
            #5

            You don't embed an exe in your program. You can send it out along with your package and call it from your own executable.

            WP Apps - Color Search | Arctic | XKCD | Sound Meter | Speed Dial

            1 Reply Last reply
            0
            • G Goaty65109

              Yeah I tried that as well, it works as intended, but you can still move the application around inside and resize and such. Is there a way to cut off the bnorders so it can only be resized via the application I create?

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

              You will have very limited control over the target window. It's a seperate process from yours. You don't own it and you can't really control how it paints and behaves outside of setting style bits in the window, which was explained to you by the "other Dave".

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak

              G 1 Reply Last reply
              0
              • D Dave Kreskowiak

                You will have very limited control over the target window. It's a seperate process from yours. You don't own it and you can't really control how it paints and behaves outside of setting style bits in the window, which was explained to you by the "other Dave".

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak

                G Offline
                G Offline
                Goaty65109
                wrote on last edited by
                #7

                Thanks, it makes complete sense, as the guy said below I doubt I'll be able to do what I want here. It would explain why Notepad is the only thing that I can get to function correctly, not a big deal was just wanting to fool around with it haha. Thanks for all your input, Daves.

                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