PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Programatically setting fonts

Reply

Programatically setting fonts

 
Thread Tools Rate Thread
Old 08-07-2003, 03:27 AM   #1
David Webb
Guest
 
Posts: n/a
Default Programatically setting fonts


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
Old 08-07-2003, 04:50 AM   #2
Alex Feinman [MVP]
Guest
 
Posts: n/a
Default Re: Programatically setting fonts

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

"David Webb" <google@winbasic.com.au> wrote in message
news:158dc356.0307071927.b01c54@posting.google.com...
> 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
Old 08-07-2003, 05:19 AM   #3
David Webb
Guest
 
Posts: n/a
Default Re: Programatically setting fonts

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
Old 08-07-2003, 06:10 AM   #4
Alex Feinman [MVP]
Guest
 
Posts: n/a
Default Re: Programatically setting fonts

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


"David Webb" <anonymous@devdex.com> wrote in message
news:%232FJ8BRRDHA.1976@TK2MSFTNGP11.phx.gbl...
> 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
Rate This Thread
Rate This Thread:

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