Hello and welcome.
In this lecture we are going to create a new project with a form.
I've already got visual studio opened so I'm going to create a new project.
So I click on the new link here are two ways you can do that by the new project link or you can go file
new and then project the subsidy which way you want to go.
So I click on project I just wait for it to load.
Make sure you've got the visual C sharp selected.
I've got a Windows form application selected.
Get rid of the default name and then add a name of your choice.
I'm gonna call mine my screen
saver if you're using several words.
Make sure there are no gaps between the words click Okay.
Which is give visual studio a few minutes to build the project and add the form
let's change some of the properties of the form.
So make sure you go to form selected and in the properties window it chose the name of the form.
Let's change the background color.
So on that the back color property click on this control here and you get a dropdown select web and
choose the color you want.
I'm going to make mine a black background.
Next thing I want to change is
this property called form border site style.
The moment is set to sizable.
I'm just going to change that and sell it to non
that's changed the name of the text is currently saying form one.
Let's just change that
to my
screen saver.
Also change the name of the form for coding purposes gender to form screen
saver.
There is a property called Window state.
I'd like to change that property from normal to maximize civilian option for maximize
also like to change this property called topmost set to false.
Just want to change the value to true there's another property here.
Show in taskbar.
I want to change that property value to force.
Let's add a timeout component to the form so click on the toolbar tool box and select components and
just either double click or just drag and drag a timeout component to your form.
So we now have a timeout component.
When you put a timer on your form he usually sits at the bottom here.
So this is also displaying the properties of the timer component so the default interval is set to a
hundred at the moment but we will be changing this as the project progresses.
So that's it for this lecture.
Less test are application and see what the window looks like so far.
When you run the application because of the settings it will fill the page completely.
So let's have a look.
It will fill the page and the only way you can escape it is by doing all it.
And as for when your keyboard.
So let's run that
so you can see the screen is filled with black.
A background color.
So to escape that chose to halt and fall on your keyboard so old an F4 solves that or I want to make
it easier as well so that you can when you press any key on your keyboard you can close that window.
So the way I'm gonna do that is to you know add a method to an event handler so click on the form make
sure you've caught the form selected and go to click on this icon here that says events show scroll
down to there should be an event that says key down double click on it and it will generate the event
handler for that event.
So I'm gonna add just a very simple code is a closed method.
Just put a semicolon.
That's basically it.
And I click save what that will mean now is that when I run the application all I need to do to escape
it is just press any key on the keyboard as long as you press the key down.
The application should escape a return to a normal screen size so let's test that out.
A quick start
and just press any key and it escapes the full screen so that's it for this lecture.
Thanks so much for watching.
Take care.
Bye for now.