Visual Basic.Net (Classroom Setting) - Basics [Part 3] (MDI Form, Properties and Basic Codes)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to our tutorial so in this video we are going to add multiple forms and uh of course we are going to modify or to add controls and modify the properties of the controls okay so first we're going to add um new form okay in here so we're going to add fmrl um colleges okay so I'm going to choose add and then Windows Form so I will choose or I will use frm RL colleges okay so purpose formly okay so FM colleges okay let's click add okay so so we will also change the property again first the Border style okay the form border style should be um fixed single or fix single or fixed dialog so I will choose fix dialogue here so I will also change the font to 12 with the font style or the font size rather I will choose 12 and then um the minimize and maximize box I will set it to fals okay since this is RL okay yeah okay so this time we will now show the two forms this one the RL colleges and RL users okay menu okay so in here so first we're going to declare a variable okay MDI form so just double click your MDI form and then on the upper um topmost portion of your um codes just below your class your public class okay we are going to De cleare a variable say let's say dimm so frm this one is just a user Define variable so you can you can use any variable name okay so f frm as windows. form forms. form yeah themm as windows. forms. form okay so this time we will now um go go back to our um design sign okay in here and then I will I will double click um uh users menu M users so I will just double click this one okay so okay M users click event okay so in here I will put the code on how to show uh a form okay so I'll just change this one and then I and will explain it to you on how to on how this um codes work okay so f frm um RL users okay so this is um users okay so this one so so variable Windows Form RL users which is R users Windows Form Windows forml users okay FM ndi par equals me so MDI parm mm main MDI okay so MDI is a parent form okay so sa FM or MDI parent parent okay MDI parent FM i a okay so FM par equals me and then you are going to set the text okay of the RL users TI bar okay and then you're going to use show do not use show dialog okay so fm. show so if you try to run your program okay okay yeah and then users so users form okay [Music] soita um RL colleges so I will just copy this one I will copy this one and then we'll go to the menu M and new colleges here okay double click and then I P it here and modify so this should be f frm RL colleges and then Al this one FM RL colleges and then we will change the text to colleges yeah so you might pause it while doing it so if I will run this one okay I will show two forms okay in a single form so multiple forms example users colleges there are already two forms opened okay in our uh container so it can open multiple it allows MDI form allows you since this is multiple document interface this one the MDI form here it allows you to open multiple documents or multiple forms yeah multiple multiple forms okay in a single um window okay so example if you want if you you move it here it will automatically show or display the uh scroll bar here okay if you want if you will put it down also okay the hor horiz the vertical scroll bar will also show okay is here okay so G powerful MDI form okay so don't forget di container equals true so this time you can now open multiple forms in a single window using your MDI container okay so that's it I'll go back to the codes here okay so I hope you are doing great also I hope it's working in your own workstation okay so the next is I will put button okay in RL users so I will look for RL users here RL users and then I will put button let's say add button okay so as You observe here no menu if you run this if I will run this one change um color as I press the button or as I press the as I over or hover okay the mouse in the button so example I will just run this one to show you so like this one okay so I change also the cursor to hand and then if you if you put the mouse over the button it will change the color and if you press the button it will change also but just a little um difference in terms of the shade but as you observe green base green um uh shade with dark and then darker okay so so we'll also do this one okay interactive design application okay I'll go back here so we will put button also so you look look for button and then just double click okay yeah this time we will change the uh border style of the button so let's go so make sure to to select this one button one okay before that let's rename the button so this is BTN ad BTN ad okay this used as you click this one later as you click the add button it will display or it will show the uh FM AE users okay so that will be our next activity also okay so meantime let's focus here on the button okay so I already changed the name to BTN ad okay BTN ad and then I will change the Border style okay the Border Style I'll just look for it and then I think the it's the flat appearance we not the Border style it's the flat appearance sorry I'll just go to Flat appearance this one flat appearance okay but before that to do this one you should change this one first the flat style this is standard so you you canot change the some of the properties no it will not um take effect if you change it unless you are going to change it to Flat this one okay flat style flat okay flat but okay now uh I'll go back there flat flat uh flat appearance this one flat appearance so just expand okay this one just click the the uh cross okay to expand okay in this one okay the we have the mouse over as you put the mouse over the button and mouse down as you click the button okay Mouse over when you put the mouse in the button and mouse down when you click the button it's like this I'll just show you I'll just demonstrate it okay so by default that's the back color of the button so this is mouse over and this is mouse down yeah click I'm just holding the the left Okay click of the left click okay I just I just pressing it okay that one okay so I'll go back there so this video is not edited okay so we please bear with me so this is just a classroom setting okay tutorial so I'll go back to the okay application so this time I will change first the back holdor okay back color so I will choose like um okay difficult to choose I will just choose green also the same with the the LDH the records patient record monitoring system or management system there and then I will choose also the I will change the Four Color to make it more visible okay for color here we'll choose white this one there okay and then you may pause this video while doing it in the workstation and then I am going to change the flat appearance okay so mouse mouse over when you put the mouse on top of the button so I choose green and I will choose lighter okay Mouse down I will choose what darker or lighter this one Mouse down there so if I will try this one okay so I will also change the back color sorry the uh border style border style which I will make it black black okay there okay so when you run your application you will see the difference okay there okay so as you as I click it okay there okay so as what I've said we can also change the cursor to hand okay make sure to choose the button okay not the the form because when you choose the form and change the cursor all objects in your in your form okay will have hand cursor okay so it will become confusing so you have to choose the BTN ad and change the cursor to hand okay it's okay can be found on the last um as the last value in here hand okay so that when you run your application okay users and then here yeah hand cursor okay so interactive design okay okay now so this time as you click the add button okay as you click the add button here so I will also change the the text of the button to add okay so yeah as you as you click this one another form will display okay so AE form so I will add another form so right click your project and then add Windows Form and then here frm AE for add edit okay AE users naming conventions for edit list users okay so this time I will change the Border style to fix single or fix dialog again and then control box okay control box yeah control box okay F minimize maximize in the close box okay so font also 12 okay yeah okay so I'll go back to RL users okay form you can just go here to your solution Explorer and double click the uh form okay like this so this time I will double click this one you RL users sorry you f I think BTN ad I will double click so I double click the BTN ad okay and then I will display the this one AE users okay so FM a users. show so show dialogue so I will show you the difference okay so application okay then users and then just click this one add okay so form okay show okay form so try it form okay a forms so show dialogue okay show dialog so let use show dialogue here let's show dialogue okay show dialog it will make sure that the form will be always on top of other forms okay so this one okay just go to your application and this one this stop debugging okay so this time form so okay a user you can choose also you can use the same button so to all okay I will Design This one button you can use this one for the entire program like add edit delete so example add just contrl C for to copy and then contrl V paste yeah edit sorry edit c v [Music] delete BTN edit okay BTN edit BTN delete okay a user close or cancel okay so BTN cancel okay BTN cancel yeah so okay I will I will also demonstrate the difference between me that close at me that dispose example this one I will put text box no I will put text back um form just to demonstrate the difference between dispose and close text box okay okay this one so I have I have text textbox one here okay so I will put code me first me that me do sorry me. close Okay so if you run this one we that close Okay let observe okay okay so I put characters there cancel so using the close characters okay so form refresh form Okay so that dispose dispose dispose form recently added or entered characters okay so let's try it okay add so any characters cancel okay defect or error you can just minimize this one and here okay canel we use dis okay so one thing more form a usually screen center screen so in apply property start position okay Center screen property okay and a value okay so I'll go back there to the AE users in here make sure to select a users okay a users start position start position here should be Center screen sorry Center screen screen okay example actual okay users add text edit sorry sck text so just click this one okay so um uh RL users cck text add Okay so F RM a users. text equals add yeah so because we will that we will use the same form adding and editing okay now activity okay when you uh when you add we will use a users when you edit we will still use AE users okay so we will use the same form in adding and editing of Records okay so I will copy this one users edit now okay so let's try this one users add yeah ah sorry change so we have two we have two exchange the the sequence display form so let's try it again okay add so add text okay maximize if you double click that this one okay so Windows 11 okay or Windows 10 if you click the the the text the title bar Maxim but other version okay so error capability operating system okay so edit edit Ed edit okay yeah okay do you really want to exit close close box or exit menu want to ex uh confirmation from the user ex okay so I think that that will be the last part of this um tutorial okay so let's do it also okay Soo main since design okay this one just double click this one load event load event okay again let go to Main and then double click then load event form closing form closing event form closing event this one form closing yeah so form closing before close Okay so we're going to um put our code here okay so if so remember your your control structure using if so same structure Sil okay this time we will apply it here if a equals 1 G okay statement condition or okay so if MSG box so if MSG box sorry if MSG box do you really want want to exit next is uh but okay example uh yes or no yes no do you want to exitas yes or NOA Lang okay plus okay an icon okay icon icon question so we have information we have critical okay uh X red exclamation exclamation mark yellow warning okay plus um so this is question [Music] you may uh you may interchange the position of this one if Mage box down do you really want to exit user yes yes exit equals BBs yes yes user then and else eal true okay cancel par no so okay so this time let's wait for a while and then this one close yeah do you really want to exit yes or no so no exit do you want to exit yes okay so so before closing it will confirm the user exit application message box okay so if you can see this one yes no yes no question IC mark question mark So example like uh last name is empty last name is exclamation okay okay Lang okay only sorry okay only okay only this is inpro already okay only exclamation critical okay like uh incorrect password okay have to go here okay is call it uh yes noos question okay message box okay sample sample you can change this one also property uh appearance message box exit exit message box okay so exit sorry assuming no okay so exit do you really want to exit yeah do you really want to exit yeah do you really want to exit okay okay yes no yes no question icon okay um text exit um mess message box okay so so okay ex okay me close yeah exit want to exit form closing remember form closing event so form closing event yeah form closing so every time you close the form okay no yeah from closing yes okay yeah so in this video we have tried to um display multiple forms uh and then of course this one add a user manipulate button okay property appearance interactive okay so technique you make one button as your model okay and then you copy paste it in the different um your different forms okay so in the next video I will also teach you how to put icon in your button okay okay I'll just show you some of the examples here okay save canel icons okay so I will show you RL RL form here sample yeah uh category this one so yeah add edit delete close so because later [Music] usit buttons okay SOA for this video I hope you have learned something okay so in our next video okay we will try to um put icons okay and some other objects in our form okay so see you in our next video
Info
Channel: ITeach Tutorials
Views: 240
Rating: undefined out of 5
Keywords:
Id: z9cKww8PdDs
Channel Id: undefined
Length: 39min 55sec (2395 seconds)
Published: Mon Mar 04 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.