Visual Studio WinForm Windows Calculator Tutorial Example (C#)

  Рет қаралды 843,344

Chris Merritt

Chris Merritt

Күн бұрын

Пікірлер: 409
@creadordanbont9410
@creadordanbont9410 9 жыл бұрын
My 10 year old son found this really helpful for a school project. Thank you, very clear explanation.
@TheOrLyricsAndMore
@TheOrLyricsAndMore 10 жыл бұрын
Thanks !! I built it myself. You explain excellent and my English is not so good. But I understood everything you said. Everything works! Thank you again!
@sareeraafridi4451
@sareeraafridi4451 5 жыл бұрын
What about point ?
@DivineGaming00
@DivineGaming00 8 жыл бұрын
This is the first thing I've been able to successfully make in Visual Studio (2015), thank you!
@adityadasgupta5779
@adityadasgupta5779 5 жыл бұрын
This video turned out to be a complete lifesaver for me. Thanks, Chris, for such an informative and to-the-point video. Subbed!
@klarapopilkova5791
@klarapopilkova5791 3 жыл бұрын
This was so helpful. You commenting was also very useful, I dont see a lot of coders do that and I definitely appreciate that. With your system I was also able to add square and square root function or personalize the equation part. When you made a mistake you corrected it and said why it happened and why it should be this way so that is a plus for me too. So just thank you :D Edit: Also I used VS 2017 and it still worked perfectly.
@mileskenyon
@mileskenyon 7 жыл бұрын
I forgot to thank you but you helped me pass an assignment last year. I was doomed without this. Thank you!
@nikoladjukovic8010
@nikoladjukovic8010 10 жыл бұрын
He forgot to debug calculator by preventing divide by zero. But in all other cases he did job perfectly!!!!! Well done.
@icedjadex
@icedjadex 4 жыл бұрын
This was a great tool! thanks so much. Saved me so much time not having to type out the code for each number! Awesome work!
@billdouglass8958
@billdouglass8958 10 жыл бұрын
Thanks for sharing this... Nice introduction to Windows forms and C#... Finally a tutorial that doesn't create useless Console apps...
@danilovictor1
@danilovictor1 7 жыл бұрын
Que simplicidade no projeto, o código ficou fácil de entender, fácil de ler, e o importante, o código não ficou extenso ou enxado. Aprendi boas práticas nesse vídeo. Quando comparei o meu código com o seu, senti até vergonha... hahahaha.. Parabéns pelo tutorial. Ganhou mais um inscrito para o canal. Atenciosamente, Danillo Victtor - Brazil
@godfathermikal
@godfathermikal 8 жыл бұрын
Sweet! I'm making the transition from Web Applications to Windows Forms and this is actually quite helpful! Thanks!
@chrismerritt7291
@chrismerritt7291 11 жыл бұрын
A continuation of this video is now available @ (Part 2) Visual Studio WinForm Windows Calculator Tutorial Example (C#). It addresses some additional functionality like allowing for running arithmetic operations without having to click equals every time (as pointed out by @CCCCXD), using the keypress event to allow users to use their keyboard to type numbers, and some other minor tweaks.
@BrianKTran
@BrianKTran 9 жыл бұрын
Chris Merritt Great tutotial! I'm building a basic qwerty keyboard on C# Win Forms for a presentation but im kinda stumped. How would you assign each button to the actual button on a physical keyboard?
@chrismerritt7291
@chrismerritt7291 9 жыл бұрын
Brian Tran , check out 12:20 of the second part of this calculator series. It demonstrates how to use keypress events and that'll probably help you do what you're trying to do: kzbin.info/www/bejne/pWOoh4anptqksMUm20s
@BrianKTran
@BrianKTran 9 жыл бұрын
Thanks Chris Merritt! Appreciate it!
@andrewharmon5843
@andrewharmon5843 9 жыл бұрын
for me the code to remove the zero if another number is typed does not work.
@andrewharmon5843
@andrewharmon5843 9 жыл бұрын
this doesn't work
@dalimmohammad1614
@dalimmohammad1614 8 жыл бұрын
Thanks a lot.....:) For this app I just learn the Button control property which is much needed for me and whats I was looking for about 7 month. Now I can use the Button control setting in my application to reduce huge code. And I wanna say Thank you again. :)
@kimjongun9915
@kimjongun9915 6 жыл бұрын
I saw a similar tutorial to make a calculator.The only difference is that the other tutorial had a million lines of code compared to yours. I guess this is a lesson on how to create efficient code. Thanks for the tutorial.
@jeffreyjohnston3368
@jeffreyjohnston3368 8 жыл бұрын
Hey Chris, thank you very much for making this video. I have never programmed anything before and found your tutorial very helpful. I am very happy to begin learning to program! thanks again
@willhogan8729
@willhogan8729 10 жыл бұрын
Thanks a million Chris, fantastic tutorial. Really helped my get started in C#
@patrickhogan3487
@patrickhogan3487 10 жыл бұрын
HI Will just been messing with some sites and came across this i presume that it has something to do with facebook. talk with you soon DAD
@Theclectic
@Theclectic 10 жыл бұрын
When I start a new language, a calculator is always my first project. Thanks for the tutorial. And I didn't know could have generic events for all buttons like you did there.
@nehmimirthsnow
@nehmimirthsnow Жыл бұрын
Wonderful Tutorial! Wasn't really building a calculator, however I wanted to make a login screen with a numeric pad. This helped me tons! Thank you!😄
@vadnegru
@vadnegru 8 жыл бұрын
if case just adds strings together(in vs 2015 it do this) just do cases like this: result.Text = (value + Double.Parse(result.Text)).ToString();
@browniqqa
@browniqqa 3 жыл бұрын
thank you friend you helped me alot
@davivify
@davivify 10 жыл бұрын
First, I want to thank you for your illustrative video. One suggestion I could make, especially as this is a teaching tool for new programmers, would be to use the state-machine pattern, and do the analysis before writing code! That way, when you encounter a logical error you don't end up hacking around in code - something, by the way, I know alot about. You were able to solve the problem in a few minutes because you happened to see the problem. But it's easy to get lost in code for hours. Or days. Especially when you want to expand beyond a simple 4-function calculator. You thrash around doing lots of trial-and-error, tearing up your code, introducing new bugs, and forgetting how you started. That's when they put you in a padded cell to chill out awhile ;-)
@G0nzA10895
@G0nzA10895 7 жыл бұрын
Hey lad thanks a bunch! you're a great teacher I just started using Visual Studio and this gave me the perfect kick-start.
@briancrane7634
@briancrane7634 9 жыл бұрын
Last comment over a year ago. I hope you're OK and doing great! Thank You, Thank You it is always so much easier to learn by doing! I know this was a short video but it helped me a lot to get oriented to VS. Thanks!
@chrismerritt7291
@chrismerritt7291 9 жыл бұрын
+Brian Crane I'm the same way, Brian. I can read about it all day long, but until I start trying to do it myself, nothing sticks!
@sfthasim8811
@sfthasim8811 7 жыл бұрын
Thank you .very much... This video is big helpful my study. My ICT computer class ..sir gave group work vishul studio project.
@tjokkerstar1462
@tjokkerstar1462 8 жыл бұрын
dont know what i have done but after the first number and then when i click + i cant etner more then 1 number so 33 + 33 is not possible :( but 33 + 3 is.
@earljaycaoile5071
@earljaycaoile5071 6 жыл бұрын
I don't know if you figured this out, but you the solution is in the last 3 minutes of the video. I just went through it and experienced the same issue.
@lalruatsangabawitlung3728
@lalruatsangabawitlung3728 5 жыл бұрын
Same problem here
@Superman-hr4xl
@Superman-hr4xl 10 жыл бұрын
Chris please make more Winform application connecting to databases. Your tutorials are awesome!
@jacksongilstrap8488
@jacksongilstrap8488 10 жыл бұрын
How do you get those two vertical lines at 7:39? I can't find them anywhere on my keyboard.
@remzk1ng
@remzk1ng 10 жыл бұрын
|| is achieved by pressing shift and \ above enter.
@jacksongilstrap8488
@jacksongilstrap8488 10 жыл бұрын
remzk1ng Ah, thank you.
@remzk1ng
@remzk1ng 10 жыл бұрын
Jackson Gilstrap No problem!
@SubtoMementos
@SubtoMementos 3 жыл бұрын
Just press the shift key and press the button left to the second shift in the right side.
@ttrip86
@ttrip86 7 жыл бұрын
Thanks - great tutorial! I've been having a tough time finding good Windows Forms resources.
@snoopdrg151
@snoopdrg151 5 жыл бұрын
wow, amazing. i've been looking for a good tutorial for a while now, i guess i can stop searching now😉
@gunn3rboi
@gunn3rboi 10 жыл бұрын
thanks for the video, although i already knew c# i wasn't to sure how forms worked and this video really helped me with them.
@politicaltruth4241
@politicaltruth4241 10 жыл бұрын
awesome tut...and for the noobs you can highlight all the buttons you want to apply the same click even to so you dont have to keep clicking back and forth
@tjgamer1404
@tjgamer1404 8 жыл бұрын
Listen there is one problem with the - because every time I put a number and then - and another number, the second number restarts (really hard to explain it)
@igfxfaacvhuu1
@igfxfaacvhuu1 7 жыл бұрын
Same here he tried to fix it but it didnt work for me I think he just copied and pasted a diffrent code so he didnt have to do it...
@RodneiJ
@RodneiJ 7 жыл бұрын
This problem is solved at the end of this film .
@Macca15
@Macca15 6 жыл бұрын
You need to set the bool back to false, I believe.
@ahmedabdul-aziz6986
@ahmedabdul-aziz6986 4 жыл бұрын
Stuck at 11:39 can't get the text box to work. I get an error saying button does not contain a defenition for Text
@СергейМоклоков-ф3с
@СергейМоклоков-ф3с 6 жыл бұрын
Огромное спасибо! Что говорил ни чего не понял, но видио пригодилось для создания первой программки на С#
@grootjebbink
@grootjebbink 10 жыл бұрын
thnx for the good explaination but i've got one problem, i get the following message: " Error 1 Operator '-' cannot be applied to operands of type 'double' and 'string' ". I get this for the '-' , the '*' and the '/' but not for the '+' does somebody know what i'm doing wrong?
@PH-bl1bb
@PH-bl1bb 10 жыл бұрын
very good video, clear and easy to understand. thank you for tutorial!
@chrismerritt7291
@chrismerritt7291 10 жыл бұрын
Thanks!
@StickMan1316
@StickMan1316 8 жыл бұрын
Chris Merritt On C++ do you know how to use the Button b = (Button) sender??
@saadsalman4518
@saadsalman4518 8 жыл бұрын
did not get the button b = (button)sender part
@chrismerritt7291
@chrismerritt7291 8 жыл бұрын
If you look at the event handler method, sender (the component that generated the event) is generically typed as an object. Because we built the event handler and hooked it up to a button, we know that any time the event is fired that the source of the event is indeed a button. However, like I said, the sender is typed as a generic object. SO, before we can begin to talk about button properties or use button methods on our button, we first have to cast the generic object as a button. Then we can talk about the button properties for the button that caused the event to fire (and the method to be executed). Does that help?
@saadsalman4518
@saadsalman4518 8 жыл бұрын
aah , ok , still in the learning phase , ,,, did get it now , thankz for your help
@yogendralakraj3214
@yogendralakraj3214 4 жыл бұрын
Thanks for your tutoral.i was able to apply it in a similar project 👍
@madinakenzhina8264
@madinakenzhina8264 9 жыл бұрын
hi! thank you so much for really claer explanation! but one detail was missed: how to work ith deciml nmbers? I mean when we press "." unfortunately it founds an error
@StaglyMusic
@StaglyMusic 4 жыл бұрын
u solved this?
@khizar1995
@khizar1995 8 жыл бұрын
Sir thanks a lot. Just a question that can we use a label box instead of the text box?
@chrismerritt7291
@chrismerritt7291 8 жыл бұрын
Sure. I think the code would be precisely the same, presuming you named the instance of your label the same as what you (would have) named the instance of your textbox. Bother are updated by textbox.Text or label.Text. Cheers.
@fahim6191
@fahim6191 10 жыл бұрын
Unable to perform Calculation for more than 2 numbers? need help immediately!
@Sniper15k7
@Sniper15k7 8 жыл бұрын
Thank you for teaching, i'm so happy because peoples as you in youtube. :D
@megafonural
@megafonural 10 жыл бұрын
Thanks for tutorial! Now i see how similar C# WinForms to good old Delphi 3 =)
@14mebloscianka88
@14mebloscianka88 10 жыл бұрын
Is there any relevant difference between Convert.ToDouble() and Double.parse() methods?
@kolombiols
@kolombiols 10 жыл бұрын
nope.
@ditz3nfitness
@ditz3nfitness 2 жыл бұрын
The comma/dot is being turned into a whole number. Any way to fix that? Like when you write 1.5 it gets turned into 15 on the label, and it also calculates/stores it like that. So if I were to do 1.5, then tap "*", and then do 3, then it would come out as 45 and not 4.5. Need it for an exam project here in 2 days
@pavankumarveerla6365
@pavankumarveerla6365 8 жыл бұрын
thank u chris meritt....it is helpful for my mini project ........thank u sooo much
@MrCman411
@MrCman411 10 жыл бұрын
I'm currently doing a lab on this using visio studio 2010 but the problem is my button click code uses handlers and yours does not. Any reasons as to how i can overcome this because then the code is different to yours
@chrismerritt7291
@chrismerritt7291 10 жыл бұрын
Hey Caleb, Not sure I'm following you.. What do you mean by your button click code uses handlers and mine doesn't? If you want to send me your project, i will take a look. Send it to cmerritt [at] richmond [dot] [edu] .
@MysteriousMadnessOfficial
@MysteriousMadnessOfficial 10 жыл бұрын
Thank you! :) Can't believe I did it :D You gave perfect explanation to it all so it was perfectly understandable. :) Again thank you so much. Great job
@ebros2898
@ebros2898 4 жыл бұрын
I did exactly what you did on Visual Studio 2019 but my calculator appends everything. Can you please tell me how to fix that?
@darren8063
@darren8063 9 жыл бұрын
Can i ask something ? i`m new at this what`s the "Parse" is use for ? can u tell me please
@Ahmed-nr6wc
@Ahmed-nr6wc 7 жыл бұрын
Thanks mate, you explained everything clearly.
@cramo12345
@cramo12345 10 жыл бұрын
Thanks dude your really good at explaining things.
@bonnistripe
@bonnistripe 7 жыл бұрын
Thank you very much! This video helped me with my homework.
@stanleyoverby4179
@stanleyoverby4179 9 жыл бұрын
Great tutorial Chris. i'm looking forward to the next part. I would like to add some more buttons on mine to include feet & inches as well as some other construction calculations such as slope, rise & run. Not sure if you touch on that in any of your other videos. One other question, i noticed that you did not have private void Form1_Load(object sender, EventArgs e) { } under the Form 1 class but when i took it out i got an error message that would not allow me to display the form until i put it back in. Am i missing something?
@chrismerritt7291
@chrismerritt7291 9 жыл бұрын
+Stanley Overby If you have Form1_Load specified in the form designer (the lightning bolt) for the Load event of your form, and you deleted the method, that could cause your program to not compile, and will make the designer freak out too. That's probably what happened in your case. To fix that, go into the design view, click on your form, then in the properties pane, click on the lightning bolt. If you see a handler specified for the even Load, then just remove it. Then, you can go to your code-behind and remove that handler. Hope this helps.
@rbnxleadln
@rbnxleadln 8 жыл бұрын
if you get the answer example of 13 then you would press 2 to make 2 x 2 =4 will it just do 132 instead or reseting to 2?
@laureng3338
@laureng3338 10 жыл бұрын
Can you help please? I can't use the generic command for all buttons so I had to do the numbers individually and it worked fine. Now I am on + - * / and I have no idea how to code it individually!!!
@SSJfraz
@SSJfraz 8 жыл бұрын
Please help. When i'm using "||" it tells me its an invalid expression term. Am I doing it wrong?
@chrismerritt7291
@chrismerritt7291 8 жыл бұрын
Paste that portion of your code so I can see exactly what you have.
@SSJfraz
@SSJfraz 8 жыл бұрын
Hey, thanks for the reply. Was missing a closing bracket. Problem solved now. Thanks!
@Jaydin1Jordan2
@Jaydin1Jordan2 10 жыл бұрын
I made this in Visual Studio 2013, and it didn`t work. Then I looked in the description and it said to use 2012, 2010, 2008, and 2005. Any fixes that you can give me?
@Blarp29
@Blarp29 9 жыл бұрын
Works fine for me, make sure you're in a C# project, not VB
@quinnhuntsman5531
@quinnhuntsman5531 7 жыл бұрын
Chris Merrit hello I cannot see on my CE button when I change the text to CE it only displays the C...I set my font size to the same as yours so I'm not sure what's going on
@seviperix
@seviperix 8 жыл бұрын
have an issue, after I press for example number 1 and than the operator "+", the next number i want to type in shows up right next to the frist number so in the text box stands than for example 12+ but after I pressed the operator I cant get a number so I have a calc that cant calculate can u help me out plz?
@MarcoAntonio-wi4pb
@MarcoAntonio-wi4pb 7 жыл бұрын
Muito bom a forma que você desenvolveu os códigos. Muito obrigado pela aula
@hassanbzahid
@hassanbzahid 7 жыл бұрын
Can you suggest how we can do Test Driven Development for this calculator app ? Any approach you can suggest ?
@mcgrann89
@mcgrann89 9 жыл бұрын
For those struggling with making this application run, make sure you have a double bracket at the start and end of this line: if ((result.Text == "0")||(operation_pressed)) I have noticed a few comments and thought this might help!
@56darren
@56darren 3 жыл бұрын
I have a question how would you do 1/x, x^2, and the sqrt function? Thanks
@thetrialshot
@thetrialshot 9 жыл бұрын
hey mine says "The field 'WindowsFormsApplication1.Form1.operation_pressed' is assigned but its value is never used"
@bishalsenhdri7655
@bishalsenhdri7655 8 жыл бұрын
So NICE to see this Tutorial.. Thank you so much!
@ryanjohnson5150
@ryanjohnson5150 9 жыл бұрын
What would you do to stop the user being able to enter multiple decimals at a time, brilliant guide !
@chrismerritt7291
@chrismerritt7291 9 жыл бұрын
+ryan johnson I think I showed how to do that in one of the follow-up videos. Basically, anytime the decimal is pressed, check to see if the value in the text box ends with a decimal. If it does, then don't add a second decimal.
@ScienceArtCrafts
@ScienceArtCrafts 8 жыл бұрын
in DOT button click event simply use if (!textBox.Text.contains(".")) textBox.Text += "." ; obviously you would have to check if the button pressed is actually DOT when using generic function
@rajanshrestha5421
@rajanshrestha5421 8 жыл бұрын
thank you so much sir...you helped to finish my homework :)
@jomarphilipracimo1098
@jomarphilipracimo1098 3 жыл бұрын
can someone help me? for some reason the bool variable which is operation_presses is never read i dont iknow why i put them in the same variable as double value and string operation
@anishvarmaadduri1551
@anishvarmaadduri1551 8 жыл бұрын
I did the same program with ASP.NET C# , But i am getting a error at clearing the textbox for entering a new number when a operator is clicked. i dont know why it happend i think i am not able to clear the textbox for entering a new number . Can you please help me with that
@chengdelee3078
@chengdelee3078 6 жыл бұрын
The most great tutorial I ever seen
@YoungDragonLiveGamer
@YoungDragonLiveGamer 8 жыл бұрын
y every time i try to put operator_click in the click thing in properties it says property value is not valid plz help Chris Merritt or the public
@KuyaKuysz
@KuyaKuysz 4 жыл бұрын
..sir where can i download the application u are using in this video.
@geezgus
@geezgus 4 жыл бұрын
kzbin.info/www/bejne/fZm0lZ9_e96fh5o here. watch this, my friend :)
@gmilrod
@gmilrod 8 жыл бұрын
Thanks Chris..many greetings from Jpn..more VC++ tutoriales plz.Adios.
@songsakchavasupakul5316
@songsakchavasupakul5316 10 жыл бұрын
Thank you so much :) I'm new for C#
@bilalalam5310
@bilalalam5310 9 жыл бұрын
i am new to programming so i want to ask that,once you have made the program, to open it you have to open the c# source file and run it through VS but how would i make a shortcut for it on desktop like normal applications,just click the shortcut and the calculator appears (not with the code file)? thankyou
@honesty9576
@honesty9576 8 жыл бұрын
when i do 5+5 the answer is 60. it's like 55+5. what have i did wrong?
@keanu8539
@keanu8539 10 жыл бұрын
Umm, I'm having a problem, when I click a button, it only allows me to put one number in. How can I fix this?
@xRMxTrojans
@xRMxTrojans 10 жыл бұрын
Instead of using just an equal sign, use like textBox1.Text += 1; so it adds another character on.
@sualokin69
@sualokin69 10 жыл бұрын
I check all of my code to yours and it matched up exactly. I get an error in the if statement though. (Method name expected) What does this mean and how can i fix it?
@chrismerritt7291
@chrismerritt7291 10 жыл бұрын
nik sloop , Probably a curly brace that's out of whack. Make sure for every { you have a } and vice versa.
@jeanettemariano1386
@jeanettemariano1386 10 жыл бұрын
hello Mr. Chris. I'm not sure if you missed it or something I think you forgot to teach how to code the "." of the calculator. the decimal point?
@one.threeh5916
@one.threeh5916 Жыл бұрын
អរគុណ​សម្រាប់​វីដេអូ​មួយ​នេះ​ ❤️️
@MarcRitzMD
@MarcRitzMD 8 жыл бұрын
Chris, what was the reasoning for choosing Windows Forms over WPF?
@bilalalam5310
@bilalalam5310 9 жыл бұрын
wow,i really appreciate your way of explaining every singly thing although minute,like you explained why did you use bool operator_pressed,keep it up :)
@reezonsharma106
@reezonsharma106 5 жыл бұрын
Thanks a lot ,It's very helpful .
@carenvaneeden1212
@carenvaneeden1212 10 жыл бұрын
How will this differ from making a game like suduko?
@neojalaly
@neojalaly 9 жыл бұрын
sir can you please tell my how to publish this calculator i mean to create a setup file
@chrismerritt7291
@chrismerritt7291 9 жыл бұрын
saaqib riyaz Check out this link: learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio. Depending on what version of VS you have, you may need it. But it's super easy, wizard based. For something like this, the features they provide with the full version aren't needed. They have a video on this page as well that walks you through using it. learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio
@neojalaly
@neojalaly 9 жыл бұрын
sir i try but this error come 1. Error 3 -3204: Cannot extract icon with index 0 from file E:\cal final\calculator saaqib\calculator saaqib\bin\Debug\calculator saaqib.exe. Please help me
@neojalaly
@neojalaly 9 жыл бұрын
when i try to publish without installsheild limited edition this error come 1. An error occured while signing:SignTool.exe not found 2.Cannot publish because a project failed to build. but my program run without any error
@imbatman9710
@imbatman9710 5 жыл бұрын
just for people who noticed a problem with values with a point this command fixed it for me double.Parse(result.Text, System.Globalization.NumberStyles.AllowDecimalPoint, System.Globalization.NumberFormatInfo.InvariantInfo);
@promocodes5962
@promocodes5962 5 жыл бұрын
Everything works beside one issue I have. When I run the code, that "0" at the front when you type a number is still remain. If you try to make calculation you'll get an error, the only is to clear it first before you put any number. How do I fix this please? I want to make that "0" change to number when I type.
@utubevids1100
@utubevids1100 9 жыл бұрын
Is it possible to build a windows form in VS using c++ instead of c#?
@GCrozariol
@GCrozariol 10 жыл бұрын
I am getting a lot of errors. When I write: if (result.Text == "0") result.Clear(); The Clear word got underlined. And when I write: Button b = (Button)sender; result.Text = result.Text + b.Text; The last 'Text' word got underlined too. Am I missing an Assembly? I don't know why all this is happening, but I am sure I am writing everything as the same as this video shows. And another thing: why am I using RoutedEventsArgs instead of EventArgs?
@misalschi1066
@misalschi1066 8 жыл бұрын
i have a problem i have written exactly as you have written but when i want to press two digit number , i cant it just one and i ve watched till the end. please help me.
@chrismerritt7291
@chrismerritt7291 8 жыл бұрын
misalschi 10 post ur code in paste bin and share link
@misalschi1066
@misalschi1066 8 жыл бұрын
pastebin.com/v9tvEgW6
@misalschi1066
@misalschi1066 8 жыл бұрын
did you find what i messed up?
@francis5307
@francis5307 5 жыл бұрын
what using systems you have use to do this please reply on me thanks
@jagdishkumarmalhi78
@jagdishkumarmalhi78 7 жыл бұрын
how to load combobox when data gridview cell click?
@thealtero1647
@thealtero1647 4 жыл бұрын
On the point where double .parse is done in plus function I kept having exception error saying input string not in correct format cant solve pls help?
@ljubomamic3731
@ljubomamic3731 9 жыл бұрын
Do you also have this problem, if I type in, for example 5.6+3, result would be 59, or 5.6+3.0 it would equal 86...How to fix this?
@matteocanno
@matteocanno 8 жыл бұрын
+Ljubo Mamić put the comma and not the point
@ljubomamic3731
@ljubomamic3731 8 жыл бұрын
yea i already figured it out, thanks
@matteocanno
@matteocanno 8 жыл бұрын
Ljubo Mamić nope
@rwxstudio7173
@rwxstudio7173 10 жыл бұрын
I went to use the generic button click format for the numbers you used and it caused errors. I had deleted the code for the individual buttons though so that was probably my fault.
@chrismerritt7291
@chrismerritt7291 10 жыл бұрын
Did you get something that looks like this: s39.photobucket.com/user/oo7disco/media/screenshot_zps072eae42.gif.html ? If so, it's because you deleted the method while it was still included in the designer file for the form. The easiest way to avoid this is to go into design view, and remove the method from the event handler (lightning bolt) before you delete the code.
@rwxstudio7173
@rwxstudio7173 10 жыл бұрын
Thanks allot for your reply. Yes, that was the error I got. Didn't realize I had to delete it in the event handler as well.
@chrismerritt7291
@chrismerritt7291 10 жыл бұрын
Randy Smith , Just put a video up that describes how to get around that issue in a little more detail, and how event handlers get mapped to controls on your form. This will give you a little more insight: kzbin.info/www/bejne/oqu3ZWSee8Skea8
@IIzJoKeRzII
@IIzJoKeRzII 7 жыл бұрын
for some reason i cant get the operator to show up on the screen or work at all :/ any ideas to what could be going wrong the code is below public partial class MainForm : Form { Double value = 0; String operation = ""; //bool op_pressed = false; public MainForm() { InitializeComponent(); } public void button_click(object sender, EventArgs e) { Button button = (Button)sender; textBox1.Text = textBox1.Text + button.Text; } public void op_click(object sender, EventArgs e) { Button button = (Button)sender; operation = button.Text; value = Double.Parse(textBox1.Text); //op_pressed = true; } public void ClearClick(object sender, EventArgs e) { textBox1.Text = ""; } private void EqualClick(object sender, EventArgs e) { switch(operation) { case "+": textBox1.Text = (value + Double.Parse(textBox1.Text)).ToString(); break; case "-": textBox1.Text = (value - Double.Parse(textBox1.Text)).ToString(); break; case "/": textBox1.Text = (value / Double.Parse(textBox1.Text)).ToString(); break; case "*": textBox1.Text = (value * Double.Parse(textBox1.Text)).ToString(); break; default: break; } //op_pressed = false;
@peterbuker2688
@peterbuker2688 10 жыл бұрын
Why does my result textbox not reset when I want to type something after a calculation?
@rickylionheart4577
@rickylionheart4577 4 жыл бұрын
what if the user divide by Zero?, can you do a video explaining exception handling?
@avinabochakraborty4241
@avinabochakraborty4241 9 жыл бұрын
This video was a great help to me sir. Thank you!
Visual Studio Winform Tic Tac Toe Tutorial Example (C#)
32:34
Chris Merritt
Рет қаралды 569 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
How To Make A Calculator In Visual Basic | Tech Amr
9:53
Tech Amr
Рет қаралды 34 М.
Secrets of The Windows Calculator
13:27
ThioJoe
Рет қаралды 707 М.
Максим Поташев разрывает (Что? Где? Когда?)
16:54
Самые интересные вопросы и моменты игры Что? Где? Когда?
Рет қаралды 1,3 МЛН
Подъем в ледяную гору. Китай против Quattro
15:32
Поднебесный Гараж
Рет қаралды 1,9 МЛН
How to Create Calculator in Visual Basic.Net Full Tutorial
12:31
Произношение режет ухо: что выдает в вашем акценте русского | Нескучный английский
21:29
Create Your First C# Windows Forms Application using Visual Studio
11:35
ProgrammingKnowledge2
Рет қаралды 357 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН