Re: FontStyle..

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Armin Zingler (az.nospam_at_freenet.de)
Date: 05/28/04


Date: Sat, 29 May 2004 00:48:48 +0200


"VJ" <vijaybalki@yahoo.com> schrieb
> > > I am just asking how to store FontStyle in a variable and assign
> > > it back again.
> >
> > What's the exact problem? The value is an 'Int32', so you can
> > simply take the value, store it and assign it to the variable
> > later.
>
> We have a situtation were we are letting the user change font in a
> Textbox. How do I store the Font Information of the TextBox and then
> show it back..
>
> Say like...
>
> Dim intFntStyle as Int32
> intFntStyle = TextBox1.Font.FontStyle

Why FontStyle? The property name is Style

> Dim intReadFntStyle as Int32
> 'intReadFntStyle <- value from file
> TextBox1.Font.FontStyle = intReadFntStyle
>
> The above looks good to me ... but does not compile or work?? How do
> I do something similar...

As the error message - after replacing FontStyle by Style - the property is
read-only. You must create a new font and assign it to the Font property of
the Textbox. See the available constructors of the Font class.

-- 
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


Relevant Pages

  • Re: textbox
    ... blank slideshow and changed the autoshape default ... Arial 24 pt font size. ... What's new in PPT 2007? ... default" does reset the textbox default - but only for this file. ...
    (microsoft.public.powerpoint)
  • Re: Colour Control
    ... NEW - Jan. 28/2000 The Font and Color Dialogs are very easy to call. ... ' Pass the TextBox Control to the function ... > when you open it or have the report retrieve these color numbers from ... >> One button that opens a colour selection popup to set the ...
    (microsoft.public.access.formscoding)
  • RE: Calling function in conditional formatting expression
    ... critical values for each font and font size. ... Dave Hargis, Microsoft Access MVP ... conditional formatting expression of a textbox on a continuous form? ... which accepts the name of a textbox control. ...
    (microsoft.public.access.formscoding)
  • RE: powerpoint texbox issue - font increase randomly in textbox?
    ... file, types in the box, then boom...the font inside the text jumps up many ... "John Wilson" wrote: ... Free PPT Hints, Tips and Tutorials ... textbox in powerpoint and starts typing, ...
    (microsoft.public.powerpoint)
  • Re: Textbox limitation
    ... "Rick Rothstein" wrote in message ... >> I did replace textbox and found a problem right off the bat. ... How do I change the font name? ... Using the richtext box, it shows each line as it was drawn. ...
    (microsoft.public.vb.general.discussion)