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
Partager