Click here to Skip to main content
15,917,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionForm Resize [modified][Solved] Pin
AshSofDev24-Oct-09 17:04
AshSofDev24-Oct-09 17:04 
I have a form with a text box in a toolstrip. I would like to make the width of the textbox relative to the form size when the form is resized. The following code works fine except when you click the restore button from a maximized state.


Private Sub frmMain_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        ToolStripTextBox1.Width = Me.Width - 325
    End Sub



Is there a way to get the restore button to work properly?

Thanks

Got this From another forum

Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        ToolStripTextBox1.TextBox.Width = Me.Width - 325
        ToolStripTextBox1.Overflow = ToolStripItemOverflow.Never
    End Sub


modified on Sunday, October 25, 2009 11:25 AM

AnswerRe: Form Resize Pin
Dave Kreskowiak24-Oct-09 17:07
mveDave Kreskowiak24-Oct-09 17:07 
GeneralRe: Form Resize Pin
AshSofDev24-Oct-09 17:11
AshSofDev24-Oct-09 17:11 
GeneralRe: Form Resize Pin
Dave Kreskowiak24-Oct-09 17:19
mveDave Kreskowiak24-Oct-09 17:19 
GeneralRe: Form Resize Pin
AshSofDev24-Oct-09 17:38
AshSofDev24-Oct-09 17:38 
GeneralRe: Form Resize Pin
Andy_L_J24-Oct-09 17:21
Andy_L_J24-Oct-09 17:21 
GeneralRe: Form Resize Pin
AshSofDev24-Oct-09 17:37
AshSofDev24-Oct-09 17:37 
AnswerRe: Form Resize Pin
DaveAuld25-Oct-09 0:10
professionalDaveAuld25-Oct-09 0:10 
GeneralRe: Form Resize Pin
Dave Kreskowiak25-Oct-09 7:57
mveDave Kreskowiak25-Oct-09 7:57 
GeneralRe: Form Resize Pin
DaveAuld25-Oct-09 8:05
professionalDaveAuld25-Oct-09 8:05 
QuestionHelp Please - SAPI repeat problem [Solved] Pin
quadrilateral24-Oct-09 16:35
quadrilateral24-Oct-09 16:35 
AnswerRe: Help Please - SAPI repeat problem Pin
Dave Kreskowiak24-Oct-09 17:08
mveDave Kreskowiak24-Oct-09 17:08 
GeneralRe: Help Please - SAPI repeat problem Pin
quadrilateral24-Oct-09 17:11
quadrilateral24-Oct-09 17:11 
GeneralRe: Help Please - SAPI repeat problem Pin
Andy_L_J24-Oct-09 17:30
Andy_L_J24-Oct-09 17:30 
GeneralRe: Help Please - SAPI repeat problem Pin
quadrilateral24-Oct-09 17:46
quadrilateral24-Oct-09 17:46 
QuestionNeed Help Pin
kruegersck24-Oct-09 8:28
kruegersck24-Oct-09 8:28 
AnswerRe: Need Help Pin
Dave Kreskowiak24-Oct-09 8:49
mveDave Kreskowiak24-Oct-09 8:49 
AnswerRe: Need Help Pin
Christian Graus24-Oct-09 10:24
protectorChristian Graus24-Oct-09 10:24 
Questionvb6 and datagrid Pin
sw9mba24-Oct-09 1:32
sw9mba24-Oct-09 1:32 
AnswerRe: vb6 and datagrid Pin
Christian Graus24-Oct-09 10:47
protectorChristian Graus24-Oct-09 10:47 
Questionset groupbox view in different from Pin
paya1pa23-Oct-09 23:22
paya1pa23-Oct-09 23:22 
AnswerRe: set groupbox view in different from Pin
Dave Kreskowiak24-Oct-09 2:59
mveDave Kreskowiak24-Oct-09 2:59 
QuestionList box Help Pin
PAguilar0923-Oct-09 19:10
PAguilar0923-Oct-09 19:10 
AnswerRe: List box Help Pin
Christian Graus23-Oct-09 19:39
protectorChristian Graus23-Oct-09 19:39 
QuestionPowerShell cmdlet Pin
Archdeacon23-Oct-09 17:55
Archdeacon23-Oct-09 17:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.