Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically adding a Microsoft Common Dialog Box
Message
 
To
12/10/2001 11:55:46
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00567698
Message ID:
00568471
Views:
14
Hi,
you can create and use Common Dialog control as a COM object. But you have to initialize ALL required properties before:
ComDlg = CreateObject("MSComDlg.CommonDialog")

ComDlg.Flags = 0x102	&& cdlCFPrinterFonts + cdlCFEffects
ComDlg.FontName = "Arial"
ComDlg.FontSize = 9
ComDlg.ShowFont()

ComDlg.DialogTitle = "Select a file:"
ComDlg.Flags = 0x1000	&& cdlOFNFileMustExist
ComDlg.Filter = "Text (*.txt)|*.txt|Pictures (*.bmp;*.ico)|*.bmp;*.ico"
ComDlg.MaxFileSize = 266
ComDlg.ShowOpen()
? ComDlg.FileName

ComDlg.ShowColor()
_Screen.BackColor = ComDlg.Color
>Does anyone know what parameters I need to pass in my AddObject() command in order to add a 'Microsoft Common Dialog Control 6.0' to my form programmatically?
>
>Also, where can I find information like this for futture reference?
Previous
Reply
Map
View

Click here to load this message in the networking platform