Hello!

Here's my problem: -

I've got a Form that has a PictureBox and a gradient drawing subroutine draws the gradient onto the PictureBox at Form_Load. But when the Form appears, the gradient shows but is immediately covered with grey!

This didn't happen in VB6!!!

The subroutine works OK, the main problem is why is the gradient getting covered in grey? This is VERY annoying!

The gradient subroutine simply creates the graphics (using CreateGraphics) which is created from the PictureBox (PictureBox1.CreateGraphics) and the gradient is stored in a bitmap variable and then is drawn onto the PictureBox.

I thought I could put the subroutine in the Form_Activate section, but it doesn't appear in the list like VB6 had. Do you know what I mean? The "Form" was on the left (along with other controls like buttons and stuff), and the "Activate", "QueryUnload", etc, was on the right.

Someone, please help me from this nightmare!


Thanks in advance.