|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
fonts at runtimehi there
any one to tell me how to change a textbox font at run time perminantlly so that the user can set the textbox's font one time and rerun the application without change in the font he set (the user set the textbox's font as his default font) assuming that the application uses the microsoft's common font dialog box and the textbox is indexed in an array thank you "elwaly" <elmoizw***@mobifree.net> schrieb: If you are using .NET 2.0:> any one to tell me how to change a textbox font at run time > perminantlly so that the user can set the textbox's font one time and > rerun the application without change in the font he set (the user set > the textbox's font as his default font) assuming that the application > uses the microsoft's common font dialog box and the textbox is indexed > in an array Add a label onto the form. Then add a fontdialog component and a button control. Place the code below in the button's 'Click' event handler: \\\ If Me.FontDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then Me.Label1.Font = Me.FontDialog1.Font End If /// In the design view, select the label control and choose '(ApplicationSettings)' from the "Data" section". Choose '(PropertyBinding)' there and press the "..." button. Then select the 'Font' property in the application settings dialog and add an application setting by selecting "New..." from the combobox on the right side of the 'Font' property in the grid. No additional code is required. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> thank you very much Herfried,
that code is exactlly what I am looking for. thanks again.
Source and design in two windows
SELECT @@IDENTITY Convert double to string How to put all code generated by the designer in external files (VS2005) ? .NET 2.0 Conversion Wizard Flags Me.Cursor? How to use a PDB file login/users/roles in ASP.Net? Read a text file word by word Property 'FlowBreak' accessible only at design mode ? Intermittent VS.Net Pauses during VB.NET code writing |
|||||||||||||||||||||||