Visual Basic .NET Tutorial 4 - How to Create a Simple Calculator in Visual Basic

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

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

  • @Phoniex-Waven
    @Phoniex-Waven 11 หลายเดือนก่อน +1

    Thank you very much....im writing my final exam tomorrow and this helped alot

  • @sheel1972
    @sheel1972 9 ปีที่แล้ว +3

    Shared on Google+

  • @andrewcrawford2807
    @andrewcrawford2807 8 ปีที่แล้ว +3

    Thanks so much! This helped clarify a lot of things I was having issues with.

  • @ProgrammingKnowledge
    @ProgrammingKnowledge  11 ปีที่แล้ว

    • @peterveer7798
      @peterveer7798 6 ปีที่แล้ว

      ProgrammingKnowledge i want to make ball game LINGO in
      virtual basic
      can you upload a vid
      how i can do this in basics

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

    thank you brother for help

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

    Your teaching style awesome and my all doubt are clear thank you

  • @charankumar9897
    @charankumar9897 3 ปีที่แล้ว

    Very dignified and explanatory. You're too good man, thanks a lot🤞.

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

    why i get this error
    Error 1 Value of type 'Single' cannot be converted to 'System.Windows.Forms.Label'. c:\users\user\documents\visual studio 2010\Projects\WindowsApplication3\WindowsApplication3\Form1.vb 10 23 WindowsApplication3

  • @Jukebocks
    @Jukebocks 9 ปีที่แล้ว +31

    Indians:
    Teaching the world to code since 1991

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

    i was using this for a custom form that was visual basic inside visual basic (Hb) and this is what the code is:
    Public Class Form1
    Dim t As Integer
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If TextBox1.Text = "(Hb window" AndAlso TextBox2.Text = "(document" AndAlso TextBox3.Text = "(text" AndAlso TextBox5.Text = "text)" AndAlso TextBox6.Text = "document)" AndAlso TextBox7.Text = "Hb window)" Then
    t = TextBox4.Text
    Form2.Label1.Text = (t)
    Form2.Show()
    End If
    End Sub
    End Class
    but when I type text in textbox4, which I will call "ten" it says that "type ten cannot be converted to integer" could you help?

  • @aartijain5013
    @aartijain5013 10 หลายเดือนก่อน

    Thanku so much sir ......Its is very good

  • @shahiqajannat9731
    @shahiqajannat9731 8 หลายเดือนก่อน

    Thank you so much

  • @lorenzpelenio6814
    @lorenzpelenio6814 9 หลายเดือนก่อน

    How about applying "double" in data types?

  • @nicador100
    @nicador100 3 ปีที่แล้ว

    Super, thanks very much !

  • @aldrenvillaruel5960
    @aldrenvillaruel5960 6 ปีที่แล้ว

    You are so helpful!!! Thank you very much!

  • @muhammedmafas2987
    @muhammedmafas2987 7 ปีที่แล้ว

    thx a lot for video. my problem is that can i get the "result" in to label without a msgbox.??? please answer me

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

    thanks dude

  • @extrememlgbassboosts8453
    @extrememlgbassboosts8453 9 ปีที่แล้ว

    May i ask, Is there a way to an array of text, and seperate them by , I need to get 2.5,5,66, into 2.5 5 66

  • @angrydoggo7160
    @angrydoggo7160 5 ปีที่แล้ว

    Question. How do I make it give me an error if Instead of a number, I give it a word or a letter?

  • @hanamahad272
    @hanamahad272 6 ปีที่แล้ว

    thanks for the help understand now

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

    my dim statement doesnt work
    why is that? it really frustates me

  • @switchon3746
    @switchon3746 9 ปีที่แล้ว

    Nice tut.

  • @jasam4374
    @jasam4374 4 ปีที่แล้ว

    Divide the number 220.007 / 1.3 an incorrect calculation appears . Why, does Visual Studio have a serious math problem?

  • @Xinbaby999
    @Xinbaby999 6 ปีที่แล้ว

    a lot help !!!! thx soooo much1!!!!!!

  • @7MB
    @7MB 5 ปีที่แล้ว

    Ok when I make it power instead of multipling or dividing or normal with a big numbers like 10^26 it shows me 1E+26 , i want to show the actual answer

  • @jeromepalentinos8121
    @jeromepalentinos8121 7 ปีที่แล้ว +6

    WHY USE COMMA INSTEAD OF DOUBLE VAR

  • @true4189
    @true4189 3 ปีที่แล้ว

    Thank u

  • @abamwesigadrake5686
    @abamwesigadrake5686 ปีที่แล้ว

    this is awesome

  • @axmedshiine2398
    @axmedshiine2398 ปีที่แล้ว

    Hi i want this code immediately, Please reply.

  • @rushibhatt4263
    @rushibhatt4263 7 ปีที่แล้ว

    thank you sir

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

    how to put the answer inside the text box 3 that i build myself

  • @alfarisabuziad9315
    @alfarisabuziad9315 3 ปีที่แล้ว

    I got this error:
    Error BC30420 'Sub Main' was not found in 'Calc2'.
    please help

  • @monakapoor43
    @monakapoor43 7 ปีที่แล้ว

    sir / mam your video is very awesome and easily understanding but I want a video on Pythagoras theorem .. sir / mam can u plzz send link ( on visual basic)

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

      mona kapoor lol

  • @kandysman86
    @kandysman86 6 ปีที่แล้ว

    I thought you had to add private before the dim statement before it can be a global statement

  • @royapcpc4359
    @royapcpc4359 8 ปีที่แล้ว

    thanku

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

    Does not work on 2019 version

    • @7MB
      @7MB 5 ปีที่แล้ว +1

      it works

  • @YAakash
    @YAakash 7 ปีที่แล้ว

    thanks for the video :)
    when i subtract a higher value from lower value, answer endup in error. can we showup negative numbers? and how?

    • @johnjimjimenez394
      @johnjimjimenez394 5 ปีที่แล้ว

      try double instead of single and integer

  • @nurulfatihah1526
    @nurulfatihah1526 7 ปีที่แล้ว

    what if incomplete values?? how to do that??

  • @polinstar4189
    @polinstar4189 5 ปีที่แล้ว

    Can someone help me how to store data answer rather the numbers that been solved in a Microsoft access database?

  • @ray-anfuentes574
    @ray-anfuentes574 8 ปีที่แล้ว +3

    operator '+' is not defined for types 'system.windows.forms.textbox' and system.windows.forms.textbox'
    I can't run. There's an error :(

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

      SAME

    • @ElPeppito
      @ElPeppito 6 ปีที่แล้ว

      You wrote "textbox1+textbox2" instead of "number1+number2"

    • @jamesreddington2885
      @jamesreddington2885 6 ปีที่แล้ว

      your supposed to put a * not +

  • @hiimjchrisst7385
    @hiimjchrisst7385 7 ปีที่แล้ว

    Nice Video :)

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

    Help not sure what I did wrong the coding matches exactly as the video
    Number1 = TextBox1.Text error message pops up there saying Text System.InvalidCastException: 'Conversion from string "" to type 'Integer' is not valid.
    'System.InvalidCastException occurred
    HResult=0x80004002
    Message=Conversion from string "" to type 'Integer' is not valid.
    Source=
    StackTrace:
    at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
    at first_calculator.Form1.TextBox1_TextChanged(Object sender, EventArgs e) in c:\users\baby\documents\visual studio 2017\Projects\first calculator\first calculator\Form1.vb:line 10
    at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
    at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
    at System.Windows.Forms.TextBoxBase.WmReflectCommand(Message& m)
    at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
    at System.Windows.Forms.TextBox.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
    at System.Windows.Forms.Control.WmCommand(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.Form.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
    at System.Windows.Forms.Control.DefWndProc(Message& m)
    at System.Windows.Forms.Control.WmKeyChar(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
    at System.Windows.Forms.TextBox.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
    at first_calculator.My.MyApplication.Main(String[] Args) in :line 81
    Inner Exception 1:
    FormatException: Input string was not in a correct format.

    • @morpheus2953
      @morpheus2953 7 ปีที่แล้ว

      You must have entered Dim Number1 As String

    • @ken2614
      @ken2614 6 ปีที่แล้ว

      Try.... Number1=val(Textbox1.text)

  • @MuhammadAkbar2127
    @MuhammadAkbar2127 9 ปีที่แล้ว

    Great

  • @alvinkoay2961
    @alvinkoay2961 5 ปีที่แล้ว

    what different of value single and double

    • @yes-ej2uv
      @yes-ej2uv 5 ปีที่แล้ว

      Alvin Koay Double contains a decimal number/point. Single is a whole number

  • @monakapoor43
    @monakapoor43 7 ปีที่แล้ว

    plzzz send link before Tuesday plzzz🙏

  • @kwstasber9190
    @kwstasber9190 10 ปีที่แล้ว

    Perfect

  • @ghunghroo1
    @ghunghroo1 8 ปีที่แล้ว

    plzz explain me the concept of comma in i/p & result
    hw floating pint variable accepts "," and not "." in result msg box

    • @jeffschultz4168
      @jeffschultz4168 7 ปีที่แล้ว

      I'm using 2015 and this does not happen to me, in fact, it parses out commas. This did not make any sense to me, perhaps it is something else such as formatting of the text boxes that is causing this.

  • @zuffyzuyyf9618
    @zuffyzuyyf9618 9 ปีที่แล้ว

    ty

  • @پروگرامینگبامن
    @پروگرامینگبامن 5 ปีที่แล้ว

    i don't wanna judging you but the variable must be FLOAT. because if someone wanna use decimal number. he/she could do that.

  • @axmedshiine2398
    @axmedshiine2398 ปีที่แล้ว

    Please share in chrome

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

    Thank you for the great video! I'm really new to this but my message box doesn't pop up for some reason

    • @TemmieCW
      @TemmieCW 9 ปีที่แล้ว

      Steven Rose You probably missed MsgBox(Answer)

  • @natanaelzelaya5371
    @natanaelzelaya5371 5 ปีที่แล้ว

    Danke können Sie mir ein Programm mit geraden Zahlen senden

  • @rogerharsh
    @rogerharsh 4 ปีที่แล้ว

    How to download visual basic 2010 under 500mb

  • @erickv1977
    @erickv1977 6 ปีที่แล้ว

    what did he say?

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

    wtf y the hell did I use " , " in place of decimal y it can't show the correct answer by writing 2.33 and 4.22

  • @lubnaalsadi5614
    @lubnaalsadi5614 6 ปีที่แล้ว

    جميل

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

    1

  • @parnavsehrawat5190
    @parnavsehrawat5190 4 ปีที่แล้ว

    ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooookkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

  • @rachnaissar
    @rachnaissar 4 ปีที่แล้ว

    Worst form calculator

    • @yuvrajplayz3546
      @yuvrajplayz3546 11 หลายเดือนก่อน

      Get lost and keep your a** away from these good channels