Bonjour,
Je développe actuellement un complément Outlook qui ajoute une fenêtre de statistique en bas de la fenêtre de composition d'un nouvel email.
Le code fonctionne, mais je ne parviens pas à réduire la hauteur de l'encart réservé aux statiques :
Le code qui génère la fenêtre :
Merci par avance pour votre aide !
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 using System; using System.Windows.Forms; // Ajoute cette ligne using System.ComponentModel; namespace EmailCountingAddIn { partial class EmailStatsControl { private System.ComponentModel.IContainer components = null; private System.Windows.Forms.Label labelEmailsSent; // Pour les emails envoyés private System.Windows.Forms.Label labelRecipientsTouched; // Renommé ici pour correspondre à ton code private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel; /// <summary> /// Nettoyage des ressources utilisées. /// </summary> /// <param name="disposing">true si les ressources managées doivent être supprimées*; sinon, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Code généré par le Concepteur de composants /// <summary> /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas /// le contenu de cette méthode avec l'éditeur de code. /// </summary> private void InitializeComponent() { this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel(); this.labelEmailsSent = new System.Windows.Forms.Label(); this.labelRecipientsTouched = new System.Windows.Forms.Label(); // Renommé ici this.SuspendLayout(); // // flowLayoutPanel // this.flowLayoutPanel.AutoSize = true; this.flowLayoutPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel.Controls.Add(this.labelEmailsSent); this.flowLayoutPanel.Controls.Add(this.labelRecipientsTouched); // Renommé ici this.flowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel.WrapContents = false; // // labelEmailsSent // this.labelEmailsSent.AutoSize = true; this.labelEmailsSent.Margin = new System.Windows.Forms.Padding(0, 0, 0, 5); this.labelEmailsSent.Name = "labelEmailsSent"; this.labelEmailsSent.Text = "Emails envoyés aujourd'hui : 0"; // // labelRecipientsTouched // this.labelRecipientsTouched.AutoSize = true; this.labelRecipientsTouched.Margin = new System.Windows.Forms.Padding(0); // Renommé ici this.labelRecipientsTouched.Name = "labelRecipientsTouched"; this.labelRecipientsTouched.Text = "Destinataires touchés aujourd'hui : 0"; // // EmailStatsControl // this.AutoSize = true; this.Controls.Add(this.flowLayoutPanel); this.Name = "EmailStatsControl"; this.Size = new System.Drawing.Size(150, 50); // Taille ajustée this.ResumeLayout(false); this.PerformLayout(); } #endregion } }
Partager