Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net Paint a Taskpane

Hi. I am trying to paint my TaskPane control. What is the best way to do this? In the code below I tried filling a Panel but how would I change the code to paint the actual TaskBar

    Private Sub TaskPaneControl_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim graphics As Graphics = Panel1.CreateGraphics()
        Dim rectBrush As New Rectangle(0, 0, 400, 200)
        Dim brush As LinearGradientBrush
        brush = New LinearGradientBrush(rectBrush, Color.FromArgb(46, 100, 160), _
                        Color.White, LinearGradientMode.Horizontal)
        graphics.FillRectangle(brush, rectBrush)
        graphics.Dispose()
    End Sub
User generated image
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much