Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How (if possible) do I make a separate image appear when the mouse is over a button and another image when the button is clicked...so that's total of three images on a button (counting an original image.)

 

thx-

Eric

Posted

one trick i used one time was hide the real cursor and created my own using transparency and my own images. it takes some work but the final product is great.

you may need to use the Form.SetStyle method to keep the form from flickering.

 

i hope that helps

brandon

i'm not lazy i'm just resting before i get tired.
Posted

bpayne111- thanks for the response...It sounds like your talking about the cursor changing images. I'm refering to the button images. I know there's a .hover type event that could be usefull for the second image of the button. And I have no info on the image used for the click operation maybe .click or something?

 

I do however need a little detail (a few lines of code)...I'm just getting back to programing after years away from my comodore64, TRS-80 and Atari 800 days. I knew how to program on those very well but I'm just getting used to not using line numbers (which is a bit odd for me.) So think of me as a newbe :(

Posted

Like i say, I'm new to this but does this look remotely close to any one:

 

If Me.Button1 = Inherits System.Windows.Forms.Button.MouseHover then <points to new button Image>

 

or

 

If Me.Button1 = New System.Windows.Forms.Button.MouseHover then <points to new button Image>

  • Leaders
Posted

like this....

   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Button3.Image = Image.FromFile("C:\Image3.jpg")
   End Sub

   Private Sub Button3_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.MouseEnter
       Button3.Image = Image.FromFile("C:\Image1.jpg")
   End Sub

   Private Sub Button3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button3.MouseDown
       Button3.Image = Image.FromFile("C:\Image2.jpg")
   End Sub

   Private Sub Button3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.MouseLeave
       Button3.Image = Image.FromFile("C:\Image3.jpg")
   End Sub

Posted

dynamic_sysop-you rock! thx...everything's going smoothly, I got my .net books in the mail. I'm sure I'll be up to speed in no time.

 

 

Just a little note: I've seen 3 different ways to call up a form from a button on another form. People make things so hard. My sams teach yourself vb.net in 21 days made it the easiest :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...