Changing Dimensions

Do you know of any tutorial videos online that offer help with programming or have you made a helpfull video then please share them in here.
4 posts Page 1 of 1
Contributors
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Changing Dimensions
mikethedj4
Code: Select all
Me.Size = New System.Drawing.Size(160, 120)
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Re: Changing Dimensions
mikethedj4
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.
Code: Select all
   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.
Last edited by mikethedj4 on Fri Jul 08, 2011 6:58 am, edited 1 time in total.
User avatar
Bomberman
Just Registered
Just Registered
Posts: 7
Joined: Sat Jul 17, 2010 2:00 pm

Re: Changing Dimensions
Bomberman
good technique
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Re: Changing Dimensions
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.
4 posts Page 1 of 1
Return to “Videos”