ฟอรั่ม PSsix

Would you like to react to this message? Create an account in a few clicks or log in to continue.

ฟอรั่มของบล็อก http://pssix.blogspot.com


2 posters

    โปรแกรมเครื่องคิดเลข

    max30012540
    max30012540
    PSsix Member High Class
    PSsix Member High Class


    โปรแกรมเครื่องคิดเลข Empty PSsix Program Coder
    จำนวนข้อความ : 98
    ความนิยม : 10
    เข้าร่วมเมื่อ : 10/10/2011
    อายุ : 26

    โปรแกรมเครื่องคิดเลข Empty โปรแกรมเครื่องคิดเลข

    ตั้งหัวข้อ by max30012540 10/11/11, 04:56 pm

    Code:
    #include <GUIConstants.au3>
    #include <EditConstants.au3>

    $Form1_1 = GUICreate("โปรแกรมเครื่องคิดเลข", 338, 362, 535, 136)
    $I = GUICtrlCreateInput("", 16, 40, 305, 21,BitOR($ES_RIGHT,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN))
    $Button1 = GUICtrlCreateButton("+", 16, 80, 49, 41, 0)
    $Button2 = GUICtrlCreateButton("-", 80, 80, 49, 41, 0)
    $Button3 = GUICtrlCreateButton("*", 144, 80, 49, 41, 0)
    $Button4 = GUICtrlCreateButton("/", 208, 80, 49, 41, 0)
    $Button5 = GUICtrlCreateButton("^", 272, 80, 49, 41, 0)
    $Button6 = GUICtrlCreateButton("1", 16, 136, 49, 41, 0)
    $Button7 = GUICtrlCreateButton("2", 80, 136, 49, 41, 0)
    $Button8 = GUICtrlCreateButton("3", 144, 136, 49, 41, 0)
    $Button9 = GUICtrlCreateButton("4", 208, 136, 49, 41, 0)
    $Button10 = GUICtrlCreateButton("5", 272, 136, 49, 41, 0)
    $Button11 = GUICtrlCreateButton("6", 16, 192, 49, 41, 0)
    $Button12 = GUICtrlCreateButton("7", 80, 192, 49, 41, 0)
    $Button13 = GUICtrlCreateButton("8", 144, 192, 49, 41, 0)
    $Button14 = GUICtrlCreateButton("9", 208, 192, 49, 41, 0)
    $Button15 = GUICtrlCreateButton("0", 272, 192, 49, 41, 0)
    $Button16 = GUICtrlCreateButton("CE", 16, 304, 305, 41, 0)
    $Label1 = GUICtrlCreateLabel("โปรแกรมเครื่องคิดเลข โดย แม็ก", 88, 8, 157, 17)
    $Button17 = GUICtrlCreateButton("=", 16, 248, 305, 41, 0)
    GUISetState(@SW_SHOW)

    While 1
       $In = GUICtrlRead($I)
       $nMsg = GUIGetMsg()
       Switch $nMsg
          Case $GUI_EVENT_CLOSE
             Exit
          Case $Button1
             GUICtrlSetData($I,$in&"+")
          Case $Button2
             GUICtrlSetData($I,$in&"-")
          Case $Button3
             GUICtrlSetData($I,$in&"*")
          Case $Button4
             GUICtrlSetData($I,$in&"/")
          Case $Button5
             GUICtrlSetData($I,$in&"^")
          Case $Button6
             GUICtrlSetData($I,$in&"1")
          Case $Button7
             GUICtrlSetData($I,$in&"2")
          Case $Button8
             GUICtrlSetData($I,$in&"3")
          Case $Button9
             GUICtrlSetData($I,$in&"4")
          Case $Button10
             GUICtrlSetData($I,$in&"5")
          Case $Button11
             GUICtrlSetData($I,$in&"6")
          Case $Button12
             GUICtrlSetData($I,$in&"7")
          Case $Button13
             GUICtrlSetData($I,$in&"8")
          Case $Button14
             GUICtrlSetData($I,$in&"9")
          Case $Button15
             GUICtrlSetData($I,$in&"0")
          Case $Button16
             GUICtrlSetData($I,"")
          Case $Button17
             GUICtrlSetData($I,$in&" = "&Execute($In))
       EndSwitch
    WEnd
    asokura
    asokura
    PSsix Member High Class
    PSsix Member High Class


    PSsix Game Coder
    จำนวนข้อความ : 72
    ความนิยม : 11
    เข้าร่วมเมื่อ : 03/09/2011

    โปรแกรมเครื่องคิดเลข Empty Re: โปรแกรมเครื่องคิดเลข

    ตั้งหัวข้อ by asokura 08/12/11, 03:29 pm

    ถ้าต้องการให้ แสดงเครื่องหมาย , ในแต่ละหลัก และทศนิยม 2หลัก 1,000,000.00 ทำยังไงดีครับ
    max30012540
    max30012540
    PSsix Member High Class
    PSsix Member High Class


    โปรแกรมเครื่องคิดเลข Empty PSsix Program Coder
    จำนวนข้อความ : 98
    ความนิยม : 10
    เข้าร่วมเมื่อ : 10/10/2011
    อายุ : 26

    โปรแกรมเครื่องคิดเลข Empty Re: โปรแกรมเครื่องคิดเลข

    ตั้งหัวข้อ by max30012540 08/12/11, 05:42 pm

    asokura พิมพ์ว่า:ถ้าต้องการให้ แสดงเครื่องหมาย , ในแต่ละหลัก และทศนิยม 2หลัก 1,000,000.00 ทำยังไงดีครับ
    เขียนใหม่เป็นแบบนี้ครับ
    Code:
    #include <GUIConstants.au3>
    #include <EditConstants.au3>
    $Form1 = GUICreate("เครื่องคิดเลข", 202, 138, -1, -1)
    $Input1 = GUICtrlCreateInput("", 8, 8, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN))
    $Button1 = GUICtrlCreateButton("1", 8, 40, 25, 25, 0)
    $Button2 = GUICtrlCreateButton("2", 40, 40, 25, 25, 0)
    $Button3 = GUICtrlCreateButton("3", 72, 40, 25, 25, 0)
    $Button4 = GUICtrlCreateButton("4", 104, 40, 27, 25, 0)
    $Button5 = GUICtrlCreateButton("5", 136, 40, 25, 25, 0)
    $Button6 = GUICtrlCreateButton(".", 168, 40, 25, 25, 0)
    $Button7 = GUICtrlCreateButton("6", 8, 72, 25, 25, 0)
    $Button8 = GUICtrlCreateButton("7", 40, 72, 25, 25, 0)
    $Button9 = GUICtrlCreateButton("8", 72, 72, 25, 25, 0)
    $Button10 = GUICtrlCreateButton("9", 104, 72, 25, 25, 0)
    $Button11 = GUICtrlCreateButton("0", 136, 72, 25, 25, 0)
    $Button12 = GUICtrlCreateButton("=", 168, 72, 25, 25, 0)
    $Button13 = GUICtrlCreateButton("+", 8, 104, 25, 25, 0)
    $Button14 = GUICtrlCreateButton("-", 40, 104, 25, 25, 0)
    $Button15 = GUICtrlCreateButton("*", 72, 104, 25, 25, 0)
    $Button16 = GUICtrlCreateButton("/", 104, 104, 25, 25, 0)
    $Button17 = GUICtrlCreateButton("^", 136, 104, 25, 25, 0)
    $Button18 = GUICtrlCreateButton("CE", 168, 104, 25, 25, 0)
    GUISetState(@SW_SHOW)
    While 1
       $Input = GUICtrlRead($Input1)
       $nMsg = GUIGetMsg()
       Switch $nMsg
          Case $GUI_EVENT_CLOSE
             Exit
          Case $Button1
             GUICtrlSetData($Input1,$Input&"1")
          Case $Button2
             GUICtrlSetData($Input1,$Input&"2")
          Case $Button3
             GUICtrlSetData($Input1,$Input&"3")
          Case $Button4
             GUICtrlSetData($Input1,$Input&"4")
          Case $Button5
             GUICtrlSetData($Input1,$Input&"5")
          Case $Button6
             GUICtrlSetData($Input1,$Input&".")
          Case $Button7
             GUICtrlSetData($Input1,$Input&"6")
          Case $Button8
             GUICtrlSetData($Input1,$Input&"7")
          Case $Button9
             GUICtrlSetData($Input1,$Input&"8")
          Case $Button10
             GUICtrlSetData($Input1,$Input&"9")
          Case $Button11
             GUICtrlSetData($Input1,$Input&"0")
          Case $Button12
             GUICtrlSetData($Input1,Execute($Input))
          Case $Button13
             GUICtrlSetData($Input1,$Input&"+")
          Case $Button14
             GUICtrlSetData($Input1,$Input&"-")
          Case $Button15
             GUICtrlSetData($Input1,$Input&"*")
          Case $Button16
             GUICtrlSetData($Input1,$Input&"/")
          Case $Button17
             GUICtrlSetData($Input1,$Input&"^")
          Case $Button18
             GUICtrlSetData($Input1,"")
       EndSwitch
    WEnd
    asokura
    asokura
    PSsix Member High Class
    PSsix Member High Class


    PSsix Game Coder
    จำนวนข้อความ : 72
    ความนิยม : 11
    เข้าร่วมเมื่อ : 03/09/2011

    โปรแกรมเครื่องคิดเลข Empty Re: โปรแกรมเครื่องคิดเลข

    ตั้งหัวข้อ by asokura 08/12/11, 08:19 pm

    max30012540 พิมพ์ว่า:
    asokura พิมพ์ว่า:ถ้าต้องการให้ แสดงเครื่องหมาย , ในแต่ละหลัก และทศนิยม 2หลัก 1,000,000.00 ทำยังไงดีครับ
    เขียนใหม่เป็นแบบนี้ครับ
    Code:
    ....

    ขอบคุณครับ^^

      เวลาขณะนี้ 19/04/24, 08:03 pm