How to change the notepad Font from VB
Hi,
I want to print a string in notepad. If i print the same string in Lower or Upper cases it should occupy same width in both cases. In that case i want to change the font of notepad How..?
Is there any other porcedure to get the same result ..?
Pls help me.
Re: How to change the notepad Font from VB
Notepad fonts are stored in notepad, not in text file. Notepad will remember
last used fonts. To change it before opening notepad, you should change
vauels in registry (it will not affect already opened instances of notepad, and first instance closed will write its values to registry, thus affecting next opening one!).
Ie: on NT machine:
HKEY_CURRENT_USER\Software\Microsoft\notepad
key = lfFaceName
value = "your font name"
ie:
lfFaceName="Courier New"
dimension:
key = iPointSize
value= points in exadecimal or decimal
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
Re: How to change the notepad Font from VB
Just a hint:
U can get the handle of Note Pad
Then get the Handle of Font Menu.
Then Adopt a technique of invoking that and get ur work done
(I have not tried!!!)
Good Luck
Srinika