Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Posted

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)

Here's what I'm up to.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...