hey guy...i want to make a form application..but i dont know how to get such visuality...
http://img825.imageshack.us/img825/5760/panxb.jpg
it is the view of the program that i make..how i can get such visuality with Form Components or i need something special ?
Loading
Erdinc KolukisaPosted Oct 7, 2010, 7:57 AM
JurePosted Oct 7, 2010, 6:26 AM
Image my_background = Image.FromFile(@"your path here");
e.Graphics.DrawImage(my_background, 0, 0); // where "e" is PainEventArgs-type, two zeros are coordinates
or shorter (removing my_background variable):
e.Graphics.DrawImage(Image.FromFile(@"path here"), 5, 5, 100, 20); // here I also specified width (100) and height (20), but that's not necessary
You don't need to add these images to your project in any way, the code above is enough for compiler to do its thing.
Here are listed all overloads of Graphics.DrawImage method.
Erdinc KolukisaPosted Oct 7, 2010, 5:48 AM
JurePosted Oct 7, 2010, 5:35 AM
You can either inherit a control and override OnPaint and/or OnPaintBackground, or you can set control's OwnerDraw property to true and use Draw event. In either case, you have to code the graphics. Much of the stuff shown in the link above can probably be just imported as an image, so you don't have to paint everything by code literally.
This article will get you started.