button poblem.
-
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
-
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
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
-
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
are you missing this ?? Me.Controls.Add(b1) ;)
When you get mad...THINK twice that the only advice Tamimi - Code
-
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
You forgot to add the button to the
Form.Controls
set. UseMe.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.
-
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
-
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
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
-
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