Lanc1988 Posted September 4, 2005 Posted September 4, 2005 Is there a way to change the backgroundimage on a form? i tried things like frmMain.BackgroundImage("path") but it doesnt work for me.. is it possible and if so how? Quote
Leaders dynamic_sysop Posted September 4, 2005 Leaders Posted September 4, 2005 are you trying to set the image on a different form than the one you are on? eg: trying to set Form1's background from Form2? Quote
Lanc1988 Posted September 4, 2005 Author Posted September 4, 2005 no, i was just trying to change the main form.. i found out all i had to do what put Me.BackgroundImage and now it works great.. thanks :) Quote
Lanc1988 Posted September 4, 2005 Author Posted September 4, 2005 now im having a problem finding the code to change the backgroundimage of my tabcontrol tabs. they are on the main form and so is the button that will change the backgroundimage.. i tried: TabControl1.TabIndex(tabNews).BackgroundImage = Image.FromFile(Application.StartupPath & "\Sidekick Files\Program Images\background.jpg") but it wont work. how can i fix it? Quote
Machaira Posted September 6, 2005 Posted September 6, 2005 Try: Dim gr As Graphics = Me.TabControl1.CreateGraphics() Dim rect As Rectangle = Me.TabControl1.GetTabRect(tabNews) gr.DrawImage(New Bitmap(Application.StartupPath & "\Sidekick Files\Program Images\background.jpg"), rect) Quote Here's what I'm up to.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.