IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Outils Delphi Discussion :

[INNO SETUP] Problème affichage dernière page


Sujet :

Outils Delphi

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Mars 2019
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mars 2019
    Messages : 7
    Points : 6
    Points
    6
    Par défaut [INNO SETUP] Problème affichage dernière page
    Bonjour à tous,

    Je m'appel Mickael, un peu ancien dans le monde de la programmation, mais nouveau dans la création d'un programme, ou la moindre page concernant Windows ! Et nouveau sur Développez.Net ….

    Aujourd'hui je viens à vous car je bloque un petit peu sur un futur projet qui verra le jour je l'espère …..

    J'ai donc créer un projet VIA le logiciel INNO SETUP afin d'installer un logiciel.

    Sur ma première page, j'ai placé une image en fond prenant tout le cadre, et déplacer les textes ( En utilisant la fonction Hide puis recréer la position des champs….. Code que j'ai pu trouvé "tout fait" sur internet en fonctionnel, mercii google ! =) )

    J'ai également modifié les couleurs des divers bloc, ainsi que l'image du haut, etc de chaque page…. Jusque là, tout va bien !

    Me voici confronté à deux problème sur la dernière page,

    1er problème:

    J'ai la variable Finishedlabel.caption qui me pose problème.
    FLabel2.Caption := WizardForm.Finishedlabel.Caption;

    lorsque je positionne cette variable avant la fonction procedure CurPageChanged(CurPageID: Integer); , celle-ci ne m'affiche pas le texte et me met un Astérix à la place " * "

    Lorsque je la place dans procedure CurPageChanged(CurPageID: Integer); , le texte s'affiche mais toujours l'Astérix aussi.

    Si je la supprime, tout va bien mais aucun texte.

    2ème problème:

    J'aimerais déplacer le bouton "Exécuter MuniXx" , j'ai pu comprendre que c'étais la variable "postinstall" dans le RUN qui me donner cette fonction. Je voudrais la repositionner et modifier width et height de son conteneur "tableaux blanc à l'arrière". Je veux la conserver pour proposer cette possibilité.

    Je ne sais pas si chaque action de mon code est à sa place, ou si j'ai fais de grosse erreur d'écriture/mise en page…. On apprend de nos erreurs ^^ N'étant pas un spécialiste, j'espère sincèrement que quelqu'un pourra m'aider. Si il y à des façons plus simple de générer le même rendu autrement, je suis preneur de toute suggestion / avis / commentaire….

    Merci à vous


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
     
    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
     
    #define MyAppName "MinuXx"
    #define MyAppVersion "1.0"
    #define MyAppPublisher "My Company, Inc."
    #define MyAppURL "http://www.example.com/"
    #define MyAppExeName "Application_m.exe"
     
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
     
    AppId={{6E6837EA-9F0D-4C75-8395-EB15582C7881}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={pf}\{#MyAppName}
    DisableProgramGroupPage=yes
    LicenseFile=C:\Program Files (x86)\Installation_MunixX\licence.txt
    OutputBaseFilename=MinuXx
    Compression=lzma
    SolidCompression=yes
    AllowNoIcons=yes
    DisableWelcomePage=no
    //image
    WizardImageFile=C:\Users\LIEGEOIS MIKA\Downloads\Grande_image.bmp
     
    [Languages]
    Name: "french"; MessagesFile: "compiler:Languages\French.isl"
     
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
     
    [Files]
    Source: "C:\Program Files (x86)\Inno Setup 5\Application_m.exe"; DestDir: "{app}"; Flags: ignoreversion
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
     
    // *****************************************************************
    // ******************* Modification graphique **********************
    // *****************************************************************
    function CloneStaticTextToLabel(StaticText: TNewStaticText): TLabel;
    begin
      Result := TLabel.Create(WizardForm);
      Result.Parent := StaticText.Parent;
      Result.Left := StaticText.Left;
      Result.Top := StaticText.Top;
      Result.Width := StaticText.width;
      Result.Height := StaticText.Height;
      Result.AutoSize := StaticText.AutoSize;
      Result.ShowAccelChar := StaticText.ShowAccelChar;
      Result.WordWrap := StaticText.WordWrap;
      Result.Font := StaticText.Font;
      Result.Transparent := true; 
      StaticText.Visible := False;
    end;
     
    var
      PageDescriptionLabel: TLabel;
      PageNameLabel: TLabel;
      WLabel1, WLabel2,
      FLabel1, FLabel2: TLabel;
      bitmap: TBitmapImage;
     
    procedure InitializeWizard();
    begin
      // Couleur de fond du bloc principal
      WizardForm.InnerPage.Color :=  clwhite;
     
      // Modifier couleur bloc Page au choix
      // Page tâche supplémentaire
      WizardForm.TasksList.color := clwhite;
      // Page rappel tâche supplémentaire
      WizardForm.Readymemo.Color := clwhite;
      WizardForm.Readymemo.Scrollbars := false;
      WizardForm.Readymemo.borderStyle := bsNone;
     
      // Affichage + modification petite image menu supérieur sur toute les pages
      WizardForm.WizardSmallBitmapImage.Bitmap.LoadFromFile('' + 'C:\Users\LIEGEOIS MIKA\Downloads\Petite_image.bmp');
      WizardForm.WizardSmallBitmapImage.Top := 0;
      WizardForm.WizardSmallBitmapImage.Left := 0;
      WizardForm.WizardSmallBitmapImage.Width := 600;
      WizardForm.WizardSmallBitmapImage.Height := 72;
     
      PageNameLabel := CloneStaticTextToLabel(WizardForm.PageNameLabel);
      PageDescriptionLabel := CloneStaticTextToLabel(WizardForm.PageDescriptionLabel);
    end;
     
    procedure CurPageChanged(CurPageID: Integer);
    begin
      // Affichage texte menu supérieur sur toute les pages
      PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption;
      PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;
     
      //Affichage image arrière plan page welcome
      WizardForm.WelcomeLabel1.Hide;
      WizardForm.WelcomeLabel2.Hide; 
     
      WizardForm.WizardBitmapImage.Width := 600;
      WizardForm.WizardBitmapImage.Height := 385;
     
      WLabel1 := TLabel.Create(WizardForm);
      WLabel1.Left := ScaleX(28); 
      WLabel1.Top := ScaleY(27);
      WLabel1.Width := ScaleX(300); 
      WLabel1.Height := ScaleY(54); 
      WLabel1.AutoSize := False;
      WLabel1.WordWrap := True;
      WLabel1.Font.Name := 'verdana'; 
      WLabel1.Font.Size := 12; 
      WLabel1.Font.Style := [fsBold];
      WLabel1.Font.Color:= clBlack; 
      WLabel1.ShowAccelChar := False;
      WLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
      WLabel1.Transparent := True;
      WLabel1.Parent := WizardForm.WelcomePage;
     
      WLabel2 :=TLabel.Create(WizardForm);
      WLabel2.Left := ScaleX(40);
      WLabel2.Top := ScaleY(110); 
      WLabel2.Width := ScaleX(300); 
      WLabel2.Height := ScaleY(234); 
      WLabel2.AutoSize := False;
      WLabel2.WordWrap := True;
      WLabel2.Font.Name := 'tahoma';
      WLabel2.Font.Style := [fsBold];
      WLabel2.Font.Color:= clBlack; 
      WLabel2.ShowAccelChar := False;
      WLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
      WLabel2.Transparent := True;
      WLabel2.Parent := WizardForm.WelcomePage;
     
      //Affichage image arrière plan page finished
      WizardForm.FinishedLabel.Hide;
      WizardForm.FinishedHeadingLabel.Hide;
     
      WizardForm.WizardBitmapImage2.Width := 600; 
      WizardForm.WizardBitmapImage2.Height := 385; 
     
      FLabel1 := TLabel.Create(WizardForm); 
      FLabel1.Left := ScaleX(28); 
      FLabel1.Top := ScaleY(36);
      FLabel1.Width := ScaleX(300); 
      FLabel1.Height := ScaleY(54); 
      FLabel1.AutoSize := False;
      FLabel1.WordWrap := True;
      FLabel1.Font.Name := 'verdana'; 
      FLabel1.Font.Size := 12; 
      FLabel1.Font.Style := [fsBold];
      FLabel1.Font.Color:= clBlack; 
      FLabel1.ShowAccelChar := False;
      FLabel1.Caption := WizardForm.FinishedHeadingLabel.Caption;
      FLabel1.Transparent := True;
      FLabel1.Parent := WizardForm.FinishedPage;
     
      FLabel2 := TLabel.Create(WizardForm);
      FLabel2.Left := ScaleX(40); 
      FLabel2.Top := ScaleY(110);
      FLabel2.Width := ScaleX(300); 
      FLabel2.Height := ScaleY(234); 
      FLabel2.AutoSize := false;
      FLabel2.WordWrap := True;
      FLabel2.Font.Name := 'tahoma'; 
      FLabel2.Font.Color:= clBlack; 
      FLabel2.ShowAccelChar := False;
      FLabel2.Caption := WizardForm.Finishedlabel.Caption;
      FLabel2.Transparent := True;
      FLabel2.Parent := WizardForm.FinishedPage;
    end;
     
    [Icons]
    Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
     
    [Run]
    Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

  2. #2
    Futur Membre du Club
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Mars 2019
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mars 2019
    Messages : 7
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    j'ai pu résoudre mon problème N°2 grâce à la fonction:
    WizardForm.RunList.Left := 300;
    Je chercher désespérément le nom "RunList", pour lui attribué les différent attributs

    Pour le problème N°1, toujours l'Astérix en vue à la place du texte….

    Lorsque je le place dans :
    procedure CurPageChanged(CurPageID: Integer);

    et l'entour de:
    if CurPageID = wpSelectProgramGroup then

    Cela corrige mon problème. Le texte s'affiche. Mais cela me provoque une légère latence…. CurpageID doit avoir 0,5 voir 1 seconde visible à l'œil avant de se lancer…

  3. #3
    Membre confirmé Avatar de blonde
    Femme Profil pro
    Développeur Delphi
    Inscrit en
    Septembre 2003
    Messages
    278
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Delphi

    Informations forums :
    Inscription : Septembre 2003
    Messages : 278
    Points : 477
    Points
    477
    Par défaut
    Salut,

    je n'ai pas compris ce que tu veux faire afficher à ton FLabel2, et à quel moment tu veux l'afficher.

    tu écris :
    FLabel2.Caption := WizardForm.Finishedlabel.Caption;

    Donc si ton FLabel2 affiche "*", c'est que WizardForm.Finishedlabel stocke bien "*" dans le caption.

    Est-ce que tu ne devrais pas tester la valeur de "CurPageID" avant de créer ton FLabel2 et de lui faire afficher du texte ? De ce que je vois de ton code, tu recrées les composants à chaque changement de page, mais c'est peut-être ce que tu veux faire ?

  4. #4
    Membre expérimenté
    Avatar de ouiouioui
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Août 2006
    Messages
    984
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Août 2006
    Messages : 984
    Points : 1 418
    Points
    1 418
    Par défaut
    Bonjour,

    Je vois plusieurs problèmes :
    tu utilises des chemins en dur pour charger les images ce n'est pas possible sur le poste client, il faut inclure le fichier image l'extraire dans le dossier temporaire de l'installation il sera supprimé lorsque l'installation se fermera.
    Dans la procédure "CurPageChanged" tu créer des TLabel à chaque fois que cette procédure est appelée, tu te retrouves donc avec plusieurs labels superposés, et comme le caption Finishedlabel est appliqué à la fin tu te retrouves avec certains TLabel qui ont un * à la place du texte.

    Moi je ferai comme ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
     
    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
     
    #define MyAppName "MinuXx"
    #define MyAppVersion "1.0"
    #define MyAppPublisher "My Company, Inc."
    #define MyAppURL "http://www.example.com/"
    #define MyAppExeName "Application_m.exe"
     
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
     
    AppId={{6E6837EA-9F0D-4C75-8395-EB15582C7881}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={pf}\{#MyAppName}
    DisableProgramGroupPage=yes
    LicenseFile=C:\Program Files (x86)\Installation_MunixX\licence.txt
    OutputBaseFilename=MinuXx
    Compression=lzma
    SolidCompression=yes
    AllowNoIcons=yes
    DisableWelcomePage=no
    //image
    WizardImageFile=C:\Users\LIEGEOIS MIKA\Downloads\Grande_image.bmp
     
    [Languages]
    Name: "french"; MessagesFile: "compiler:Languages\French.isl"
     
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
     
    [Files]
    Source: "V:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion  
    Source: "C:\Users\LIEGEOIS MIKA\Downloads\Petite_image.bmp"; Flags: dontcopy noencryption
     
    [Icons]
    Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
     
    [Run]
    Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
     
    [Code]       
    // *****************************************************************
    // ******************* Modification graphique **********************
    // *****************************************************************
    function CloneStaticTextToLabel(StaticText: TNewStaticText): TLabel;
    begin
      Result := TLabel.Create(WizardForm);
      Result.Parent := StaticText.Parent;
      Result.Left := StaticText.Left;
      Result.Top := StaticText.Top;
      Result.Width := StaticText.width;
      Result.Height := StaticText.Height;
      Result.AutoSize := StaticText.AutoSize;
      Result.ShowAccelChar := StaticText.ShowAccelChar;
      Result.WordWrap := StaticText.WordWrap;
      Result.Font := StaticText.Font;
      Result.Transparent := True; 
      StaticText.Visible := False;
    end;
     
    var
      PageDescriptionLabel, PageNameLabel, WLabel1, WLabel2, FLabel1, FLabel2: TLabel;
     
    procedure InitializeWizard();
    begin
      // Couleur de fond du bloc principal
      WizardForm.InnerPage.Color :=  clwhite;
     
      // Modifier couleur bloc Page au choix
      // Page tâche supplémentaire
      WizardForm.TasksList.Color := clwhite;
     
      // Page rappel tâche supplémentaire
      WizardForm.Readymemo.Color := clwhite;
      WizardForm.Readymemo.Scrollbars := false;
      WizardForm.Readymemo.BorderStyle := bsNone;
     
      WizardForm.RunList.Left := 300;
     
      // On extrait l'image dans le dossier temporaire de l'installation
      ExtractTemporaryFile('Petite_image.bmp');
      // Affichage + modification petite image menu supérieur sur toute les pages
      WizardForm.WizardSmallBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\Petite_image.bmp'));
      WizardForm.WizardSmallBitmapImage.Top := 0;
      WizardForm.WizardSmallBitmapImage.Left := 0;
      WizardForm.WizardSmallBitmapImage.Width := 600;
      WizardForm.WizardSmallBitmapImage.Height := 72;
     
      // Affichage texte menu supérieur sur toute les pages            
      PageNameLabel := CloneStaticTextToLabel(WizardForm.PageNameLabel);    
      PageDescriptionLabel := CloneStaticTextToLabel(WizardForm.PageDescriptionLabel); 
     
      // Affichage image arrière plan page welcome      
      WizardForm.WizardBitmapImage.Width := 600;
      WizardForm.WizardBitmapImage.Height := 385;
     
      // Affichage image arrière plan page finished  
      WizardForm.WizardBitmapImage2.Width := 600; 
      WizardForm.WizardBitmapImage2.Height := 385;     
     
      // On change le TNewStaticText en TLabel    
      WizardForm.WelcomeLabel1.Hide;   
      WLabel1 := TLabel.Create(WizardForm);
      WLabel1.Left := ScaleX(28); 
      WLabel1.Top := ScaleY(27);
      WLabel1.Width := ScaleX(300); 
      WLabel1.Height := ScaleY(54); 
      WLabel1.AutoSize := False;
      WLabel1.WordWrap := True;
      WLabel1.Font.Name := 'verdana'; 
      WLabel1.Font.Size := 12; 
      WLabel1.Font.Style := [fsBold];
      WLabel1.Font.Color:= clBlack; 
      WLabel1.ShowAccelChar := False;
      WLabel1.Caption := WizardForm.WelcomeLabel1.Caption;
      WLabel1.Transparent := True;
      WLabel1.Parent := WizardForm.WelcomePage;
     
      // On change le TNewStaticText en TLabel             
      WizardForm.WelcomeLabel2.Hide; 
      WLabel2 :=TLabel.Create(WizardForm);
      WLabel2.Left := ScaleX(40);
      WLabel2.Top := ScaleY(110); 
      WLabel2.Width := ScaleX(300); 
      WLabel2.Height := ScaleY(234); 
      WLabel2.AutoSize := False;
      WLabel2.WordWrap := True;
      WLabel2.Font.Name := 'tahoma';
      WLabel2.Font.Style := [fsBold];
      WLabel2.Font.Color:= clBlack; 
      WLabel2.ShowAccelChar := False;
      WLabel2.Caption := WizardForm.WelcomeLabel2.Caption;
      WLabel2.Transparent := True;
      WLabel2.Parent := WizardForm.WelcomePage;
     
      // On change le TNewStaticText en TLabel    
      WizardForm.FinishedHeadingLabel.Hide;           
      FLabel1 := TLabel.Create(WizardForm); 
      FLabel1.Left := ScaleX(28); 
      FLabel1.Top := ScaleY(36);
      FLabel1.Width := ScaleX(300); 
      FLabel1.Height := ScaleY(54); 
      FLabel1.AutoSize := False;
      FLabel1.WordWrap := True;
      FLabel1.Font.Name := 'verdana'; 
      FLabel1.Font.Size := 12; 
      FLabel1.Font.Style := [fsBold];
      FLabel1.Font.Color:= clBlack; 
      FLabel1.ShowAccelChar := False;
      FLabel1.Caption := WizardForm.FinishedHeadingLabel.Caption;
      FLabel1.Transparent := True;
      FLabel1.Parent := WizardForm.FinishedPage;
     
      // On change le TNewStaticText en TLabel                            
      WizardForm.FinishedLabel.Hide;
      FLabel2 := TLabel.Create(WizardForm);
      FLabel2.Left := ScaleX(40); 
      FLabel2.Top := ScaleY(110);
      FLabel2.Width := ScaleX(300); 
      FLabel2.Height := ScaleY(234); 
      FLabel2.AutoSize := false;
      FLabel2.WordWrap := True;
      FLabel2.Font.Name := 'tahoma'; 
      FLabel2.Font.Color:= clBlack; 
      FLabel2.ShowAccelChar := False;
      FLabel2.Transparent := True;
      FLabel2.Parent := WizardForm.FinishedPage;
    end;
     
    procedure CurPageChanged(CurPageID: Integer);
    begin
      // A chaque page on applique le caption correspondant
      PageNameLabel.Caption := WizardForm.PageNameLabel.Caption;          
      PageDescriptionLabel.Caption := WizardForm.PageDescriptionLabel.Caption; 
     
      // On est sur la page de fin
      if CurPageID = wpFinished then
      begin
        // On met le caption formaté      
        FLabel2.Caption := WizardForm.Finishedlabel.Caption;    
      end;
    end;
    Il existe 3 sortes de gens: ceux qui savent compter et ceux qui ne savent pas.

  5. #5
    Futur Membre du Club
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Mars 2019
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Moselle (Lorraine)

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mars 2019
    Messages : 7
    Points : 6
    Points
    6
    Par défaut
    Bonjour à vous,

    J'ai remodifié mon code par la suite, et tout placer dans procedure InitializeWizard(); , effectivement je ne veux pas appeler à chaque fois mes Tlabel….

    Mais je ne mettais pas ma fonction :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    FLabel2.Caption := WizardForm.Finishedlabel.Caption;
    dans:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    procedure CurPageChanged(CurPageID: Integer);
    begin
      // On est sur la page de fin
      if CurPageID = wpFinished then
      begin
       Ma fonction
      end;
    end;
    donc j'avais toujours cette étoile !

    Votre code est beaucoup mieux, et fonctionnel à merveille. Par contre j'ai deux questions par rapport à vos commentaires:


    1er: Vous me dite que j'utilise des fichiers dur et pur, celui-ci en est un aussi ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    WizardImageFile=C:\Program Files (x86)\Installation_MuniXx\image\Grande_image.bmp
    Il faudrait que je le mette dans un fichier temporaire comme Petite_image.bmp ?

    2ème:

    J'applique seulement FLabel2 dans CurPageChanged et dans un if curpageID, ne devrais-je pas le faire également pour FLabel1, WLabel1 et WLabel2 ?

    Ce que je ne comprend pas, c'est que seul la variable FLabel2 me faisais le soucis de l'étoile *. Et les autres non, pourtant j'ai effectuer le même procéder pour les 4.


    Nom : Sans titre 2.jpg
Affichages : 453
Taille : 118,6 Ko

    Voila en image, je voulais redéfinir les positions de tout mes éléments et leur mettre un fond transparent afin d'avoir une grande image en fond.

    Mais le texte m'afficher *.

    OuiOuiOui -> Réponse au top

    Merci à vous deux =)

  6. #6
    Membre expérimenté
    Avatar de ouiouioui
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Août 2006
    Messages
    984
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Août 2006
    Messages : 984
    Points : 1 418
    Points
    1 418
    Par défaut
    Concernant les liens en dure pour WizardImageFile le compilateur de l'installateur va inclure le fichier image dans le fichier d'installation.

    pour FLabel2 c'est du au fait que l'installeur va mettre le message dans WizardForm.Finishedlabel.Caption seulement lorsque la page de fin s'affiche ce qui n'est pas le cas des trois autres variables.
    Il existe 3 sortes de gens: ceux qui savent compter et ceux qui ne savent pas.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 3
    Dernier message: 25/08/2017, 17h01
  2. [Inno Setup] Problème avec GetFileversion()
    Par Frimouss dans le forum Outils
    Réponses: 4
    Dernier message: 11/10/2008, 19h56
  3. [Inno-Setup] Problème sur XP : Run-time error '429'
    Par lucas67 dans le forum Installation, Déploiement et Sécurité
    Réponses: 2
    Dernier message: 27/07/2007, 09h47
  4. [HTML] Problème affichage de page HTML et page web
    Par °°° Zen-Spirit °°° dans le forum Balisage (X)HTML et validation W3C
    Réponses: 13
    Dernier message: 18/07/2006, 14h02
  5. Inno setup, probléme
    Par nightcyborg dans le forum Autres éditeurs
    Réponses: 2
    Dernier message: 18/04/2006, 15h47

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo