1 00:00:00,990 --> 00:00:12,640 In this lecture we are going to carry on from where we left off in part 1 we are going to add another 2 00:00:12,640 --> 00:00:15,980 component an important component. 3 00:00:16,030 --> 00:00:18,960 This was known as a picture box. 4 00:00:19,000 --> 00:00:23,410 This is where the actual drawing will take place. 5 00:00:23,410 --> 00:00:32,590 So in your tool box click on common controls and there should be one for a picture box. 6 00:00:32,590 --> 00:00:34,990 Just drag it and drop it in. 7 00:00:36,760 --> 00:00:41,710 While the picture box is highlighted we want to change some of the properties. 8 00:00:41,920 --> 00:00:49,660 So when you change properties always make sure that the property you are changing for the component 9 00:00:50,020 --> 00:00:51,070 is the right one. 10 00:00:51,550 --> 00:00:57,150 As you can see mine I can tell is the actual picture box because the name shows up. 11 00:00:57,790 --> 00:01:06,700 So what are the moment I want to resize that so that so that it fills the screen just above this menu 12 00:01:06,820 --> 00:01:07,650 item here. 13 00:01:08,180 --> 00:01:08,680 All right. 14 00:01:08,710 --> 00:01:18,430 So to do that I need to change a property that is the property or board for going to the layout part 15 00:01:18,430 --> 00:01:19,440 of it. 16 00:01:19,600 --> 00:01:27,580 I need to docket this a dock property at the moment it is set to announce I need to change that and 17 00:01:27,580 --> 00:01:32,210 set it to fill and that will fill the entire screen. 18 00:01:34,910 --> 00:01:41,900 So it takes up the screen but not you know not the menu strip and not the tool strip. 19 00:01:42,710 --> 00:01:46,660 I want to change the background color. 20 00:01:46,700 --> 00:01:49,130 Want to change it to black. 21 00:01:49,160 --> 00:01:52,560 So looking at properties is an option called bad color. 22 00:01:52,640 --> 00:01:59,290 Click on that and click on the dropdown and go web and click on black. 23 00:01:59,290 --> 00:02:04,500 So we've now got the background color for. 24 00:02:04,540 --> 00:02:09,310 So this is where the actual drawing will take place. 25 00:02:09,310 --> 00:02:18,900 The picture box really is designed to display pictures but we want to use it for something else. 26 00:02:18,910 --> 00:02:27,380 We want to be able to draw on it if you want to find out more information by the picture box. 27 00:02:27,580 --> 00:02:28,790 Why you've got it selected. 28 00:02:28,810 --> 00:02:35,560 Just hit F1 on your keyboard and that will take you to the Microsoft site where you can read up more 29 00:02:35,680 --> 00:02:37,000 about it. 30 00:02:37,030 --> 00:02:45,070 So the main purpose of it is to use it to display pictures what we want we're going to use it for something 31 00:02:45,070 --> 00:02:45,240 else. 32 00:02:45,250 --> 00:02:48,490 When to use it to draw. 33 00:02:48,490 --> 00:02:56,350 So he's going to act as we're going to use it to act as a canvas where we can draw on the way we are 34 00:02:56,350 --> 00:03:06,340 going to achieve this is to we have to create an image in real time that can be displayed in the picture 35 00:03:06,340 --> 00:03:08,450 box component. 36 00:03:08,650 --> 00:03:18,370 The way round that is to use a bitmap image format what we'll do we'll have to draw on draw the image 37 00:03:18,850 --> 00:03:24,510 on the bitmap which will then display in the picture box. 38 00:03:24,550 --> 00:03:27,780 So we're gonna try and achieve this using code. 39 00:03:27,910 --> 00:03:35,950 So in the next lecture we'll start writing the piece of code to put these together. 40 00:03:35,950 --> 00:03:37,600 Thanks very much for watching. 41 00:03:37,600 --> 00:03:38,520 Take care. 42 00:03:38,530 --> 00:03:39,210 Bye for now.