Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically adding a Microsoft Common Dialog Box
Message
 
À
12/10/2001 11:55:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00567698
Message ID:
00568471
Vues:
15
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform