Title: Nov 1211:02 AM (1 of 25) - Bristol Community...

Post on 18-Jan-2021

0 views 0 download

Transcript of Title: Nov 1211:02 AM (1 of 25) - Bristol Community...

Open Software and select Visual Studio 2019.

Title: Nov 12­11:02 AM (1 of 25)

Title: Nov 12­11:03 AM (2 of 25)

Be sure to chooseVisual Basicunder languages.

Title: Nov 12­11:04 AM (3 of 25)

Scroll down a little andselect Windows Forms Appand click next.

Title: Nov 12­11:04 AM (4 of 25)

Give your project aname and browseto find where you wantto store it.  You only wantto fill in Project name andlocation.I called the project namefirst and stored it in theroot of the F drive.

Title: Nov 12­11:05 AM (5 of 25)

Now you see the SolutionExplorer and Properties on theright. The form in the middleand on the far left you see toolbox written side ways.

If you do not see the formclick on form1 here.

Title: Nov 12­11:09 AM (6 of 25)

Click on toolbox when it comes up the pin will point sideways.Change the pin to point down so you essentially pin it to thescreen.  This means it is here to use.  When you are done youcan unpin by turning it sideways.

Title: Nov 12­11:11 AM (7 of 25)

I drag over label and position it on the form.I click on the icon to make the propertiesalphabetic.I find (Name) and name it lblName andthen I find Text and make it say NAME: sothat is what appears on the form.

Title: Nov 12­11:13 AM (8 of 25)

This shows the (Name) where you put in a namefor each of the objects you put on the form.

Title: Nov 12­11:15 AM (9 of 25)

Title: Nov 12­11:15 AM (10 of 25)

Title: Nov 12­11:16 AM (11 of 25)

This shows the names of the objectson the form.

Title: Nov 12­11:17 AM (12 of 25)

Double click on the btnClick on the form and it creates the Private Sub to handlethe click event associated with the button.  It also creates the End Sub. I addedthe code which says:

txtGreeting.text = "Hello " + txtName.text

This means take the literal Hello followed by a space and concatenate it with thetext in the txtName textbox and then assign it as the text in the txtGreeting textbox.

Note the end class ­ there is also a class line at the top.These were put in by Visual Basic.

Title: Nov 12­11:19 AM (13 of 25)

I changed the ForeColor to Red and then I used Font where I can change thefont, style and size.  It chaned it for txtGreeting because that is the textbox I selected.

Title: Nov 12­11:24 AM (14 of 25)

REPEAT

Title: Nov 12­11:32 AM (15 of 25)

Title: Nov 12­11:32 AM (16 of 25)

Title: Nov 12­11:33 AM (17 of 25)

Title: Nov 12­11:33 AM (18 of 25)

Title: Nov 12­11:33 AM (19 of 25)

Title: Nov 12­11:51 AM (20 of 25)

On my web site there are zipped Visual Basic programs. I can download, unzip and then open.

Title: Nov 12­11:55 AM (21 of 25)

Click the form to open.

Title: Nov 12­11:56 AM (22 of 25)

Title: Nov 12­11:59 AM (23 of 25)

Title: Nov 13­1:01 PM (24 of 25)

Title: Nov 12­12:00 PM (25 of 25)