|
-
Nov 25th, 2005, 03:29 AM
#1
Thread Starter
New Member
-
Nov 25th, 2005, 03:45 AM
#2
Re: Please help! How to handle form events when window is resized?
Isn't there a Form_Resize event in the events combo for your form ¿
VB.NET MVP 2008 - Present
-
Nov 25th, 2005, 03:53 AM
#3
Thread Starter
New Member
Re: Please help! How to handle form events when window is resized?
Where could I find it? I have components on left side and project and properties on the right side of program, but I can't find combo box with events
-
Nov 25th, 2005, 03:56 AM
#4
Lively Member
Re: Please help! How to handle form events when window is resized?
VB Code:
Private Sub Form_Resize()
Dim w As Integer
Dim h As Integer
w = ScaleWidth
h = ScaleHeight
If (w < MIN_WINDOW_SIZE) Then
w = MIN_WINDOW_SIZE
End If
If (h < MIN_WINDOW_SIZE) Then
h = MIN_WINDOW_SIZE
End If
fraCardInfo.Width = w - picCreditCard.Width - BORDER * 3
fraButtons.Width = w - picCreditCard.Width - BORDER * 3
picCreditCard.Left = w - picCreditCard.Width - BORDER
rtbStatusList.Width = w - BORDER * 2
rtbStatusList.Height = h - rtbStatusList.Top - BORDER
End Sub
-
Nov 25th, 2005, 03:59 AM
#5
Thread Starter
New Member
Re: Please help! How to handle form events when window is resized?
Thanks a lot, it works good now.
-
Nov 25th, 2005, 04:34 AM
#6
Re: Please help! How to handle form events when window is resized?
The proper way
Not that using the _Resize event doesn't work, it's just a lot less efficient and you get flickering when you try to make the window too small or too large.
-
Nov 25th, 2005, 06:29 AM
#7
Thread Starter
New Member
Re: Please help! How to handle form events when window is resized?
Using _Resize with limits is really better option, thanks
-
Nov 25th, 2005, 08:48 AM
#8
Re: Please help! How to handle form events when window is resized?
And I'm telling you it isn't the better option, but do as you wish.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|