Hi Arjay,
Thanks for the Zipper, It took me a while to get thinks going.... even whith your program.
Will keep you guys updated,
regards,
ger
Printable View
Hi Arjay,
Thanks for the Zipper, It took me a while to get thinks going.... even whith your program.
Will keep you guys updated,
regards,
ger
Hi all,
So far everything is working.
Still one minor detail.
the Pictures I use have round edges, and they do not cover the whole button.
So when the mouse pointer enters the button area the picture changes.
But the backcolor changes also, giving very annoying results.
So my quest, How do I turn of the backcolor change on mouse enter and mouse click.
Transparent does not do the trick.
Regards,
gerwin
Yep, the corners are transparent and I use Zoom to place the image on the button.
regards.
Hi all,
To make life easier I changed the button control to a picturebox.
Does the same for me as I use three pictures for all the events.
To give you an idea, a dark picture when the 'button' is idle.
a light picture when the mouse is over the 'button'
and the flash picture when the button is clicked.
I'm using the code which was posted in the beginning of this thread.
But now I encounter the following situation;
This gives the flash only, for the rest it does not do anything.Code:private void pictureBox1_Click(object sender, EventArgs e)
{
FlashPicture = (PictureBox)sender;
Thread FlashThePictureThread = new Thread(FlashThePicture);
FlashThePictureThread.Start();
}
void FlashThePicture()
{
BeginInvoke(new MethodInvoker(Performflash));
Thread.Sleep(250);
BeginInvoke(new MethodInvoker(Performflash));
Thread.Sleep(250);
}
void Performflash()
{
if ((FlashPicture.BackgroundImage == ImageB1) || (FlashPicture.BackgroundImage == ImageC1))
FlashPicture.BackgroundImage = ImageA1;
else
FlashPicture.BackgroundImage = ImageB1;
}
What I like is the following:
but this does not work.Code:private void pictureBox1_Click(object sender, EventArgs e)
{
FlashPicture = (PictureBox)sender;
Thread FlashThePictureThread = new Thread(FlashThePicture);
FlashThePictureThread.Start();
this.Hide();
COD1 cod1 = new COD1();
cod1.ShowDialog();
this.Show();
}
(The next Dialog is called, the previous one is hidden, but there is no flash of the 'button')
Where do I go wrong.
regards,
Gerwin
By the way I downloaded "threading in C# from Joseph Albahari"
Hi all,
Solved all the 'problems' on the button change picture issues!!! (YES YES YES)
Will post the complete solution in the next couple of days, will be helpfull for a lot of us.
regards,
Gerwin