|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Rollover button sampelHello, does anyone has a simple sample of a rollover button control? I need
to asign 2 images, one for mouse enter, and otherone for mose leave. I tried to make one, but I cant asign same images form the resources of the project Thank you I think this is what you are looking for:
Public Class MyButton Inherits System.Windows.Forms.Button Private m_TempImage As System.Drawing.Image Private m_MouseOverImage As System.Drawing.Image Public Property MouseOverImage() As System.Drawing.Image Get Return m_MouseOverImage End Get Set(ByVal value As System.Drawing.Image) m_MouseOverImage = value End Set End Property Private Sub MyButton_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter m_TempImage = Me.Image Me.Image = m_MouseOverImage End Sub Private Sub MyButton_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave Me.Image = m_TempImage End Sub End Class Tony Show quoteHide quote "Manekurt" wrote: > Hello, does anyone has a simple sample of a rollover button control? I need > to asign 2 images, one for mouse enter, and otherone for mose leave. I tried > to make one, but I cant asign same images form the resources of the project > Thank you > > > Thank you, that worked perfect!!
Thanx! manek Show quoteHide quote "tlkerns" <tlke***@discussions.microsoft.com> escribió en el mensaje news:7470828D-B43C-4D20-BD17-D37F724726DF@microsoft.com... >I think this is what you are looking for: > > Public Class MyButton > Inherits System.Windows.Forms.Button > > Private m_TempImage As System.Drawing.Image > Private m_MouseOverImage As System.Drawing.Image > Public Property MouseOverImage() As System.Drawing.Image > Get > Return m_MouseOverImage > End Get > Set(ByVal value As System.Drawing.Image) > m_MouseOverImage = value > End Set > End Property > > Private Sub MyButton_MouseEnter(ByVal sender As Object, ByVal e As > System.EventArgs) Handles Me.MouseEnter > m_TempImage = Me.Image > Me.Image = m_MouseOverImage > End Sub > > Private Sub MyButton_MouseLeave(ByVal sender As Object, ByVal e As > System.EventArgs) Handles Me.MouseLeave > Me.Image = m_TempImage > End Sub > End Class > > Tony > > "Manekurt" wrote: > >> Hello, does anyone has a simple sample of a rollover button control? I >> need >> to asign 2 images, one for mouse enter, and otherone for mose leave. I >> tried >> to make one, but I cant asign same images form the resources of the >> project >> Thank you >> >> >>
bring an already running app to the front
Loading CrystalReports.rpt, I Am Asked To Enter Login ID And Password DAAB problem most natural behavior on mouse wheel Upload a file in a web server with a WinForm Lost focus ChartFX Slowness how do I get date and time of compilation MSHTML: Search and update Object required |
|||||||||||||||||||||||