HighTechTalks DotNet Forums  

Programatically setting fonts

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Programatically setting fonts in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Programatically setting fonts - 07-07-2003 , 11:27 PM






Hi,

In code (vb.net cf), how can I set the font of a label? I am creating
controls at runtime, and want to set the font to courier new as I need
a proportional font so that I can calculate the size of the control
based on the text that I am putting into it.

Thanks in advance!

Regards,

David.

Reply With Quote
  #2  
Old   
Alex Feinman [MVP]
 
Posts: n/a

Default Re: Programatically setting fonts - 07-08-2003 , 12:50 AM






label1.Font = new Font("Courier", 9, FontStyle.Regular)

"David Webb" <google (AT) winbasic (DOT) com.au> wrote

Quote:
Hi,

In code (vb.net cf), how can I set the font of a label? I am creating
controls at runtime, and want to set the font to courier new as I need
a proportional font so that I can calculate the size of the control
based on the text that I am putting into it.

Thanks in advance!

Regards,

David.



Reply With Quote
  #3  
Old   
David Webb
 
Posts: n/a

Default Re: Programatically setting fonts - 07-08-2003 , 01:19 AM



Thanks Alex! Much appreciated! Do you have any ideas how I can get the
equivalent of a recordcount when I'm using an SQLCE DataReader?

Kind Regards,

David.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Alex Feinman [MVP]
 
Posts: n/a

Default Re: Programatically setting fonts - 07-08-2003 , 02:10 AM



You cannot obtain the record count other than by iterating through data
Reader or by modifying your query to return Count(*)


"David Webb" <anonymous (AT) devdex (DOT) com> wrote

Quote:
Thanks Alex! Much appreciated! Do you have any ideas how I can get the
equivalent of a recordcount when I'm using an SQLCE DataReader?

Kind Regards,

David.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.