View Single Post
Old Sep 18th, 2005, 8:05 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I don't have VB docs, but there are a number examples on the net with your exact syntax. Perhaps there's a constraint if it isn't instantiated with the right constructor....
Quote:
Originally Posted by 4GuysFromRolla
Dim lblMessage as New Label()

...

Pretty simple, eh? Next, we need to set the various Label properties we're interested in. For this example, let's set the Text and the Font.Bold property:

lblMessage.Text = "Hello, World!"
lblMessage.Font.Bold = True
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote