Bonjour,
Je suis en train d'apprendre à créer mes boutons personnalisés, mais j'ai un petit soucis.
J'ai créer ajouter une autre class à ma solution du nom de ImageButton dans laquelle je met mes méthodes (dont la surcharge de OnPaint).
Dans mon Form1.cs principale j'ai alors voulu ajouté les lignes suivantes:
J'obtiens une erreur pour chaque ligne ou j'ai imageButton1
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 public Form1() { InitializeComponent(); imageButton1 = new ImageButton(); imageButton1.Image = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("ImageButtonProject.doorin2.gif")); imageButton1.Location = new Point(30, 50); imageButton1.Size = new Size(44, 34); imageButton1.Click+=new EventHandler(imageButton1_Click); this.Controls.Add(imageButton1); }Je ne vois pas comment m'y prendre pour la retirer.Le nom imageButtin1 n'existe pas dans le contexte actuel.
Merci pour votre aide







Répondre avec citation
Partager