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. Help Me

Help Me

Scheduled Pinned Locked Moved Visual Basic
help
6 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.
  • H Offline
    H Offline
    hamed2009
    wrote on last edited by
    #1

    I want select my form name from combo box and then list my selected form controlsname in list box but selecteditem in combobox is a string and control property for string is not valied please help me

    D C 2 Replies Last reply
    0
    • H hamed2009

      I want select my form name from combo box and then list my selected form controlsname in list box but selecteditem in combobox is a string and control property for string is not valied please help me

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      I can think of two ways. Either use System.Activator.CreateInstanceFrom or have the value member of the combo as the instance of the form.

      H 1 Reply Last reply
      0
      • D dan sh

        I can think of two ways. Either use System.Activator.CreateInstanceFrom or have the value member of the combo as the instance of the form.

        H Offline
        H Offline
        hamed2009
        wrote on last edited by
        #3

        please send me a example for this session

        1 Reply Last reply
        0
        • H hamed2009

          I want select my form name from combo box and then list my selected form controlsname in list box but selecteditem in combobox is a string and control property for string is not valied please help me

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I assume this means you tried using what I told you yesterday, but don't really know much of anything about C# or winforms. Your forms have a Text property which is the title of the window. You can also use GetType().ToString() to get the name of the class. Either way, you really need to read a basic winforms book, so you can understand the answers you're given you should also consider reading the posting guide - help me is obviously useless as a title, everyone posting here wants help.

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          D 1 Reply Last reply
          0
          • C Christian Graus

            I assume this means you tried using what I told you yesterday, but don't really know much of anything about C# or winforms. Your forms have a Text property which is the title of the window. You can also use GetType().ToString() to get the name of the class. Either way, you really need to read a basic winforms book, so you can understand the answers you're given you should also consider reading the posting guide - help me is obviously useless as a title, everyone posting here wants help.

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

            D Offline
            D Offline
            dan sh
            wrote on last edited by
            #5

            Christian Graus wrote:

            You can also use GetType().ToString() to get the name of the class.

            Could not get this. How can you get the instance of form by the a string variable having its text (I guess this is what he asked) using GetType(). Can you show some example?

            C 1 Reply Last reply
            0
            • D dan sh

              Christian Graus wrote:

              You can also use GetType().ToString() to get the name of the class.

              Could not get this. How can you get the instance of form by the a string variable having its text (I guess this is what he asked) using GetType(). Can you show some example?

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              d@nish wrote:

              How can you get the instance of form by the a string variable having its text (I guess this is what he asked) using GetType().

              You don't, that's not what he asked. He asked how to get the open forms, and I said Application.Current.OpenForms ( or something like that ). He's then tried to assign THAT to his combo, instead of getting the strings he wants from there.

              Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

              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