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. A form from a dll

A form from a dll

Scheduled Pinned Locked Moved C#
designhardwarehelptutorialquestion
4 Posts 2 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.
  • C Offline
    C Offline
    c6jones720
    wrote on last edited by
    #1

    Hi all, I was just wondering about the following problem. I often write device drivers for various hardware systems. Often I put all that code in a DLL which can be called by another program. Usually I'll need to put in a form somewhere to allow the user to change parameters and settings. Normally this form is in the program that accesses the dll which is all well and good. Thats all fine, but I got to wondering does anyone know how to put a windows form with buttons and stuff inside a dll? Could I use the forms editor like I would If I was producing an exe or would I have to hard code everything? Its just that I figured it would lead to a much more modular and potentially better design because all the configuration and control is in one place.

    D 1 Reply Last reply
    0
    • C c6jones720

      Hi all, I was just wondering about the following problem. I often write device drivers for various hardware systems. Often I put all that code in a DLL which can be called by another program. Usually I'll need to put in a form somewhere to allow the user to change parameters and settings. Normally this form is in the program that accesses the dll which is all well and good. Thats all fine, but I got to wondering does anyone know how to put a windows form with buttons and stuff inside a dll? Could I use the forms editor like I would If I was producing an exe or would I have to hard code everything? Its just that I figured it would lead to a much more modular and potentially better design because all the configuration and control is in one place.

      D Offline
      D Offline
      darkelv
      wrote on last edited by
      #2

      Just create a C# Class Project and create your forms there, as per normal.

      C 1 Reply Last reply
      0
      • D darkelv

        Just create a C# Class Project and create your forms there, as per normal.

        C Offline
        C Offline
        c6jones720
        wrote on last edited by
        #3

        That was quick! So literally it is just as simple as the process for writing a new exe file then. Thanks I'll have to try it.

        C 1 Reply Last reply
        0
        • C c6jones720

          That was quick! So literally it is just as simple as the process for writing a new exe file then. Thanks I'll have to try it.

          C Offline
          C Offline
          c6jones720
          wrote on last edited by
          #4

          Thanks I tried it and it works just fine. I needed to simply add a form to the dll class and add a method inside the dll that shows the form. Another program can simply call the method inside the dll to display to form. - Thats just great.

          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