|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Resize Tab control when windows form resizesHi
I have a windows form and with init I have a tab control. How can I get the tab control to resize, Min/Max as the windows form is resized? Thanks In the Form's resize event code block, insert code changing the tab control's
dimensions relative to the form's. Example: Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize TabControl1.Width = Me.Width - 20 TabControl1.Height = Me.Height - 20 End Sub You can use any arithmetic operator and any values within reason; just depends on what your needs are. Randall Arnold Show quoteHide quote "BrianDH" wrote: > Hi > > I have a windows form and with init I have a tab control. > > How can I get the tab control to resize, Min/Max as the windows form is > resized? > > Thanks > It Works! TY
Show quoteHide quote "Randall Arnold" wrote: > In the Form's resize event code block, insert code changing the tab control's > dimensions relative to the form's. Example: > > Private Sub Form1_Resize(ByVal sender As Object, ByVal e As > System.EventArgs) Handles Me.Resize > TabControl1.Width = Me.Width - 20 > TabControl1.Height = Me.Height - 20 > End Sub > > You can use any arithmetic operator and any values within reason; just > depends on what your needs are. > > Randall Arnold > > "BrianDH" wrote: > > > Hi > > > > I have a windows form and with init I have a tab control. > > > > How can I get the tab control to resize, Min/Max as the windows form is > > resized? > > > > Thanks > > "BrianDH" <Bria***@discussions.microsoft.com> wrote in message Take a look at the Anchor and Dock properties or, if neither ofnews:8C37B8C9-9A9A-4760-BF54-166510A05DB1@microsoft.com... > How can I get the tab control to resize, Min/Max as the windows form > is resized? those do the job, add some code to the Form's Layout event, as in Private Sub Form1_Layout( ... ) handles Form1.Layout With TabControl2 .Location = New Point( 8, 8 ) .Size = New Size( Me.ClientSize.Width - 16 _ Me.ClientSize.Height - 16 _ ) End With End Sub HTH, Phill W.
Simple LookupAccountName (working)
Object variable or With block variable not set. SQL Error How can I get the following functionatilty in Windows Forms ? Read private variables between forms touch screen monitors Terminating a thread Avoiding late binding File locking problem Send a message to a thread |
|||||||||||||||||||||||