Vb.NET - Resize a Button Dynamically by using AutoSize



Uses AutoSize to dynamically resize a button to the length of its text.

'Assembly: System.Drawing.dll
'Assembly: System.Windows.Forms.dll

'Namespace: System
'Namespace: System.Drawing
'Namespace: Microsoft.VisualBasic

'Dim buttonName AS Button = "Button1" 

buttonName.AutoSize = True

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.