3/19/2024 0 Comments Visual studio selected text color![]() The above example tells the Graphics object to draw a rectangle at coordinates x=20, y=30 of height and width equal to 100. The next step is to use the brush to draw a shape: Private Sub Form1_Paint(ByVal sender As Object, ByVal e As )Į.Graphics.FillRectangle(blueBrush, 20, 30, 100, 100) In the above code we have created a new SolidBrush drawing object using color blue and assigned it to variable blueBrush. The next task is to create a paintbrush with which to paint: Private Sub Form1_Paint(ByVal sender As Object, ByVal e As )ĭim blueBrush As New Drawing.SolidBrush(Color.Blue) Once selected, Visual Studio will display the Paint event subroutine. The items in the Properties window display in a list set when installing Microsoft Visual Studio. On the right side, the list is equipped with a vertical scroll bar. From the pull-down list, select the Paint event as shown below (if you are using Visual Studio 2008 the events are accessed by clicking on the lightning bolt above the properties list): Under the toolbar, the Properties window displays the list of properties of the selected control(s). Begin by double clicking on the new Form in the Visual Studio project to access the event procedure code for the form control.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |