1 00:00:00,540 --> 00:00:01,570 Hello and welcome. 2 00:00:01,620 --> 00:00:07,080 In this lecture we are going to be adding some buttons to our form. 3 00:00:08,850 --> 00:00:10,160 Let's add a button. 4 00:00:10,350 --> 00:00:12,130 So click on the tool box. 5 00:00:12,360 --> 00:00:17,590 And within the common controls just drag a button onto the form. 6 00:00:19,330 --> 00:00:26,310 OK just bring it over here and resize that a little bit. 7 00:00:26,340 --> 00:00:31,860 You can just drag it and just make it it'd be big. 8 00:00:31,930 --> 00:00:32,620 Woops. 9 00:00:33,690 --> 00:00:34,610 OK. 10 00:00:34,680 --> 00:00:35,460 That should work. 11 00:00:35,460 --> 00:00:39,760 Just drag it to suit the size you want. 12 00:00:39,840 --> 00:00:46,850 So let's change some of the properties for the buttons and make sure you've got the right control selector 13 00:00:46,880 --> 00:00:49,860 circle the button control and you can see says button that. 14 00:00:50,370 --> 00:00:56,560 So the first thing I like to change I've actually made the size true resizing. 15 00:00:56,730 --> 00:00:58,200 This is the actual size. 16 00:00:58,260 --> 00:01:06,570 I've made it now 97 y 34 long 2 by resizing so you can either do it manually or use the squares here 17 00:01:07,170 --> 00:01:08,160 to do that. 18 00:01:08,160 --> 00:01:14,790 All right let's change if you controls its few properties for the button. 19 00:01:14,970 --> 00:01:22,560 The first thing we're going to do we're going to change the tool text that is currently displayed on 20 00:01:22,560 --> 00:01:23,490 the button. 21 00:01:24,180 --> 00:01:29,030 So the text of the moment or the button should say Button 1. 22 00:01:29,340 --> 00:01:38,010 I'm going to change this to browse. 23 00:01:38,920 --> 00:01:47,760 We're going to use this button to browse the music file that you want to play. 24 00:01:47,810 --> 00:01:54,190 I'm also going to change the style of the button so it's got the standard style. 25 00:01:54,200 --> 00:01:58,490 So here was called Flat waistcoat flat style. 26 00:01:58,600 --> 00:02:05,120 I'm just going to drop down and change it to pop up so it becomes a bit flat. 27 00:02:05,120 --> 00:02:06,480 Next thing I want to do is check. 28 00:02:06,590 --> 00:02:09,980 Change the background color of the buttons so I come here. 29 00:02:10,010 --> 00:02:13,700 There's a property called back color at the moment. 30 00:02:13,700 --> 00:02:15,850 The button is inherited. 31 00:02:16,070 --> 00:02:18,140 The color for the forms. 32 00:02:18,140 --> 00:02:20,060 I'm just going to change that. 33 00:02:20,060 --> 00:02:29,340 Click on web form and am browsing true until I see a color that takes my fancy. 34 00:02:30,260 --> 00:02:33,980 I am going to give it Blue Velvet. 35 00:02:34,050 --> 00:02:35,650 I like that. 36 00:02:35,810 --> 00:02:40,930 Next thing I want to do I want to change the color of the text in the button. 37 00:02:40,940 --> 00:02:47,150 So if I come scroll down was go for color click on that. 38 00:02:47,150 --> 00:02:51,200 I'm going to change it to white so I has a contrast. 39 00:02:51,950 --> 00:02:52,970 OK. 40 00:02:53,090 --> 00:02:58,210 Next thing I want to do is change the font can only change the font size. 41 00:02:58,390 --> 00:03:02,720 But if you only change the actual font you can also do that through here. 42 00:03:02,720 --> 00:03:06,020 So you can change the font family if you want. 43 00:03:06,020 --> 00:03:11,340 I'm going to leave the default Sunseri but I'm going to change the size. 44 00:03:11,390 --> 00:03:12,540 I'll make it 12:00. 45 00:03:13,400 --> 00:03:14,150 OK. 46 00:03:14,220 --> 00:03:17,990 I think I am happy with that. 47 00:03:17,990 --> 00:03:24,930 Next now I want to do I want to copy this button four times because I want four instances of it for 48 00:03:24,950 --> 00:03:25,880 different control. 49 00:03:25,880 --> 00:03:32,310 So that's one two three four. 50 00:03:32,570 --> 00:03:39,010 So just drag that there and drag this here. 51 00:03:39,290 --> 00:03:49,280 That the advantage of doing it this way is that the buttons are already configured. 52 00:03:49,310 --> 00:03:55,390 So I just need to change you know just a few properties I've already configured button one. 53 00:03:55,820 --> 00:04:03,490 So just click on button two and change some properties for button to need to change the name. 54 00:04:03,500 --> 00:04:06,690 So I'm a comedian if I'm going to be changing. 55 00:04:06,690 --> 00:04:09,920 It's just a name the other properties I'm happy with. 56 00:04:10,490 --> 00:04:14,480 This is going to be the play button. 57 00:04:14,480 --> 00:04:14,860 All right. 58 00:04:14,870 --> 00:04:16,080 So I'm going to come here. 59 00:04:16,250 --> 00:04:18,430 Oh also I need to change the background color. 60 00:04:18,440 --> 00:04:21,000 I want to change the background color. 61 00:04:21,590 --> 00:04:24,410 Just make it be distinct. 62 00:04:24,410 --> 00:04:26,090 So let's have a look. 63 00:04:26,120 --> 00:04:28,110 What takes my fancy here. 64 00:04:29,290 --> 00:04:30,360 Mm hmm. 65 00:04:30,380 --> 00:04:31,240 All right. 66 00:04:31,370 --> 00:04:33,020 Give you that blue. 67 00:04:33,280 --> 00:04:34,460 Then I come here. 68 00:04:34,460 --> 00:04:38,870 I do the same from button three are gender background. 69 00:04:38,900 --> 00:04:46,580 All of us scroll down and see what takes my cream on yeah. 70 00:04:46,850 --> 00:04:48,060 I like that. 71 00:04:48,210 --> 00:04:53,750 Now change the actual text on the button. 72 00:04:54,110 --> 00:05:02,840 The display texts just can scroll down and look for where that is OK. 73 00:05:05,240 --> 00:05:08,140 So I'm going to change this text here from browse 74 00:05:11,560 --> 00:05:14,500 to pause. 75 00:05:14,590 --> 00:05:18,000 So this will now represent my pause button. 76 00:05:18,170 --> 00:05:18,890 OK. 77 00:05:19,100 --> 00:05:29,170 Next and when I change the text on this bottom first this will represent my stop button so I can stop 78 00:05:29,170 --> 00:05:30,780 the music playing. 79 00:05:30,870 --> 00:05:41,590 Next I want to change the background color that I'll compare oh just browse to see what takes my fancy. 80 00:05:43,420 --> 00:05:48,690 Okay let's see what does this look like. 81 00:05:48,710 --> 00:05:49,390 Golden. 82 00:05:49,690 --> 00:05:49,990 Yeah. 83 00:05:50,020 --> 00:05:51,540 That would work. 84 00:05:51,580 --> 00:05:52,960 Come here the final button. 85 00:05:52,960 --> 00:06:00,640 This is gonna represent my exit button so I'm gonna give it a C.. 86 00:06:00,640 --> 00:06:09,040 Give me that blue but I need to change the title on the text from browse to exit 87 00:06:14,900 --> 00:06:15,560 so that's it. 88 00:06:15,590 --> 00:06:22,400 So I am happy I've got all the button controls now headed for the form. 89 00:06:22,400 --> 00:06:35,390 So in the next lecture we are going to add an open file dialog that basically actually lets quickly 90 00:06:35,420 --> 00:06:36,160 do that. 91 00:06:36,160 --> 00:06:48,530 Now I hope the lecture has not gone on too long so click on the tool box and click on dialogues and 92 00:06:48,530 --> 00:06:51,870 just distribute one that is open file dialog. 93 00:06:52,700 --> 00:06:53,130 Okay. 94 00:06:53,120 --> 00:06:54,400 For drag it onto the form. 95 00:06:54,440 --> 00:06:56,300 It shows up at the bottom. 96 00:06:56,300 --> 00:06:58,100 We'll use this later in our code. 97 00:06:58,100 --> 00:07:04,370 This will enable us when we click on the browser button it will open up a dialog where we can select 98 00:07:04,820 --> 00:07:06,950 the music file we want to play. 99 00:07:07,070 --> 00:07:09,520 That's the purpose of this open file dialog. 100 00:07:11,630 --> 00:07:14,480 So that's it for this lecture in the next lecture. 101 00:07:14,480 --> 00:07:21,470 We are going to write the code that will connect all these buttons and make the music player work. 102 00:07:21,950 --> 00:07:23,000 Thanks for watching. 103 00:07:23,000 --> 00:07:23,760 Bye for now.