You can also add 2 textbox's (textbox1 = width, and textbox2 = height) along with 2 labels that identify which is height, and which is width, but you keep the button, and put down this code.
Private sizew As Integer
Private sizey As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
sizew = TextBox1.Text
sizey = TextBox2.Text
Me.Size = New System.Drawing.Size(sizew, sizey)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = "224"
TextBox2.Text = "134"
End Sub
This is a good technique to use if you have no way users can resize for the form (for whatever reason) and this way they can resize the form theirself.
Re: Changing Dimensions
Posted: Sat Jul 17, 2010 11:43 pm
by Bomberman
good technique
Re: Changing Dimensions
Posted: Sun Jul 18, 2010 12:47 am
by mikethedj4
I'm only using this technique, cause I made a Desktop Webcam Widget called CamDesk, and I was going to work on it yesterday, and noticed I don't have the project file (deleted it on accident a week ago, and forgot I deleted it when I emptied the recycle bin). I didn't back up the icon, codes, or nothing so I had to code everything all over again from scratch, and I added that technique in, cause I don't want people going to the side, and resizing it. So I did this instead.
I had to redesign the gui, icon, and everything which I'm still working on the website.