Jolis boutons avec animation Appui pour Feuille Excel

Jolis boutons avec animation Appui pour Feuille Excel 1.1

Salut,
Voici une mise à jour ( V1.1)
Les Changements :
Il y a maintenant 6 styles de boutons :
Bouton Bleu
Bouton Vert
Bouton Orange
Bouton Sombre
Bouton Apple
Bouton Néon
jolisBoutonsV1_1.png


La fonction CreatePremiumButton a maintenant un nouveau paramètre Font qui permet de changer le style de la police du texte du bouton.
VB:
VB:
Sub CreatePremiumButton( _
    ByVal BtnName As String, _
    ByVal Caption As String, _
    ByVal PosX As Double, _
    ByVal PosY As Double, _
    ByVal BtnWidth As Double, _
    ByVal BtnHeight As Double, _
    ByVal Style As BTN_STYLE, _
    ByVal MacroToCall As String, _
    Font As BTN_FONT, _
    Optional ByVal BaseColor As Long = -1)

avec BTN_FONT :
Code:
Public Type BTN_FONT
    Name As String
    Size As Double
    Color As Long
    Bold As Boolean
    Italic As Boolean
End Type

Il y a aussi la fonction DefaultFont qui permet de créer une police par défaut :
Code:
Public Function DefaultFont() As BTN_FONT
    With DefaultFont
        .Name = "Segoe UI Semibold"
        .Size = 13
        .Color = RGB(255, 255, 255)
        .Bold = True
        .Italic = False
    End With
End Function
exemple d'utilisation :
VB:
Sub CreateAllDemoButtons()
    Dim MyFont As BTN_FONT, x As Long
    For x = 0 To 3
    MyFont = DefaultFont()
    MyFont.Size = MyFont.Size - (x * 1.5)
    ' ==============================
    ' BOUTON BLEU
    ' ==============================
    CreatePremiumButton _
        "BTN_SAVE" & CStr(x), _
        ChrW(10003) & " SAUVER", _
        20 + (x * 130), 20, _
        120 - (x * 15), 30 - (x * 4), _
        btn_blue, _
        "ActionSave", _
        MyFont
    MyFont.Color = 0
    ' ==============================
    ' BOUTON GREEN
    ' ==============================
    CreatePremiumButton _
        "BTN_GREEN" & CStr(x), _
        ChrW(9743) & " Téléphone", _
        20 + (x * 130), 65, _
        120 - (x * 15), 30 - (x * 4), _
        btn_green, _
        "ActionStart", _
        MyFont
   Next x
End Sub
Dans le classeur de démo , il y a maintenant aussi un formulaire qui permet de voir les icones unicode disponibles :
VisuSymboles.png


Nullosse.
  • J'aime
Réactions: Michel1745
Retour