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. WPF
  4. Display System.Windows.Forms.Form as child of Wpf Window

Display System.Windows.Forms.Form as child of Wpf Window

Scheduled Pinned Locked Moved WPF
csharphelpwpfwinformstutorial
5 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.
  • A Offline
    A Offline
    abhinish
    wrote on last edited by
    #1

    Hello all, I am quite new in wpf and i am having some problem in displaying an System.Windows.forms.Form as child of my WPF main window I have a WPF application opening some system.windows.forms.form from WPF menu but the problem is i am unable to make those winforms as child of WPF Main Window because of which i cant show the winform as center parent. Can anybody help me out how to make the WPF Window parent of the windows.forms.form

    abhinav

    realJSOPR 1 Reply Last reply
    0
    • A abhinish

      Hello all, I am quite new in wpf and i am having some problem in displaying an System.Windows.forms.Form as child of my WPF main window I have a WPF application opening some system.windows.forms.form from WPF menu but the problem is i am unable to make those winforms as child of WPF Main Window because of which i cant show the winform as center parent. Can anybody help me out how to make the WPF Window parent of the windows.forms.form

      abhinav

      realJSOPR Online
      realJSOPR Online
      realJSOP
      wrote on last edited by
      #2

      You need to add the WindowsFormsIntegration namespace to your project. For more info, google "WPF Winforms integration". There are many good examples out there.

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      A 1 Reply Last reply
      0
      • realJSOPR realJSOP

        You need to add the WindowsFormsIntegration namespace to your project. For more info, google "WPF Winforms integration". There are many good examples out there.

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        A Offline
        A Offline
        abhinish
        wrote on last edited by
        #3

        thanks John for ur quick reply can you please provide me some helpful links actually i searched a lot but didnt found any apropriate solution

        abhinav

        realJSOPR 1 Reply Last reply
        0
        • A abhinish

          thanks John for ur quick reply can you please provide me some helpful links actually i searched a lot but didnt found any apropriate solution

          abhinav

          realJSOPR Online
          realJSOPR Online
          realJSOP
          wrote on last edited by
          #4

          Well, I don't know what you want to do (and I don't really care), so you're going to have to come up with your own google phrase. The one I provided is merely a starting point. Besides that, if you're not actually co-mingling winforms controls on a WPF form (or the other way around), there really is no magic involved that I can think of. Just create the winforms form and be done with it.

          .45 ACP - because shooting twice is just silly
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

          V 1 Reply Last reply
          0
          • realJSOPR realJSOP

            Well, I don't know what you want to do (and I don't really care), so you're going to have to come up with your own google phrase. The one I provided is merely a starting point. Besides that, if you're not actually co-mingling winforms controls on a WPF form (or the other way around), there really is no magic involved that I can think of. Just create the winforms form and be done with it.

            .45 ACP - because shooting twice is just silly
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

            V Offline
            V Offline
            Valentin Billotte
            wrote on last edited by
            #5

            John, if you want to know just read his post. It's very simple to read and very simple to understand (or do not make this kind of answer). This is a very specific problem and google will not help. And abhinav the WindowsFormsIntegration.dll cannot help you for your problem. Just try to listen Application.Current.Activated and Deactivated event to change the TopMost value of the form. I guess it can be a good beginning...

            Need help ? Ask me :)

            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