I've googled these and I can't find anything that works, everything I try doesn't work. I need something to happen when I press enter while on my richtextbox, and Mouse hover, Mouse leave and Mouse click help. I can't convert them to buttons, so I'm keeping them as picture boxes.
Mouse hover and enter
Page 1 of 15 Replies - 3434 Views - Last Post: 08 August 2010 - 01:24 PM
Replies To: Mouse hover and enter
#2
Re: Mouse hover and enter
Posted 08 August 2010 - 08:22 AM
Snakeruler, on 08 August 2010 - 05:09 AM, said:
I've googled these and I can't find anything that works, everything I try doesn't work. I need something to happen when I press enter while on my richtextbox, and Mouse hover, Mouse leave and Mouse click help. I can't convert them to buttons, so I'm keeping them as picture boxes.
What does a picture box have to do with Mouse events on a richtextbox? Show the code you have tried, as these are very simply done in the designer with a double click on the event.
#3
Re: Mouse hover and enter
Posted 08 August 2010 - 08:27 AM
It's two different questions hehe.
I haven't got the code currently, but basically what it is, is I set up a void (pictureBox1 hover one) and nothing get's done in side the void.
And the other rich text box part, basically when the person presses enter while it'sgot the rich text box selected, it adds "\n" to the text box
I haven't got the code currently, but basically what it is, is I set up a void (pictureBox1 hover one) and nothing get's done in side the void.
And the other rich text box part, basically when the person presses enter while it'sgot the rich text box selected, it adds "\n" to the text box
#4
Re: Mouse hover and enter
Posted 08 August 2010 - 11:14 AM
Snakeruler, on 08 August 2010 - 06:09 AM, said:
I need something to happen when I press enter while on my richtextbox
Your question is confusing so first I'll answer this part
private void richTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyChar == (char)Keys.Enter)
{
//Do whatever
}
}
Edit: didn't see the post above for some reason, can you explain this a little more:
Snakeruler, on 08 August 2010 - 07:27 AM, said:
I haven't got the code currently, but basically what it is, is I set up a void (pictureBox1 hover one) and nothing get's done in side the void.
This post has been edited by Bacanze: 08 August 2010 - 11:16 AM
#5
Re: Mouse hover and enter
Posted 08 August 2010 - 11:22 AM
Basically, what I want it to do, is when I hover over an Image, it chsanges to another image, and when I leave it, it changes back. Also when I click it it does that.
#6
Re: Mouse hover and enter
Posted 08 August 2010 - 01:24 PM
You want to access the MouseEnter and MouseLeave event methods from within the Properties tab when your pictureBox is selected in Visual Studio.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|