Sauver le code ci-dessous et créer un exécutable (Exemple : Code Selector)
Code : Tout sélectionner
Define.s Message, FontName, FontStyle
Define.i FontSize, n
Result = FontRequester("Arial", 10, 0, RGB(0, 0, 0), #False)
If result
If SelectedFontStyle()
FontStyle=", "
If SelectedFontStyle() & #PB_Font_Bold
FontStyle + "#PB_Font_Bold"
EndIf
If SelectedFontStyle() & #PB_Font_Italic
FontStyle + "#PB_Font_Italic"
EndIf
If SelectedFontStyle() & #PB_Font_StrikeOut
FontStyle + "#PB_Font_StrikeOut"
EndIf
If SelectedFontStyle() & #PB_Font_Underline
FontStyle + "#PB_Font_Underline"
EndIf
If SelectedFontStyle() & #PB_Font_HighQuality
FontStyle + "#PB_Font_HighQuality"
EndIf
FontStyle = ReplaceString(FontStyle, "#PB", "|#PB",0, 4)
EndIf
Message = "LoadFont(#PB_Any, " + Chr(34)+SelectedFontName()+Chr(34) +", " + Str(SelectedFontSize()) + FontStyle +")"
SetClipboardText(Message)
HandleIDESci=Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
SendMessage_(HandleIDESci, #WM_PASTE,0,0)
EndIf