• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 42
  • Last Modified:

Create run time buttons at runtime

Hello,
How do I create run time buttons placed one below the other.

Cheers
0
RIAS
Asked:
RIAS
  • 5
  • 2
1 Solution
 
Pawan KumarDatabase ExpertCommented:
Hi Rias,
Can you please explain more?
0
 
RIASAuthor Commented:
Pawan,
Found the solution:

  Dim newButton = New Button()

                ' Add some properties, etc. to the button
                newButton.Text = "Liils : " & IntPositionNumber
                newButton.Location = New Point(739, 67 + int)
                newButton.Size = Me.btnIetails.Size
                Me.Controls.Add(newButton)
                int += 25
0
 
Pawan KumarDatabase ExpertCommented:
Great ! good one !!
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
ArkCommented:
I suggest using flowlayoutpanel:
FlowLayoutPanel1.FlowDirection = FlowDirection.TopDown
For i = 1 To 25
    FlowLayoutPanel1.Controls.Add(New Button With {.Text = "Button_" & i})
 Next

Open in new window

1
 
RIASAuthor Commented:
Hello Ark,

Will try your solution.
0
 
RIASAuthor Commented:
Thanks!
0
 
RIASAuthor Commented:
Moderator,

Can I accept Ark's Solution.
0
 
RIASAuthor Commented:
Found the solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now