msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set control attributes at runtime

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
John



Joined: 04 Oct 2007
Posts: 1

PostPosted: Mon Oct 23, 2006 9:43 am    Post subject: How to set control attributes at runtime Reply with quote

I need to set a form's properties and included controls' properties at
runtime I have been unable to find out how to set properties at
runtime. For example: Me.Font = New Font(Me.Font, FontStyle.Bold). I
found this after much searching on the web. I am looking for something
that will tell me the syntax that goes on the right side of the "=".
And not just for the form, but buttons, etc.

Any references? Books? Web sites? microsoft.com? Code samples?

Any help appreciated.

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1325

PostPosted: Mon Oct 23, 2006 10:30 am    Post subject: Re: How to set control attributes at runtime Reply with quote

"John" wrote in message@f16g2000cwb.googlegroups.com
> I need to set a form's properties and included controls' properties at
> runtime I have been unable to find out how to set properties at
> runtime. For example: Me.Font = New Font(Me.Font, FontStyle.Bold).

That is VB.Net syntax; if you are using VB.Net or VB 200x then you need to
look for newsgroups with "dotnet" in the name. If you are using VB 6.0 or
earlier then this is the correct group but that syntax will not work because
VB and VB.Net are different languages. In VB you'd use
Me.Font.Bold = True ' newer style
or
Me.FontBold = True ' older style

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
VB attributes Hiya, Could you guys shed some light on VB declarations attributes? Here is the list of attributes I'd like to know the meaning of: VB_Name VB_Base VB_Control VB_Creatable VB_Exposed VB_Ext_KEY VB_HelpID V

Runtime overflow error Hello. I am having troubles getting rid of an overflow error for one line in my code, and I absolutely can't figure out why it's overflowing. This is my simplified code: Private Sub Dim xcoord As Double, ycoord As Double Dim x1 As Double

USB control Does exist a control for the USB port ? It could be as interface to a modem. -- Bent Bek Clausen

Control Array Hello all. I have a small problem here that I would appreciate some help with. I have a form that displays analyte result. The analytes are grouped together in Groups, ie Group 1 has 3 analytes, Group 2 has 12 analytes, Group 3 has 5 analytes. In order to

Control problem I was wondering if anyone knows how to create an instance of a control. I am trying to create Labels and Check boxes as they are needed. Thanks Brian
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group