|
-
March 18th, 2011, 11:01 AM
#1
[RESOLVED] flickering problem Button with PNG image.
Hi Again,
So next riddle for you guys,
I have a button which location is changing dynamically, the button itself has a PNG image set from which some parts are transparent, and background colour is set to transparent.
Now moving the button I get the flickering issue(for some milliseconds you can see the entire button in white).
1) I tried double buffering:
Form1(void)
{
InitializeComponent();
SetStyle(ControlStyles::UserPaint, true);
SetStyle(ControlStyles::AllPaintingInWmPaint, true);
SetStyle(ControlStyles: oubleBuffer, true);
UpdateStyles();
But it gives no effect.
2)Also I used the Paint method of the button to redraw the button image but neither that one worked.
private: System::Void Button_Palanca_IZQ_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
g->DrawImage(image,loc);
}
3) I tried the advice from other topic to use bufferedGraphics
http://msdn.microsoft.com/en-us/libr...dgraphics.aspx
But it didn't work.
I am new to this stuff, so maybe somebody will give me a clue where to look for ?
Thanks in Advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|