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. Collecting Forms from phisical path!

Collecting Forms from phisical path!

Scheduled Pinned Locked Moved C#
questiondatabase
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.
  • M Offline
    M Offline
    mrcooll
    wrote on last edited by
    #1

    hello 4 all, how can i create an object from " phisical Form files " at run time! m asking becouse i want to insert into DB all buttons name in all forms in som Directory! and if i couldnt is there any way to include\execlude Forms from aproject programaticly? :confused: any suggestions would be highly welcomed!!!! :doh:

    M D 3 Replies Last reply
    0
    • M mrcooll

      hello 4 all, how can i create an object from " phisical Form files " at run time! m asking becouse i want to insert into DB all buttons name in all forms in som Directory! and if i couldnt is there any way to include\execlude Forms from aproject programaticly? :confused: any suggestions would be highly welcomed!!!! :doh:

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      mrcooll wrote:

      how can i create an object from " phisical Form files " at run time!

      What kind form? :confused:

      M 1 Reply Last reply
      0
      • M Manas Bhardwaj

        mrcooll wrote:

        how can i create an object from " phisical Form files " at run time!

        What kind form? :confused:

        M Offline
        M Offline
        mrcooll
        wrote on last edited by
        #3

        Windows application form on framework 2.0

        1 Reply Last reply
        0
        • M mrcooll

          hello 4 all, how can i create an object from " phisical Form files " at run time! m asking becouse i want to insert into DB all buttons name in all forms in som Directory! and if i couldnt is there any way to include\execlude Forms from aproject programaticly? :confused: any suggestions would be highly welcomed!!!! :doh:

          M Offline
          M Offline
          Manas Bhardwaj
          wrote on last edited by
          #4

          mrcooll wrote:

          how can i create an object from " phisical Form files " at run time!

          You dont have physical forms on your disk once you build and deploy the application.

          M 1 Reply Last reply
          0
          • M Manas Bhardwaj

            mrcooll wrote:

            how can i create an object from " phisical Form files " at run time!

            You dont have physical forms on your disk once you build and deploy the application.

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

            hi, and thank u for trying to help me, m devloping an application that collect information "Forms, Controls,etc... " about other application before deploying it. which means that i have the whole project files that m collecting its information. private void GenerateNodes(DirectoryInfo dinfo) { //here i got all of the form names and its files FileInfo[] files = dinfo.GetFiles("*.resx",SearchOption.AllDirectories); //or FileInfo[] files = dinfo.GetFiles "*.AnyFormExtintion",SearchOption.AllDirectories); //or FileInfo[] files = dinfo.GetFiles("*.cs",SearchOption.AllDirectories); //or FileInfo[] files = dinfo.GetFiles("*.vb",SearchOption.AllDirectories); } What i need is a way to create an object from these forms to iterat over its controls. Thx.

            P 1 Reply Last reply
            0
            • M mrcooll

              hello 4 all, how can i create an object from " phisical Form files " at run time! m asking becouse i want to insert into DB all buttons name in all forms in som Directory! and if i couldnt is there any way to include\execlude Forms from aproject programaticly? :confused: any suggestions would be highly welcomed!!!! :doh:

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #6

              You cant create a form file from scratch at run time. What you can do is manually create controls on an form by calling the constructors of each control dynamically. You'll have to do all the setup that is normally done at design time manually. Look at what the constructor does behind the scenes to create each control on your existing forms.

              Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

              1 Reply Last reply
              0
              • M mrcooll

                hi, and thank u for trying to help me, m devloping an application that collect information "Forms, Controls,etc... " about other application before deploying it. which means that i have the whole project files that m collecting its information. private void GenerateNodes(DirectoryInfo dinfo) { //here i got all of the form names and its files FileInfo[] files = dinfo.GetFiles("*.resx",SearchOption.AllDirectories); //or FileInfo[] files = dinfo.GetFiles "*.AnyFormExtintion",SearchOption.AllDirectories); //or FileInfo[] files = dinfo.GetFiles("*.cs",SearchOption.AllDirectories); //or FileInfo[] files = dinfo.GetFiles("*.vb",SearchOption.AllDirectories); } What i need is a way to create an object from these forms to iterat over its controls. Thx.

                P Offline
                P Offline
                Pete OHanlon
                wrote on last edited by
                #7

                One way to do this is to load the file names in and compile[^] them up using the CodeDOM.

                Deja View - the feeling that you've seen this post before.

                My blog | My articles

                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