|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to make an user control button with 2 images.. rolloverHello.. can anyone help on how to make a button that has one image an when
mouse over another image like a web rollover? I need some code if there is availablre.. Thank you all! Marcos "Marcos Beccar Varela" <marcosbv@ga m a c o m .com.ar> wrote in Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As news:erVLi$8MFHA.244@tk2msftngp13.phx.gbl: > Hello.. can anyone help on how to make a button that has one image an > when mouse over another image like a web rollover? > I need some code if there is availablre.. Thank you all! > Marcos > > > System.EventArgs) Handles Button1.MouseEnter Button1.ImageIndex = 1 End Sub Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave Button1.ImageIndex = 0 End Sub If you're doing this at design time, drag an imagelist off the toolbox onto the form, select the imagelist, right click and select properties, select images and click on the"..." icon, add the images. Next select the button in question, right click select properties,then for the FlatStyle property select anything other than System (If your using XP or newer and your project has called EnableVisualStyles() than you can't set this property to System). Next set ImageList property to ImageList1 or whatever you called it in the first step, then set the ImageIndex property to 0 which we'll call the default state, then just add the code above to the button events MouseEnter,MouseLeave. Hope this helps :) MP
FindWindow API
VB to C# the project location is not fully trusted by .net runtime Problems with the PrintPreviewControl, PrintPreviewDialog controls Got to be an easier way... OT : Are you guys in the US on a Public Holiday today ? using SB_GETTEXT Pass an array to javascript My Threading Timer Doesn't Fire Unshare an Excel sheet with VB.Net |
|||||||||||||||||||||||