Teaching Visual Basic at Olevel: Why and how ICT Teachers should start now as recommended by UNEB

welcome everyone to this other tutorial today I'm going to be talking about programming yeah as you aware in 2016 we may believe this satchel here that you can see here and I want us to look at this enable saying that an they are going to be starting to to start setting programming and there is a note here saying that to programming languages to programming languages C and visual basic shall be used so this is to programming languages the invisible shall be used during the teaching of elementary computer programming that is what this Allah is saying now many people have observed this many people many teachers have decided let's choose one of the two languages a few who are teaching many of them some teachers defined them saying for me I chose C and I teach C and I have my advantages he wants to because maybe I can write the code the syntax I can compile and yeah and many people would adopt to see under university so many teachers are using C program which is fine then the others who are teaching using Visual Basic alone saying see the syntax is difficult and all that and in Visual Basic you can create you graphical interface so some teachers are chosen to do that but in reality we are supposed to teach all these two languages now some teachers will say that there is no time on the syllabus Rashidah two languages but one thing I'll tell you is just about your timetable in any willingness you cannot is find the time because we are not teaching all the concepts of the language we're just teaching the elementary concepts so failure was not yet set any number where they are specific on the language they have not yet set in number in so many concepts of Co was absurd visual basic which they are they recommended here there are equations which have been coming up in general yes but in a time you never know anything can happen since they recommended now this is a since 2016 next year is now will be the 4th year 2017 2018 2019 2020 so no matter when policies like this established they give some time for for implementation before they start examining so any time you may find that they have started to examine these concepts so today how does look at an Visual Basic I have created some program here and this is a program that has to do it is a simple program it's a simple calculator for example here when you look at one if you if you if you if you look at this program here you find that I put in my number there and I put in another number here if I say right I get for C program so 1 plus 2 you get 3 1 minus you get negative 1 4 times 2 is equal to 8 4 divided by 2 is equal to 2 and also there's a provision for dividing by 0 4 divided by 0 it will tell you it can't do it by 0 if there's also a button here which I'll put if you click on it it will open your browser yes so it is some kind of action button sort of yeah when you click on it it opens your brother and opens this forum where people are registering for the workshops you are going to be having in Northern Europe and understand your calendar so this is a simple program that artists should look at and then also there's another approach which make us look at where we use instead of using this many forms we will just use message boxes for input input box so she also briefly look at that now one of the biggest challenges you have been meeting with Visual Basic is that they have been saying that you don't have the the the IDE Visual Studio Visual Basic requires us to use Visual Studio the latest integrated moment environment ID but Visual Studio is really heavy to install if you have to go to the internet and you search for Visual Studio Visual Studio Visual Studio is really heavy to download and installed on your machine and she tried to say download the latest values 2019 and tell some good MBS and when you're installing it actually requires internet and even it requires us to have PC to use yeah so you find that here you you realize this is Visual Studio video studio 2019 so you can be able to download the Community Edition is free the professional is not free you can just get a try yes and if you download this to just download this some kind of installer for you to be able to install it yeah so that is that is that is Visual Studio we just showed you but if you can you can be able to download this and then use this video studio oh you can you cannot use this when there is a new there is a that is that is a version of Visual Studio which is known as the portable version so I can move to download Visual Studio 14 yeah so you can be downloaded just to do 6 the portable version which is also on the Internet yes so you can also be you can also use it the portable version we have put a copy actually on our website is an article that I wrote here about Miss mystic ikuo and he shared actually set up for Visual Studio the dissection which has new portable 6mv version of video studio they have a visual basic 40 or you can download it from here these are only six Emmys oh you can be able to come and download it from Vivian club which come where they have Visual Basic 6 this is very least in 2019 yes so today I'm going to be using everything like this that eg does require a very strong computer it is it is it is small so for me I've already downloaded it here and here it is we just reduce exporting it doesn't require you to install you just run it you just double click and it runs that's the other you wanted this particular version of Visual Basic portable you can you can be able to open make it is you can be able to first of all click on this red key this one safe that you are those registry address to your computer so you see in an equation you want to continue see yes I guess it's just your files they data click on run we just use Visual Basic 6 okay so yeah it is good to open so you can see it's added yes II maybe click on open so in that case isn't it for you form and then the form properties here so you have your formal have your form properties yeah yeah okay yes so visual basic we use scandalous okay so this is the one thing you should notice that whenever you click on anything yeah yeah this is for you say we have a caption yeah can change this and say okay there is a there is some something here back Carla you can say okay I'm back to zero I thought using my so put my phone yes that okay so when we have this say you have a twenty two books so I'm going to get a label so this levels where I can come and I change the caption of this and I said this is is simple okay and then I want this to be the force to be I want a force to be okay to be leaven so I'll be living as my font I can also choose my heading here my car here from when one finished then next I'm going to get my text boxes some good have some good are there the text books for when I give out which type pass text box if you click on this text box area and this is known as text one that is its what that is its its title and then if I come and I get another one you never text box okay this is known as texts too so I'm going to come and put a level so in this level I'm going to come here and I change the caption and I say enter anta this rusts so that is my variable I can make this I can make this transparent as well okay so after that I'm also going to add another one the same thing I do here i get another level and they put it here so this is the level number three i can also tell it to be enter the second number so with this one also i'm going to make it transparent display right here my second d number so i finished putting my text boxes now here these text boxes this is this is a text box number one and i just this caption this text so i can remove that then this is a text box number two I can also remove matrix voice now after that I'm going to put a command button for addition so I'm going to keep this and then I say come on button now this is a command button the caption is command 1 I can make it an addition sign and I can change its font size to something big and bold 18 so that is it okay so I can be able to make another command button can you comment button okay so these are as well this is command you to try and make it a subtraction and then as I make it 18 and bolt and I can do to have another one which is for multiplication so for multiplication Jesus that is common number three I can be able to change its caption for multiplication sign you can change its font its want to 18 and bold then finally add another one the last one for division okay so that one I change its caption the division sign and then the font okay yeah so that is my negligence so we're very basic what you do is that you design your graphical side of this you can turn the cloth course interface and then you after that aside put in our decoding so this is our program now where would our SSD our answers be you can create another section you can get another ebook which is going to have our answers so you can have our label here this is going to be a before so and bhutya research ha ha caption and i can be able to change the fonts as well something big enough you can change the alignment to center you can change the back color for your label in this case I'll make use red and then I can change the foreground color to white this clear contrast yes so that is that is our that is our interface okay now after deciding if this seat is now where will the person click the person won't be able to click on the button so visual basic is event driven so where the event will be that's where we put our quad so you leave it will be on the plus sign click on this plus so when you double-click on a command button in the forum it opens the code behind that which is going to be executed when someone clicks on that forum on that battle is it going to bring that quad so this is private sub and in some these two statements the ones which always start in the basura module that partial a section which will be executed when the personal action happens so the action name is command one data click you a command one is our bathroom first legend so when someone grease on it what should know so eventually we are going to decrease value was that you are going to use first to store our data so define your words memory location without lettuce tortilla as execution takes place so here we are going to have we are going to have deemed excess there is a data type which are those dismal places whereas if you are doing Anita just then we say India so we are going to say yeah again then you're gonna have Dean research also as a devil so we have our p-value was which I've been declared after that we are going to receive data from the first from the first text books if you look here we have our text box and the first one is text box text one that is its name text one so you might have texts one you're going to have X is equal to text text text one to text text one has a field called text which is here so you can have that then why is it button text too much text that is it going to be so whatever someone it has here but there are some in terms of the text you it is the same what the difficult you'll be there so whatever somebody does there it is going to be saved in Y so for us to get our result for addition we're just going to say X plus y yes so that is a that's what you're going to use now after that first we put our answer in this result this is a level four number four so we are going to say labor labor four dots caption above order caption is important result so we are getting the result which we have got here and receiving it in this option here so if I said this if I try to compile this and run and I put in my body maybe a one here maybe I find I say odd she really gets number six here yeah so after you finish that we are almost finished so we are just made a double click on the next one which is a common number two so I can just come and copy all this code which is in here now let's contrast see edit mean copy and then we'll come in here I did my best that so that is our command – so this one will just say subtraction ok so that is done so we go ahead and double click on the next one as well yes I just come here and best this is multiplication so it would just assign between x and y okay then finally we are going to have our division say the same thing it just double-click on it and then you paste your code okay so we have that also as our our so with this one is a division but it is sure you're dividing by zero so in that case we are good fast tests in case there is a divide by zero we should not allow it to divide should instead show a message so here before we divide we have we have enforce cons put an if function will unlisted image say if Y is equal to 0 then cos it Y is the initial use it for the idea so if Y is equal to 0 then we should just tell you should just we should just put demo for production just put there this can't be right so if we do that so else so you kiss so you kiss um so this is known as concatenation so in case they why they divide 0 then she just said okay but in case they did right there is not that is else then you can go ahead and get a result and say India yes so that is our that is our function so far this our calculator so if I come back here the temperature increase is for sale as well our textbooks yeah it was can be seen better and make it 16 can make it 15 rather so and say see if I put entry off and I put it into three add 15 I subtract nine and my disease I divide four if I put zero here they said you should say country divided by zero so if I divide by something that's India 5 so that is actually that is working very well now there is one more item that is bad which I didn't did you know the original action we could you better delete our website so that button I'm going to come here they said this one button once tell people to cover our shop to learn more so in this button here we are going to say so in this lesson we are going to say we come where it is an the caption and say it is that is that means four more let's meet in the prickly resistor see every single let's meet it yeah okay so that is our message in Visual Basic so how do I put in the the action yeah you just you just double click on this and it'll bring for you command button faith then you put in this command yeah this command click objects there is scripted shell then you run this this is our website safe side we have a people to register so you run so that say to give get object that means this may be a command you can learn more about these commands or these commands babysitting oops a little said called baby cheetah cheetah net this one has all the tutorials that you need planned if you want learn more commands the commands you need to do this aside the baby yeah this baby should have knit you can't be able to learn about visual basic and ordered a large areas they are very menu on this site yes so yeah so this is our program and we are finished I'll try it again see here it opens the browser which is fine yes so we are finished so after I've finished our caption editor we can go ahead and save it as an executable file so we are going to come and say that before we save it you can change the icon under the properties window once again say click on your phone it is somewhere here where it is icon on the phone properties so they can be able to defend your equal so here for me I have an icon on this computer can save an image on your computer in the form of that is I see to get an icon you can get an image an image which can be represent your program which can be an image so you convert convert and such for converts image and you can go to such that in go go and you'll be able to get a website like this icon that create icons from PNG and JPEG images online so you can use this to convert your image so for me I already have mine so I'm going to click on icon and then I can be able to get my icon design the desktop is here calculate I see yes yeah good so from there click on file and then click on make come either exe in the some options here considered equal there a version company name we got putting all these things because we made it we just say ok so that is our program so you click on that ok so the program is going to create this second calculator which we are calling come to yes so we have our country so you go to desktop and then underneath a walk I'll be able to find a complete program they double click on it can't be able to put in my numbers can Andy them and subtract multiply divide and it can affect this each can be able to yes so finally I want to find you over me inverse don't fear to is to teach Visual Basic polymer really even when you look at the syllabus the syllabus here does not tell us to do much this is the syllabus actually we are supposed to do some simple things up but he said his companion record some trio programs here for doing some simple addition yeah so we should be able to explore this and it does meet a team it doesn't Berkeley College Saturday this Saturday please go and register on this thing it has very me discussed more about how can be able to do this yeah there are other materials here there some materials here which have been shared this article in decide coaches and website there are some materials there some papers there are no Dean link for downloading the software there you can even do this in Excel if you don't have this software disposable there's some pasta pass here mister available mystic aku so you can go and get and then a some other example here the program which is two numbers yes this is a simple program some it gets the average of two numbers now with this one here Selena Bush comes in in the exams whereby we don't expect a person is not defined it so in this case we aren't using the text boxes let me also do this one country so this is a this is a simple napa you would find the codes let me just copy this code what about my vision is and I'm going to create an you any projects standard one so will this one I don't think I'm not interested in a graphic resident of isola meter set in I just get one button which is going to be my new button for executing my code then I double click on that then I put my so in this one they before customary is not on the focus really is not a much so this spread it's up already because Olivia so you move this you leave those ones you can remove the strip now one thing that you should notice a turn Visual Basic has these comments in Vienna see we put comments using slashes but in Visual Basic we use bit what so here we have these squats so this is deemed a serial we are defining our variables all of them as integer on one line mm-hmm and then after that we will capture we are not capturing from a text box life last time last time we got our value from the text box if you look here okay we are getting our body from what I call an input box which is going to be a prompt so this is going to prompt our users to enter the value here we also might object is a prompt then because it is text which is entered into that prompt we use the value of the value function to convert it into a value so here whatever is entered is combat in jail we add the two we serve them in the sum function then you also get the average by getting the sum divided by 2 since there are only two values and then we use a mesh a message box now message box without this text since the sum is this is text then this one is a concatenation of already tight ads this one's plus the body which is under sound and then also the average so if I save this call it sum and average if I said that sum and average and then I run this it is going to bring my command cuz I need to do much on the graph isn't effective on that you tell me enter value for x by putting 8 enter value for 1 2006 then tis again tell me the Sun is 14 and the average is 7 yeah so with this one yeah the main focus was on the coin just like in C you can have something like this running on the console so here it is so if the index terms in your name for example the basket for code for program that adds two numbers then said of this candidate imagining the textbooks puts names and all that you can just use the main concept of declaring a variable capturing input and then after capturing input we have the computation and then after that we have the yes so that is what I wanted us to do and thank you very much and I wish you the best let us meet let us meet in reader fellow on ice itself Association and subscribe for more tutorials or other packages thank you very much

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *