PC Review


Reply
Thread Tools Rate Thread

How to change font size dynamically?

 
 
VB Programmer
Guest
Posts: n/a
 
      4th Sep 2003
How can I change the font size of a text box dynamically?

I tried this but it didn't work. It said 'Size is Read-Only'. Any other
ways around this? Here's the code:
txtDisplay.Font.Size = 10


 
Reply With Quote
 
 
 
 
Ken Tucker
Guest
Posts: n/a
 
      4th Sep 2003
Hi,

Dim fnt As Font

fnt = TextBox1.Font

TextBox1.Font = New Font(fnt.Name, 12, FontStyle.Bold)

Ken

------------------------

"VB Programmer" <growNO-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> How can I change the font size of a text box dynamically?
>
> I tried this but it didn't work. It said 'Size is Read-Only'. Any other
> ways around this? Here's the code:
> txtDisplay.Font.Size = 10
>
>



 
Reply With Quote
 
VB Programmer
Guest
Posts: n/a
 
      4th Sep 2003
Thanks - works great!

"Ken Tucker" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> Dim fnt As Font
>
> fnt = TextBox1.Font
>
> TextBox1.Font = New Font(fnt.Name, 12, FontStyle.Bold)
>
> Ken
>
> ------------------------
>
> "VB Programmer" <growNO-(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > How can I change the font size of a text box dynamically?
> >
> > I tried this but it didn't work. It said 'Size is Read-Only'. Any

other
> > ways around this? Here's the code:
> > txtDisplay.Font.Size = 10
> >
> >

>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      4th Sep 2003
Hello,

"VB Programmer" <growNO-(E-Mail Removed)> schrieb:
> How can I change the font size of a text box dynamically?
>
> I tried this but it didn't work. It said 'Size is Read-Only'. Any other
> ways around this? Here's the code:
> txtDisplay.Font.Size = 10


Quick and Dirty:

\\\
Me.Font = _
New Font( _
Me.Font.FontFamily, _
200, _
Me.Font.Style, _
GraphicsUnit.Pixel _
)
///

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
Chris Dunaway
Guest
Posts: n/a
 
      5th Sep 2003
"Herfried K. Wagner [MVP]" <(E-Mail Removed)> wrote in
news:#1H$(E-Mail Removed):

>
> 200, _
>


You really like BIG fonts don't you?

Chris
 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      5th Sep 2003
"Chris Dunaway" <(E-Mail Removed)> schrieb:
> > 200, _
> >

>
> You really like BIG fonts don't you?


I have a really large monitor.

;-)))

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet


 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change font size, font type, page size etc. permanently? ferroburak Microsoft Word Document Management 2 2nd Jan 2009 03:03 PM
Varying font size dynamically Guy Scharf Microsoft Access Reports 2 5th Nov 2007 02:17 AM
Dynamically changing font size of combo box Martin Walke Microsoft Excel Programming 2 4th Jan 2006 11:51 AM
HTML <font size> tag doesn't change font size Ash Windows XP Internet Explorer 1 31st Dec 2003 10:58 AM
Font Size: Cannot See Change in Font Size using Outlook 2000 or IE6 Surfer Dude Microsoft Outlook Discussion 2 22nd Dec 2003 11:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:33 PM.