Windows Develop Bookmark and Share   
 index > Windows Forms Designer > How to add Backgroung Image of panel at particuler position
 

How to add Backgroung Image of panel at particuler position

How to add Background Image of panel at particular position in vb.net(Windows)..Is is possible..

Please help me.
dilipkumarmdk  Monday, May 04, 2009 11:26 AM
Hi,
Do you want to add an image something like a background and also it is in a particualr place in the panel?
Then i think the best way is, add an image control to the location where you want the image, assign the image, lock the control. Be sure that the image control is at the lowet control in the hierarchy(Send to back).

-- Thanks Ajith R [Mark as Answer if it is Helpful.]
Ajith R Nair  Thursday, May 07, 2009 7:31 AM
Hi,
Do you want to add an image something like a background and also it is in a particualr place in the panel?
Then i think the best way is, add an image control to the location where you want the image, assign the image, lock the control. Be sure that the image control is at the lowet control in the hierarchy(Send to back).

-- Thanks Ajith R [Mark as Answer if it is Helpful.]
Ajith R Nair  Thursday, May 07, 2009 7:31 AM

Hi Dilipk,

Alternatively, you can handle the Paint event of the Panel to draw the background image to anywhere you want. For example:

void panel1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawImageUnscaledAndClipped(Properties.Resources.Image1,new Rectangle(100,100,Properties.Resources.Image1.Width,Properties.Resources.Image1.Height));
}


Hope this helps.

Sincerely,
Linda Liu


Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Tuesday, May 12, 2009 8:46 AM

You can use google to search for other answers

Custom Search

More Threads

• CollectionEditor - Code Generation for Property Controls failed. Error was: Object reference not set to an instance of an object.
• Inherits ListBox and Databinding
• O
• Custommade ContexMenustrip, Opaint override, FillElipse and transparancy
• VS 2008 forms designer doesn't show controls
• Custom Control inherited from GroupBox
• DefayltValue on a propery of Or'd values
• \field command are deleting in RichTextBox
• Adding Controls to a UserControl on a form
• Dragging of picturebox.. Help Help!!!