Solved

Create run time buttons at runtime

Posted on 2016-11-18
8
18 Views
Last Modified: 2016-11-23
Hello,
How do I create run time buttons placed one below the other.

Cheers
0
Comment
Question by:RIAS
  • 5
  • 2
8 Comments
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
ID: 41892767
Hi Rias,
Can you please explain more?
0
 

Accepted Solution

by:
RIAS earned 0 total points
ID: 41892768
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
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
ID: 41892769
Great ! good one !!
0
 
LVL 27

Expert Comment

by:Ark
ID: 41895176
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:RIAS
ID: 41895235
Hello Ark,

Will try your solution.
0
 

Author Comment

by:RIAS
ID: 41895236
Thanks!
0
 

Author Comment

by:RIAS
ID: 41895238
Moderator,

Can I accept Ark's Solution.
0
 

Author Closing Comment

by:RIAS
ID: 41898886
Found the solution.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now