I have an mdi application and on the parent form i have a background image that is want to strech to the whole form. but when i load tha appplic the background image is placed abreast...
thsi procedure i found and it works but after this prodecure is something else called (i don't know what) so the background image is placed abreast again.... at the messagebox.show(0) the image is strecht over the form but when the form is fully loaded it isn't...
[/COLOR][/COLOR][/SIZE]
please help
thsi procedure i found and it works but after this prodecure is something else called (i don't know what) so the background image is placed abreast again.... at the messagebox.show(0) the image is strecht over the form but when the form is fully loaded it isn't...
VB.NET:
[SIZE=2][COLOR=#0000ff]Protected[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Overloads[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Overrides[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] OnPaintBackground([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] pevent [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] PaintEventArgs)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Not[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].BackgroundImage [/SIZE][SIZE=2][COLOR=#0000ff]Is[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Nothing[/COLOR][/SIZE][SIZE=2]) [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2] pevent.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Low
pevent.[SIZE=2][/SIZE]Graphics.Clear([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].BackColor)
pevent.Graphics.DrawImage([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].BackgroundImage, 0, 0,[/SIZE][SIZE=2][COLOR=#0000ff] Me[/COLOR][/SIZE][SIZE=2].ClientRectangle.Width, [/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ClientRectangle.Height)
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff] MyBase[/COLOR][/SIZE][SIZE=2].OnPaintBackground(pevent)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2]MessageBox.Show(0)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff][COLOR=#000000]
please help