Windows Develop Bookmark and Share   
 index > Windows Forms General > Question about the DrawParentBackground function
 

Question about the DrawParentBackground function

Hi,

I want to create my customized button with transparent support. My proplem is I used ButtonRender.DrawParentBackground to draw the background from the parent of the control on its position to set it withtransparent support.

The control in design mode was successfully to draw parent background.But, in executing there was painted image of parent on other position.

srceen snap:
http://rapidshare.com/files/239191048/img1.JPG.html
http://rapidshare.com/files/239191603/img2.JPG.html

my code:
ButtonRenderer.DrawParentBackground(pevent.Graphics, pevent.ClipRectangle, Me)

I holp that you can understanding my meaning as my english isnot good.
Majesty Kwan  Saturday, May 30, 2009 7:59 PM
Your post was clear, up to the crucial point "the background was painted image of parent on other position". That doesn't parse as an English sentence. Edit your post, perhaps you ought to use an image sharing service to show what it looks like.

Moved to Windows Forms General.

Hans Passant.
nobugz  Saturday, May 30, 2009 9:51 PM
Thank you for your explaining, but I don't know how can I expain my problem in english. also, I provided the srceen to you.
Majesty Kwan  Sunday, May 31, 2009 12:34 AM
Your screen shots are not accessible, error 403. Use a real image service.

Hans Passant.
nobugz  Sunday, May 31, 2009 9:44 AM

You can use google to search for other answers

Custom Search

More Threads

• String drawn on screen becomes more narrow than what is shown in other application like Notepad
• Get Selected Text
• 2 Forms. this->Close(); problem.
• Printing a PDF Or Word Document Via PrintDocument
• Updating .sln files with relative paths at runtime or complie time (win forms 2005)
• Associate file to my application
• Conflicting MySettings
• Drawing lines in windows forms
• New to Visual C++. Need to Read Flat Files and Display on a form.
• User Agent for the Online Application