1
00:00:00,540 --> 00:00:01,410
Hello and welcome.

2
00:00:01,440 --> 00:00:08,790
In this lecture we are going to create a new project with a form.

3
00:00:08,790 --> 00:00:13,470
I've already got visual studio opened so I'm going to create a new project.

4
00:00:14,250 --> 00:00:22,020
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

5
00:00:22,650 --> 00:00:26,460
new and then project the subsidy which way you want to go.

6
00:00:26,910 --> 00:00:32,840
So I click on project I just wait for it to load.

7
00:00:32,880 --> 00:00:36,360
Make sure you've got the visual C sharp selected.

8
00:00:36,810 --> 00:00:39,760
I've got a Windows form application selected.

9
00:00:40,050 --> 00:00:45,220
Get rid of the default name and then add a name of your choice.

10
00:00:45,240 --> 00:00:50,370
I'm gonna call mine my screen

11
00:00:53,910 --> 00:00:57,440
saver if you're using several words.

12
00:00:57,450 --> 00:01:02,930
Make sure there are no gaps between the words click Okay.

13
00:01:03,450 --> 00:01:10,760
Which is give visual studio a few minutes to build the project and add the form

14
00:01:13,460 --> 00:01:16,770
let's change some of the properties of the form.

15
00:01:16,970 --> 00:01:25,700
So make sure you go to form selected and in the properties window it chose the name of the form.

16
00:01:25,700 --> 00:01:28,040
Let's change the background color.

17
00:01:28,760 --> 00:01:37,700
So on that the back color property click on this control here and you get a dropdown select web and

18
00:01:37,700 --> 00:01:38,750
choose the color you want.

19
00:01:38,750 --> 00:01:42,490
I'm going to make mine a black background.

20
00:01:42,500 --> 00:01:46,790
Next thing I want to change is

21
00:01:49,470 --> 00:01:53,540
this property called form border site style.

22
00:01:53,880 --> 00:01:55,850
The moment is set to sizable.

23
00:01:55,860 --> 00:01:59,200
I'm just going to change that and sell it to non

24
00:02:03,340 --> 00:02:08,160
that's changed the name of the text is currently saying form one.

25
00:02:08,170 --> 00:02:09,370
Let's just change that

26
00:02:12,110 --> 00:02:14,420
to my

27
00:02:16,830 --> 00:02:22,060
screen saver.

28
00:02:22,380 --> 00:02:34,200
Also change the name of the form for coding purposes gender to form screen

29
00:02:37,560 --> 00:02:39,760
saver.

30
00:02:39,790 --> 00:02:43,260
There is a property called Window state.

31
00:02:43,300 --> 00:02:50,580
I'd like to change that property from normal to maximize civilian option for maximize

32
00:02:53,970 --> 00:02:59,740
also like to change this property called topmost set to false.

33
00:02:59,750 --> 00:03:05,960
Just want to change the value to true there's another property here.

34
00:03:06,100 --> 00:03:08,160
Show in taskbar.

35
00:03:08,640 --> 00:03:14,420
I want to change that property value to force.

36
00:03:14,700 --> 00:03:26,400
Let's add a timeout component to the form so click on the toolbar tool box and select components and

37
00:03:26,400 --> 00:03:36,770
just either double click or just drag and drag a timeout component to your form.

38
00:03:36,840 --> 00:03:39,190
So we now have a timeout component.

39
00:03:39,270 --> 00:03:44,970
When you put a timer on your form he usually sits at the bottom here.

40
00:03:45,060 --> 00:03:53,370
So this is also displaying the properties of the timer component so the default interval is set to a

41
00:03:53,370 --> 00:03:59,820
hundred at the moment but we will be changing this as the project progresses.

42
00:03:59,820 --> 00:04:01,680
So that's it for this lecture.

43
00:04:01,710 --> 00:04:08,180
Less test are application and see what the window looks like so far.

44
00:04:08,730 --> 00:04:14,460
When you run the application because of the settings it will fill the page completely.

45
00:04:14,460 --> 00:04:17,240
So let's have a look.

46
00:04:17,370 --> 00:04:24,010
It will fill the page and the only way you can escape it is by doing all it.

47
00:04:24,180 --> 00:04:26,790
And as for when your keyboard.

48
00:04:26,790 --> 00:04:27,690
So let's run that

49
00:04:33,360 --> 00:04:37,010
so you can see the screen is filled with black.

50
00:04:37,050 --> 00:04:38,030
A background color.

51
00:04:38,070 --> 00:04:47,970
So to escape that chose to halt and fall on your keyboard so old an F4 solves that or I want to make

52
00:04:47,970 --> 00:04:55,230
it easier as well so that you can when you press any key on your keyboard you can close that window.

53
00:04:55,530 --> 00:05:04,200
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

54
00:05:04,200 --> 00:05:14,280
sure you've caught the form selected and go to click on this icon here that says events show scroll

55
00:05:14,280 --> 00:05:24,450
down to there should be an event that says key down double click on it and it will generate the event

56
00:05:24,450 --> 00:05:26,580
handler for that event.

57
00:05:26,640 --> 00:05:35,750
So I'm gonna add just a very simple code is a closed method.

58
00:05:36,440 --> 00:05:38,690
Just put a semicolon.

59
00:05:38,750 --> 00:05:39,730
That's basically it.

60
00:05:39,770 --> 00:05:46,130
And I click save what that will mean now is that when I run the application all I need to do to escape

61
00:05:46,130 --> 00:05:50,680
it is just press any key on the keyboard as long as you press the key down.

62
00:05:50,990 --> 00:05:56,600
The application should escape a return to a normal screen size so let's test that out.

63
00:05:56,600 --> 00:05:57,470
A quick start

64
00:06:01,140 --> 00:06:07,600
and just press any key and it escapes the full screen so that's it for this lecture.

65
00:06:07,600 --> 00:06:09,280
Thanks so much for watching.

66
00:06:09,280 --> 00:06:09,970
Take care.

67
00:06:10,330 --> 00:06:11,080
Bye for now.
