I do C # and I'm pretty inexperienced. I have a button with text and an image on it. When I run the program and press the button, the button turns on with the text, but the image remains static.
Does anyone know a workaround?
* EDIT:
this.btnRename.AllowDrop = true; this.btnRename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.btnRename.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.btnRename.Image = ((System.Drawing.Image)(resources.GetObject("btnRename.Image"))); this.btnRename.ImageAlign = System.Drawing.ContentAlignment.TopCenter; this.btnRename.Location = new System.Drawing.Point(675, 3); this.btnRename.Margin = new System.Windows.Forms.Padding(0); this.btnRename.Name = "btnRename"; this.btnRename.Size = new System.Drawing.Size(55, 48); this.btnRename.TabIndex = 7; this.btnRename.Text = "&Rename"; this.btnRename.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.btnRename.UseVisualStyleBackColor = false; this.btnRename.Click += new System.EventHandler(this.btnRename_Click);
Markp source share