welcome to number shuffle game developed using visual basic.net and here have the display that shows you how many clicks so far and if you want you can always click on exit no I don't know when to touch it let's try that one out no we can only switch off for the game and start it all over okay so that is how it all works so what I'm going to do now is I'm going to take you guys to the shoe basic.net we can put one of these together so let's do that now guys welcome back
to beach basic now we'll need to do is just to click on this create new project okay let's give our project a name make sure you select be Shaw basic and select windows forms application so right now I'm just gonna call VB on this fall number shuffled and score shuffle there and click on OK alright if mine is ready now let's define the size of this form I'm going to make that approximately 1200 let's go for 654 day right that's fine the next thing I want to do now is to get some buttons on board
come right down here grab a button and I will also need just one single text box there we go I have my text box and my buttons there for both components I'm going to change no let's change the size of the Tet spell the button to approximately 48 the font will be 48 why the size will be on DRAM 4140 won't go for 48 make that bold and a size will be on 140 but I'm 40 and for these text box I'm gonna make the size of that text box let's go for four hundred and
six by five hundred and seven and what about the location the location for these six hundred plus with us and yet let's just say that is in the before and come right down here multi-line check that and say yes there we go and now for this button we need 16 of those in fact I'm gonna need it in hold on to your control click and drag we have two three and four and so on I'm just going to select it all drag it down there we go and in total I have sixteen there so button
sixteen I'm gonna delete the content we have inside button sixteen that's gonna be empty okay as for the rest of the button let's just number them let's start from this ver one that would be one two four five six [Music] eight we have nine teen teen 14 and 15 there we go guys all my buttons are now named Oh numbered now I also need two more buttons right here hold onto the ctrl click and drag so this very bottom I'm going to change the size to approximately let's move that totality by as a to Nativity
76 [Music] and just hold on to the control clear under probably - probably my buttons are ready now the next now want to do is we go to the solution Explorer right click on this solution Explorer let's click on add we want to add a model so let's come right down here that's the model if you guys cannot see it once you click on it or you can always go to project to add the model here comes this dialog box right in the air that is the mode I'm just gonna be the name us now
my mother one is ready the next thing I like to do now is to come right in here and create some sub Presidio sub procedure empty slot I'm gonna call this empty slot checkup all right MC slot checker discreet enough name for me and India I'm going to have right in here let's say I say by reference and my reference I need a following I say I'm gonna pull that button one bt 1 plus button there we go I'm just gonna copy that because I need another button these two buttons will be checking to see
if there's any empty slots so this is but remember to I mean he ain't it next time I'm going to do issues and if statements a button if button to the text it was empty then but into docked x equals bottom morning so let's copy that and just paste them all over that it was but that case but someone living empty they just come right down here copy button one twisted right day yet as they are taking care of so the next team is let's create another sub procedure deserts of Presidio will be my solution
checker so right through the detailer space dancing and just change out to solution Jacob okay in the case of my solution chair club I was gonna check the check each of the button to make sure everything India is in order less safe but then if from one so from one the bottom one but I have to call bottom call from one because all of the buttons are on from one that's why I'm calling from one okay if from one that button one duct x equals one from Jude button gives that i lov disappeared so the
next one is going to be from to hear from one button true it's gonna be two equals two we just want to check that weakens the fire will can identify the winning game or not so this one is going to be three three here now we need another one that's gonna before they started there and so on guys and we don't have to speed that up does so I'm right there guys those are my winning combination once every single button T's in order one two three to fifteen damn will have the winning shunderson buckets we
can always use a message box - she just celebrate the winner so let's come right down here and just a message message box duck show as follows the show a sale well done let's enter all the arguments in there and this is going to be the tie to shuffle game okay so we have stuff in there let's enter two more arguments in here the next one is going to be message box button that okay okay then comma oh let's use message box icon in that case that would be dot information there we go right this
is that all done now that all that is done these celebrated message and so on let's do one more teensy right on the form I'm going to declare a public variable and let's double click on that so right underneath my public last one I'm going to enter public counter as each day and this way public counter I'm gonna call it in Simon delassalle has come right underneath you so let's say from one but counter they will go in this case counter because from one dot count ur lost one yeah so now anytime we click on
the button counter would definitely increment by one but we need to be able to display the information on this text box so let's come back in it so to display that what we need to do is let's say from one dot Tex from one dot text box text box 1 dot X equals number of plates okay and in that case or number of plates and from one dot contr let's copy database detail there we go so for every clicks the counter the from the text box is actually displaying how many clicks so far so the
next thing we want to do now is let's use a follow-up before that let's write another subroutine here and just call it shuffle the case of this racial fool I am going to be declaring an array and this parade is going to be 1500 feet and a common I'm going to pay another one I and all of this is going to be Leslie our pain and detail all of these as integer yeah now let's declare another one that's going to be known as flood the case of flood expression that now come right down here smoothly
subset are you guys can see it so the for split my flood is going to be we assign the body of horse now the Sakai it was one what about Mari has say a it was J now let's use a four by D Y D Y I this less than that it goes to 15 and in that case the shoes random a cylinder bodies and minds as follows inter practices right there then our M equals and as made of [Music] they say team x random and a parentheses plus one okay now we're gonna use a
for loop now let's come by Jessie J equals 1 what everybody will have inside and if a if a is less a a is J earning that case R in him and just use the CSV for us for the flag in this case okay that's I just have to speed that up anyway that is that for before loop and yeah the flag will be true as depravity fools okay now let's come down in a sec right hundred eighty for you I'm now in a coffin one and let's say from one that's person one want to
now are doctor X itself now I want to add whatever we have inside inside the array so it's going to be one so let's just copy this we need 15 of those 16 into top copy and then we just change the numbers around that's it's extinct and number 16 will be nothing this would be 15 and so our dice that's 14 13 12 11 10 and so on seven-six five for and they're also my models is all taking care of now they have a good look at that okay take it from the top yeah smoke
disarray you can see the message box right and take it down that's sweet I love use my randomization to take care of the numbers and I'll sign in the array to the patents now let's go to the forum right here on the phone we double click on this double click on button 1 okay the first thing we wanna try and achieve is inside this very bottom one is to be able to check the location of each of these but you see like button one has button to right beside it and right underneath it is button
5 the same thing applies to buttons you have 1 3 6 3 in the case of 3 we have 2 4 and 7 and so on but first and first let's go back to the formula you see the form load we need to be able to call this very shuffle let's call that I'm gonna have to call that inside form load so that would be the procedure that we actually show through the buttons around so who's taking care of that and even this command we can always call that I wish you call that in here
as well that's going to be for my receipts so let's try to get the property of that get assorted and that one let me just call it to reset and this one is going to be known it exists so double-click on the reset button and take care of that then we can then take out the bottom one because of the bottom one double click on button one right here let's call the empty slots so empty slot chakra inside against the empty slot checker let's check the position of button 1 , button number 2 so that
is 4 2 then the next button bits underneath button one is button fried copy that and paste that right underneath and changes to button 5 and let's call the solution X the solution checker to be sure that everything is recorded and check to make sure is correct there we go now that's four bottom one taken care of I'm gonna copy that let's come in here for button 2 will have one three six double click on that and the force the checkers gonna be button to button - then we'll have 1 3 and right underneath it
6 is that that's sexy today I'm going to copy that again now let's check out the other one that is for bottom 3 is 2 4 7 so let's come in here change to more than 3 four and seven so this is three three so let's check button for come right here but the number four double-click the case of four we have three and it's okay just two three and eight get rid of this button for the three and eight now what about button five but in five is one nine six double click button five
one nine this is six ninety let's see one six nine okay that's fine so we need to change these two five five five and five there we go now button six is five to seven ten double click on that we have five to seventeen and this will be ten five to you so far and this is button six and so on right so I'm going to have to speed that up now that you guys get the whole idea okay guys I have officially finished with all of the buttons will have a Bob local teen smooth
this up a little bit yep come right down at six seven eight [Music] 14 15 and 16 so let's try this out see oh you have an arrow okay a thing that must be right in here let's book today oh look at it already by here but tell me that equals empty classroom okay let's try that again this up that's fun guys alright so our number shuffle is taking care of so just a little bit of amount of modification to it now so what I'm going to do that is just to change the appearance of
everything so let's exit that in the first place I want to increase the font size of the text box so for my third box I'm gonna make that approximately as before [Music] see it's coming up there's gonna make that 84 board click okay now the next thing I want to do is for the forum let's change the backhaul of every forum I'm gonna make that cadet blue that column Webb get a blue yeah and the text box as well as change the text box itself to Quebec blue just copy that now go for text box
change it to play that blue now let's get rid of the border let's make it no no bother there all right so that's done what about the buttons select all of the buttons let's change the color of the buttons to powder blue buttons background color the buttons will be powder blue right all of the buttons there we go that's fine now the next thing is I'm going to double click on exits inside exit immunity play as follows I exist I mean say was message box message box button dot show as follows confirm if you want
to exit right it's cold out here [Music] there is a comma enter shuffle shuffle dead as the title and another column I do decide of Collinwood before message box nothing the message box button in this case is gonna be touch yes or no comma message box let's do a question here message box icon dots question there we go now let's use an if statement to validate the selection made so Alice come right down here press Enter if I exit it was dialogue the result let's say dot yes in this case then I'm gonna say end
the reason being because I can now use application that exit for the clothes supposing the user decide to close this form close close double confirm closing and we want to select change that to chosen from frozen desert devil yes that's in the in case of phone closing we can only see e.com see it was true it was true and here the dialog results in these cases can be no there we go so we've taken care of the exit Moody's up so exit yes oh no no okay that's fine that's working now let's try out our
number shuffle you see that or else too dark let me change the color to white so calming their eggs ignore let's try this out yes okay come right here cell like that and change the color to white so they can see the Front's properly or I can just change it to control light light concerts in each chain default okay window white mask and gets the text centered as well aligned equal center alright as taking care of the phone itself let's go straight to the position start position and get it centered there now let's select all
of the buttons and for all of these buttons I just want to use mouse enter so less coming here Mouse let's go to the events and where we have mouse enter Mouse interested give that a name change column press enter a right underneath here mean it declare as followed in be us button and it was same day and be dots back color equals I'm going to say color dot sky-blue I'm not gonna make it so obvious sports sky blue is fine now so once your button once your mouse enter the bottom will change the sky
blue look at that guy's is now sky blue so let's return it back to powder blue go back in here yet we need Mouse enter so select all of this buttons again including these to come right down here chain the event to Mouse leave not mouse in the mouse Lee so insurmountable just a change doc : so chamber color tree as follows not powdered blue there we go that is that's done so mouse leaves a mouse entered on exit is down as well and that is it does that's how you create on number shuffle in
visual studio using visual basic try look at that guy's so let's see if we can win if we Lane they should be a massive box [Music] yes well lets me down okay guys I just had to speed that up so let's see if we can get it right and there we go lies look at that well done you are a winner and that is how you create your number shuffle using visual studio.net and the application is visual basics click on ok there and you can even shuffle and start it all over there we go now
the case of reshuffling we need to also reset the numbers so let's go back in here so when we click on reshuffle we want to get rid of whatever content we have on the text box so let's come right up here so that's a xbox one now and there we go guys there so let's try to reshuffle today so with that guys I'm going to call it the end of this very beautiful tutorial I suppose you guys enjoy and you all have a nice day for now by