Question:You are developing a utility screen for a new client application. The utility screen displays a thermometer that conveys the current status of processes being carried out by the application. You need to draw a rectangle on the screen to serve as the background of the thermometer as shown in the exhibit.The rectangle must be filled with gradient shading. (Click the Exhibit button.) Which code segment should you choose? 

A Dim objRect As New Rectangle(10, 10, 450, 25)
Dim objBrush As New SolidBrush(Color.AliceBlue)
Dim objPen As New Pen(objBrush)
Dim g As Graphics = myForm.CreateGraphics 

B DrawRectangle(objPen, objRect) 

C Dim objRect As New RectangleF(10.0F, 10.0F, 450.0F, 25.0F) Dim points() As System.Drawing.Point = _
{New Point(0, 0), New Point(110, 145)}
Dim objBrush As New LinearGradientBrush( _
objRect, Color.AliceBlue, Color.CornflowerBlue, _
LinearGradientMode.ForwardDiagonal)
Dim objPen As New Pen(objBrush)
Dim g As Graphics = myForm.CreateGraphics 

D DrawPolygon(objPen, points) 

E Dim objRect As New Rectangle(10, 10, 450, 25)
Dim objBrush As New LinearGradientBrush( _
objRect, Color.AliceBlue, Color.CornflowerBlue, _
LinearGradientMode.ForwardDiagonal)
Dim objPen As New Pen(objBrush)
Dim g As Graphics = myForm.CreateGraphics 

F FillDrawRectangle(objPen, objRect) 

G Dim objRect As New Rectangle(10, 10, 450, 25)
Dim objBrush As New LinearGradientBrush( _
objRect, Color.AliceBlue, Color.CornflowerBlue, _
LinearGradientMode.ForwardDiagonal)
Dim objPen As New Pen(objBrush)
Dim g As Graphics = myForm.CreateGraphics 

H FillRectangle(objBrush, objRect) 

+ Answer
+ Report
Total Preview: 804

Copyright © 2024. Powered by Intellect Software Ltd