Click here to Skip to main content
13,091,145 members (51,558 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Everyone,
I am a little new to this, so I hope what I post is readable, and easy to understand. I was trying to work with the tableLayoutPanel in Visual Studio and I noticed here[^] that the tableLayout panel doesn't support visual inheritance. I notice when I call the Invalidate method from a derived class that it works when I set a breakpoint, but otherwise, the CellPaint() method doesn't seem to work. I also try calling the method directly as you can see below. I don't get any compile errors. What do you think might be the best way around this? Threading maybe?
Sub Evaluator()
       Dim Input As Int16
       Dim o As Windows.Forms.TableLayoutCellPaintEventArgs
       'Dim caller as Form1.PanelPanter(AddressOf Form1.TableLayoutPanel1_CellPaint)
       'The following just needs to be explored here:
       Input = Assigner(Form1.i)
       Dim g As Graphics
       g = Form1.Panel1.CreateGraphics
       Dim Rectang As Rectangle
       Dim Tangrec As Rectangle
       Dim Coller As Integer
       Dim Rower As Integer
       o = New Windows.Forms.TableLayoutCellPaintEventArgs(g, Rectang, Tangrec, _
       Coller, Rower)
       If -1 < Divy And Divy < Form1.i Then
           Form1.Div = Input
           'Trying to Invalidate
           'Trying to call CellPaint() directly
           Form1.TableLayoutPanel1_CellPaint(Me, o)
       ElseIf Divy < 0 Then
           'call the code that shows the over use of vacume
       ElseIf Form1.i <= Divy Then
           'call the code showing the overspill of chemicals.
       End If
       If Done = True Then
       End If
   End Sub

Please let me know if I can make anything more clear. Thanks for your help!
Posted 6-Jul-13 10:04am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 6 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100