|
-
October 10th, 2001, 05:32 PM
#1
Dialog Box's
Do's anyone know who to create a basic Cfont dialog box and a CColor palette dialog box.
Is there a one liner command code like the MSG command or do I need to contruct this...
Whats code-steps do I need to take to construct one of these so that when I click a Font or Color Menu button a popup window will display showing
a basic Font,Font style,Size,Script & sample window and a color palette window..
Thanks A beginner using VB
Juan Amore
-
October 11th, 2001, 01:36 AM
#2
Re: Dialog Box's
You can use the commondialog controls for that. You can add them to your projects using the projects>components menu. There select 'Microsoft Common Dialog Controls'. Add a button and a commondialogcontrol (i called it CDL) to the form. Then paste following code:
private Sub Command1_Click()
CDL.ShowColor
MsgBox "The selected color is: " & CDL.Color
CDL.ShowFont
MsgBox "The selected font is: " & CDL.FontName & " size " & CDL.FontSize
End Sub
Run the project, press the button. First the color dialog will pop up, after you selected a color, the font dialog will pop up.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|