Imports System.Drawing Public Class YOUR CLASS NAME Inherits Windows.Forms.Button Public Sub New() Me.Size = New Point(32, 32) Me.FlatStyle = Windows.Forms.FlatStyle.Flat Me.FlatAppearance.BorderSize = 0 Me.FlatAppearance.BorderColor = System.Drawing.Color.Gray Me.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent Me.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent Me.BackColor = System.Drawing.Color.Transparent Me.BackgroundImage = My.Resources.YOUR NORMAL IMAGE Me.BackgroundImageLayout = Windows.Forms.ImageLayout.Stretch Me.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) End Sub Private Sub Backbutton_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown Me.BackgroundImage My.Resources = your mouse click the image End Sub Private Sub Backbutton_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter Me.BackgroundImage = My.Resources.YOUR MOUSE ON IMAGE End Sub Private Sub Backbutton_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave Me.BackgroundImage = My.Resources.YOUR NORMAL IMAGE End Sub Private Sub Backbutton_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp Me.BackgroundImage = My.Resources.YOUR MOUSE ON IMAGE End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)