Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't Get Form's Paint Method To Work...
Message
De
28/11/2006 09:24:39
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01172750
Message ID:
01172920
Vues:
14
and if you try e.Graphics.FillRectangle(brushBlueGradient, RectangleF.op_Implicit(ClientRectangle)) instead of e.Graphics.FillRectangle(brushBlueGradient, New Rectangle(0, 0, Me.ClientSize.Width, Me.ClientSize.Height))

>Hi, and thank you for the response. I did as you suggested and changed my method to be as follows:
>
>
>    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
>        '***************************************
>        ' Call The Base Paint Method
>        '***************************************
>        MyBase.OnPaint(e)
>
>        '***************************************
>        ' Initialize Variables
>        '***************************************
>        Dim brushBlueGradient As LinearGradientBrush
>
>        '***************************************
>        ' Default Values
>        '***************************************
>        brushBlueGradient = New LinearGradientBrush(Me.ClientRectangle, _
>                                                    Color.FromArgb(115, 160, 196), _
>                                                    Color.FromArgb(194, 213, 224), _
>                                                    LinearGradientMode.Vertical)
>
>        '***************************************
>        ' Draw Main Gradient Area
>        '***************************************
>        e.Graphics.FillRectangle(brushBlueGradient, New Rectangle(0, 0, Me.ClientSize.Width, Me.ClientSize.Height))
>    End Sub
>
>
>Unfortunatly, still no luck. The background of the MDI Parent form is still dark grey. Any ideas?
Alexandre Palma
Senior Application Architect
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform