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. button poblem.

button poblem.

Scheduled Pinned Locked Moved Visual Basic
csharpgraphicshelp
7 Posts 5 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
    amaneet
    wrote on last edited by
    #1

    Sir/Madam, I am using the following code to display the button dynamically in vb.net 2005. But the button is not appearing. Dim b1 As New System.Windows.Forms.Button b1.Name = "pankaj" b1.Text = "1" b1.Location = New Point(11, 111) b1.Size = New System.Drawing.Size(100, 130) b1.TabIndex = 2 b1.UseVisualStyleBackColor = True b1.Show() Please help. Thanks and regards Panakj

    C T CPalliniC A N 5 Replies Last reply
    0
    • A amaneet

      Sir/Madam, I am using the following code to display the button dynamically in vb.net 2005. But the button is not appearing. Dim b1 As New System.Windows.Forms.Button b1.Name = "pankaj" b1.Text = "1" b1.Location = New Point(11, 111) b1.Size = New System.Drawing.Size(100, 130) b1.TabIndex = 2 b1.UseVisualStyleBackColor = True b1.Show() Please help. Thanks and regards Panakj

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      You also have to add it to the Controls collection on the form.


      Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website

      1 Reply Last reply
      0
      • A amaneet

        Sir/Madam, I am using the following code to display the button dynamically in vb.net 2005. But the button is not appearing. Dim b1 As New System.Windows.Forms.Button b1.Name = "pankaj" b1.Text = "1" b1.Location = New Point(11, 111) b1.Size = New System.Drawing.Size(100, 130) b1.TabIndex = 2 b1.UseVisualStyleBackColor = True b1.Show() Please help. Thanks and regards Panakj

        T Offline
        T Offline
        Tamimi Code
        wrote on last edited by
        #3

        are you missing this ?? Me.Controls.Add(b1) ;)

        When you get mad...THINK twice that the only advice Tamimi - Code

        1 Reply Last reply
        0
        • A amaneet

          Sir/Madam, I am using the following code to display the button dynamically in vb.net 2005. But the button is not appearing. Dim b1 As New System.Windows.Forms.Button b1.Name = "pankaj" b1.Text = "1" b1.Location = New Point(11, 111) b1.Size = New System.Drawing.Size(100, 130) b1.TabIndex = 2 b1.UseVisualStyleBackColor = True b1.Show() Please help. Thanks and regards Panakj

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #4

          You forgot to add the button to the Form.Controls set. Use

          Me.Controls.Add(b1)

          inside the form.

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

          In testa che avete, signor di Ceprano?

          1 Reply Last reply
          0
          • A amaneet

            Sir/Madam, I am using the following code to display the button dynamically in vb.net 2005. But the button is not appearing. Dim b1 As New System.Windows.Forms.Button b1.Name = "pankaj" b1.Text = "1" b1.Location = New Point(11, 111) b1.Size = New System.Drawing.Size(100, 130) b1.TabIndex = 2 b1.UseVisualStyleBackColor = True b1.Show() Please help. Thanks and regards Panakj

            A Offline
            A Offline
            amaneet
            wrote on last edited by
            #5

            Thanks to all of u.

            1 Reply Last reply
            0
            • A amaneet

              Sir/Madam, I am using the following code to display the button dynamically in vb.net 2005. But the button is not appearing. Dim b1 As New System.Windows.Forms.Button b1.Name = "pankaj" b1.Text = "1" b1.Location = New Point(11, 111) b1.Size = New System.Drawing.Size(100, 130) b1.TabIndex = 2 b1.UseVisualStyleBackColor = True b1.Show() Please help. Thanks and regards Panakj

              N Offline
              N Offline
              Navneet Hegde
              wrote on last edited by
              #6

              I hope you got the answer to your question, but also remember Me.controls.Add() adds control to form so you can also manipulate it to add like groupbox1.controls.add panel.controls.add etc Just take Note of Parent Control

              Develop2Program & Program2Develop

              A 1 Reply Last reply
              0
              • N Navneet Hegde

                I hope you got the answer to your question, but also remember Me.controls.Add() adds control to form so you can also manipulate it to add like groupbox1.controls.add panel.controls.add etc Just take Note of Parent Control

                Develop2Program & Program2Develop

                A Offline
                A Offline
                amaneet
                wrote on last edited by
                #7

                Thanks sir/Madam

                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