|
-
Aug 4th, 2009, 12:33 AM
#1
Thread Starter
Fanatic Member
Random Form Resizes
This happened a while ago and it's returned, and I still can't figure it out.
For some reason, a certain Form in my project will change it's size all on it's own right after I call it. It's usually with small forms in the one I'm having a problem with is 95x25 pixels. The only thing on it is a Label with some text in the middle and this code
Code:
Public Class MessageForm
Private Time As Integer = 25
Private Sub fadeTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fadeTimer.Tick
Time -= 1
If Me.Opacity <> 0 Then
If Time < 0 Then Me.Opacity -= 0.01
Else
Me.Close()
End If
End Sub
End Class
As you can see the Form is meant to be a small pop-up that disappears on its own, like a balloon tip.
Anyways I just added it to my project 5 minutes ago and as soon as I tested it out by displaying it with Form.Show(), it randomly changed to 123 by something else during runtime.
I checked all the Form properties for any kind of resize properties and only found AutoScaleMode which was set on font, but set on None made no difference.
Like I said I just added this form and have no code affecting it whatsoever in my entire project except for Form.Show and the code on that form.
For the moment I'm just resizing the form on it's own Load event, and that seems to work, but I'd like to know what is causing this random form resize, any ideas?
-
Aug 4th, 2009, 12:44 AM
#2
Re: Random Form Resizes
The minimum possible size of a form is dependent on the value of the FormBorderStyle property. When the FormBorderStyle is Sizable the minimum possible size is 123 x 34.
-
Aug 4th, 2009, 08:05 AM
#3
Thread Starter
Fanatic Member
Re: Random Form Resizes
My FormBorderStyle is set to none. Is there anyways to increase the minimum size? It's funny because during runtime you can make the form anysize you want so why would it only change when the form loads.
Also just for clarification in Design Mode I have the form set as 95x25 just the way I want it. It changes on it's own during runtime.
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
|