If CheckBox1.Checked = True Then
Me.Size = New Point(437, 590)
Else
Me.Size = New Point(437, 447)
End If
I am trying to get my form to change size based on whether a checkbox is checked or not. this is my code but it says that
I feel REALLY stupid not knowing this one. Anyone help?Code:Value of type 'String' cannot be converted to 'System.Drawing.Size'.
Code:Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick If CheckBox1.Checked = True Then Me.Size = "437, 590" Else Me.Size = "437, 447" End If End Sub End Class
If CheckBox1.Checked = True Then
Me.Size = New Point(437, 590)
Else
Me.Size = New Point(437, 447)
End If
muddy175 (06-10-2011)
Or you could do thisAnother thing, you really don't need this in a timer. Just double click your checkbox and add the code there.Code:Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick If CheckBox1.Checked = True Then Me.Size = New System.Drawing.Size(437, 590) Else Me.Size = New System.Drawing.Size(437, 447) End If End Sub
Last edited by MugNuf; 06-09-2011 at 08:06 PM.
muddy175 (06-10-2011)
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Marked solved.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)