Computing.Net > Forums > Programming > Resize a form in VB 2008

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Resize a form in VB 2008

Reply to Message Icon

Name: go_places_puterwize
Date: November 26, 2007 at 23:29:32 Pacific
OS: Vista Home Premium
CPU/Ram: AMD64 1.8Ghz Dual Core/1G
Product: HP Compaq Presario F700
Comment:

Hi, I am working on a little app for fun, its pretty basic, type in the box, hit enter, and depending on what option you have set, it displays a warning box, or alert, or error, just a little fun thing, but i want the window to expand when i hit "options", this is what I have:
Private Sub options_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles options.Click

If Me.Size.Height = "75" Then
Me.Size = New Size(156, 75)
End If

If Me.Size.Height = "161" Then
Me.Size = New Size(156, 75)
End If


End Sub

============================
it always seems not to want to stay that size. How can i make it stay?

Curiousity only injured the cat.
I finished it off..
Muahahaha...



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: December 1, 2007 at 09:16:09 Pacific
Reply:

it always seems not to want to stay that size.
How so?


0

Response Number 2
Name: MarkM
Date: January 8, 2008 at 07:45:07 Pacific
Reply:

The Height property is an Integer so comparing it to a string eg. "75" will evaluate to false.

Therefore your method won't do anything.
:-D


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Send line to bat file PRE test



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Resize a form in VB 2008

Drawing a shape in VB - pls help!! www.computing.net/answers/programming/drawing-a-shape-in-vb-pls-help/5355.html

delete a record in vb www.computing.net/answers/programming/delete-a-record-in-vb/4129.html

Master-Detail Form in VB - How? www.computing.net/answers/programming/masterdetail-form-in-vb-how/2506.html