Soyez le premier à donner votre avis sur cette source.
Vue 3 856 fois - Téléchargée 272 fois
'------------------------------------------------------------------------- 'Attention le ComboBox doit avoir sa propriété "style" sur "DropDownList" '------------------------------------------------------------------------- Private Sub Combo1_Click() Text1.Font = Combo1.List(Combo1.ListIndex) Text1 = Text2 'certaines police reste en italique, donc : Text1.FontItalic = False End Sub Private Sub Form_Load() Dim I 'ici la fonction pour afficher toutes les polices dans le combo For I = 1 To Screen.FontCount - 1 Combo1.AddItem Screen.Fonts(I) Next I Combo1.Text = "Times New Roman" HScroll1.Min = 8 HScroll1.Max = 200 Label1 = HScroll1.Value Text2 = "Texte Exemple" Text1.Alignment = 2 End Sub Private Sub Form_Resize() 'evite un plantage si la form est réduite dans la barre des tâches If Form1.WindowState = 1 Then Exit Sub 'donne une taille minimum à la form If Form1.Height < 3315 Then Form1.Height = 3315 If Form1.Width < 9765 Then Form1.Width = 9765 Combo1.Top = 90 Combo1.Left = 120 Combo1.Width = 2895 HScroll1.Top = 120 HScroll1.Left = 3120 HScroll1.Width = 2295 HScroll1.Height = 255 Label1.Top = 120 Label1.Left = 5640 Label1.Width = 495 Label1.Height = 255 Text2.Top = 105 Text2.Left = 6360 Text2.Width = 3135 Text2.Height = 285 Text1.Top = Combo1.Top + Combo1.Height + 200 Text1.Left = 120 Text1.Width = Form1.Width - 350 Text1.Height = Form1.Height - Text1.Top - 700 End Sub Private Sub HScroll1_Change() Text1.FontSize = HScroll1.Value Label1 = HScroll1.Value Text1 = Text2 End Sub Private Sub text2_Change() Text1 = Text2 End Sub
30 août 2003 à 21:33
15 août 2003 à 04:28
si je mets ça c'est justement que j'ai horreur d'utiliser le common dialog à la con
merci pour ta participation qd même
15 août 2003 à 02:00
ajouter sur la feuille un contrôle Dialogue Commun (CommonDialog1)
et exécuter le code suivant :
CommonDialog1.Flags = cdlCFPrinterFonts ' ou cdlCFScreenFonts ou cdlCFBoth
CommonDialog1.ShowFont
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.