C# Calculator App Tutorial For Beginners and Intermediate Programmers | Visual Studio 2021 | Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024

ความคิดเห็น • 31

  • @ShaunHalverson
    @ShaunHalverson  2 ปีที่แล้ว +1

    Make sure to set KeyPreview = true. Also the backspace button's official name is "backSpaceButton" which I accidentally left both of those pieces out of the tutorial. If you have issues with keys, take a look at KeyPreview!

    • @lucifermorningstar9677
      @lucifermorningstar9677 2 ปีที่แล้ว

      Hello Shaun, I made the same calculator by following your steps, thanks for that but I have a problem I have been trying to fix that for a while wached this video 10 times, I can't find the solution, I was hoping if you can see my comment here, and help me out with that, The problem: When ever I resize the window all of those buttons disappear. I also wonder if you've got a discord server or any other platform you are able to communicate with your followers?

  • @anranelsaren
    @anranelsaren ปีที่แล้ว +4

    Learning how to make calculator❌
    Learning how to resize✅

  • @bruce8217
    @bruce8217 ปีที่แล้ว +1

    I personally feel this is not a great way to make a calculator in Forms.
    e.g. creating twenty variables just to manage their sizes?
    Also creating a separate function for each button press? Why not just create one function that reads the text value that each button has?
    That being said. For a newbie I am sure it will have a lot of value as repetition is a great tool for reinforcement. As OOP concepts are often kinda confusing for newbies
    Also I am only 17 minutes into the video :P.

  • @Lunar-rb9um
    @Lunar-rb9um 2 ปีที่แล้ว +4

    Personally, I'd rather have no resizing, but very easy to understand!

    • @ShaunHalverson
      @ShaunHalverson  2 ปีที่แล้ว +1

      I was that way for a while too, but I do think it’s cool to see how it’s implemented! Thank you for watching :)

  • @GaryChike
    @GaryChike 2 ปีที่แล้ว +3

    Is there a Visual Studio 2021? I thought Microsoft went from version 2019 to 2022. Good job on the tutorial by the way.

    • @ShaunHalverson
      @ShaunHalverson  2 ปีที่แล้ว +1

      Thank you, also yes there is a visual studio 2022 that just came out last month

  • @kacpermikulski3997
    @kacpermikulski3997 2 ปีที่แล้ว +1

    Hi , im struggling with resizing whole form with buttons and labels. My Load event happens after Resize event and i dont know why its happens. Firstly it seemed impossible for such a thing to occur, but i tested it by simply disposing a text in label from this events and it always shows text from Load_Form event when application starts, therefore all Rectangles have 0,0,0,0 value (because Resize happens before Load so rectangle values are default) and whole Resize event doesnt work. Also i noticed something even weirder, i checked if my buttons have location, width and height values in Load event and Resize event, i set X value of button1 to 84 and in Resize event it is 84 but in Load event it shows 63 and i have no idea why value is different from what i set in this button properties

  • @omarkhalideldaly6209
    @omarkhalideldaly6209 ปีที่แล้ว +1

    private rectangle part isn't working for me
    when I type private rectangle oneButtonOriginalRectangle I get an error, what should I do??

  • @mortezaabbasi5102
    @mortezaabbasi5102 2 ปีที่แล้ว +3

    i have got a problem in runing program , the form runs without any keys, a completely white screen 😐😐😐

    • @ShaunHalverson
      @ShaunHalverson  2 ปีที่แล้ว +1

      What do you mean “runs without any keys”?

    • @mortezaabbasi5102
      @mortezaabbasi5102 2 ปีที่แล้ว +2

      @@ShaunHalverson The calculator is running but only a white screen is displayed

    • @ShaunHalverson
      @ShaunHalverson  2 ปีที่แล้ว +1

      @@mortezaabbasi5102 hmmm. Did you compare your code with what’s on GitHub? (Link in description)

    • @Bljeki
      @Bljeki 2 ปีที่แล้ว +2

      I've just found it. Go to the Form1 tab, click the whole form (We named it Calculator). From there, navigate in the properties menu to "Layout". There you will see "AutoScaleMode". It is set to "Font" by default. You want to change it to "None". It worked for me, hopefully it'll work for you.
      TLDR: Open Form1 tab -> Click whole form (Calculator) -> Navigate to "Layout" property -> Find "AutoScaleMode" -> Change from "Font" to "None"

    • @shauryamittal2307
      @shauryamittal2307 2 ปีที่แล้ว +2

      @@Bljeki thank you so much!!!! You are a life saver.

  • @connorleclair
    @connorleclair 5 หลายเดือนก่อน

    really like the format thanks for the content!

  • @Havii
    @Havii 2 ปีที่แล้ว +2

    Hell yeah dude, I was there and now I'm still here. Much love

  • @channel-ov4zo
    @channel-ov4zo 2 ปีที่แล้ว +1

  • @veilie3649
    @veilie3649 2 ปีที่แล้ว +2

    When will part 2 come?

  • @Ariel-vu3fg
    @Ariel-vu3fg 2 ปีที่แล้ว +1

    Is it possible to create a calculator in C # that calculates over 2 numbers? Is your calculator one of these?

    • @ShaunHalverson
      @ShaunHalverson  2 ปีที่แล้ว +1

      I’m not sure what you mean by 2 numbers? You mean something like 5/(10+2) ??

    • @Ariel-vu3fg
      @Ariel-vu3fg 2 ปีที่แล้ว

      @@ShaunHalverson I mean for example 2 + 2 + 2

    • @Ariel-vu3fg
      @Ariel-vu3fg 2 ปีที่แล้ว

      In the calculator I built the answer would be 4 because it can only absorb 2 variables num1 and num2

    • @ShaunHalverson
      @ShaunHalverson  2 ปีที่แล้ว +1

      @@Ariel-vu3fg this will work, but it’s implemented in part 2

    • @Ariel-vu3fg
      @Ariel-vu3fg 2 ปีที่แล้ว +1

      @@ShaunHalverson There is a hypothesis when will the second part come out?
      Thank you so much for the content!