|
-
Dec 22nd, 2003, 09:22 AM
#1
Thread Starter
Frenzied Member
win Forms properties and objects [RESOLVED]
I'm reading a book right now and the author is demonstrating how you alter the properties of your forms at run-time. He goes on to say that in order to alter the size, for example, you create a size object (new system.drawing.size(x,x)) and then assign th the new object to the form's size property (me.size = new system.drawing.size(x,x)).
my question is this: why can't you simply go: me.size = (x,x) or dim x as integer (assign it a number) dim x2 as integer(same thing) and then go...me.size = x, x2 ..why can't you do that?
Exactly WHEN do you know you need to create an object to be used as a variable? And, you don't really HAVE to use the entire string..system.drawing.size(x,x)..do you? Couldnt you go...new size(x,x) instead?
Am I even CLOSE? Or am I waaaaay off track here?
Last edited by Andy; Dec 29th, 2003 at 03:19 AM.
-
Dec 22nd, 2003, 01:34 PM
#2
Sleep mode
Well , because the size property of the form accepts Size object only .
It should look something like this :
VB Code:
Public Property FormSize(ByVal siz As Size)
Get
Return siz
End Get
Set(ByVal Value)
siz = Value
End Set
End Property
continue reading ...
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
|