Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB.net TabControl Irregularity

Posted on 2013-01-26
5
Medium Priority
?
248 Views
Last Modified: 2013-02-04
Hi

In my VB.net I have a TabControl on a TaskPane as shown in the image.

When I click page three and go back to another page, part of page three still shows

on the right. When I then click the page I have gone to, it dissapears and looks as it should.

What might cause this? Is there a way to simulate the click with code?


1
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 38824117
Its to do with your custom painting I think.
0
 

Author Comment

by:Murray Brown
ID: 38824373
Hi.

Even if I remove the paint code it still happens. The code on each page looks like the following code. I also use Me.Invalidate behind the click event but it only did once while I was changing the code around. How about if I simulate the Mouse Click event somewhere

   Private Sub TabPage1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TabPage1.Paint

        Try
            Dim graphics As Graphics = e.Graphics()

            Dim rectBrush As New System.Drawing.Rectangle(0, 0, 450, 600)
            Dim brush As LinearGradientBrush
            brush = New LinearGradientBrush(rectBrush, Color.FromArgb(46, 100, 160), _
                            Color.White, LinearGradientMode.Horizontal)
            graphics.FillRectangle(brush, rectBrush)
        Catch ex As Exception

        End Try
    End Sub
0
 
LVL 28

Expert Comment

by:Ark
ID: 38829854
e.graphics.clear(color.white)?
0
 

Author Comment

by:Murray Brown
ID: 38831607
Hi. Thanks, but it still doesn't seem to work
0
 

Author Closing Comment

by:Murray Brown
ID: 38850787
Thanks
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question