Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=c:\users\timo2\desktop\neuer ordner\alkane 1.kxf
- $Form1_1 = GUICreate("Alkane", 337, 132, 401, 138)
- $CAtome = GUICtrlCreateInput("CAtome", 0, 0, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
- $HAtome = GUICtrlCreateInput("HAtome", 0, 24, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
- $Ausgabe = GUICtrlCreateInput("Ausgabe", 0, 80, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
- $formelaus = GUICtrlCreateGroup("Formel aus:", 136, 0, 89, 73)
- $Button1 = GUICtrlCreateButton("C-Atome", 144, 16, 75, 25, $WS_GROUP)
- $Button2 = GUICtrlCreateButton("H-Atome", 144, 40, 75, 25, $WS_GROUP)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- $Button3 = GUICtrlCreateButton("Formel Popup", 128, 80, 99, 25, $WS_GROUP)
- $Pic1 = GUICtrlCreatePic("C:\Users\Timo2\Desktop\Neuer Ordner\Methane-2D-square.jpg", 232, 8, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
- $Button4 = GUICtrlCreateButton("Struktur und Name", 8, 104, 99, 25, $WS_GROUP)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- $ausg1 = GUICtrlRead( $CAtome )
- GUICtrlSetData( $Ausgabe , "C" & $ausg1 & "H" & $ausg1 *2 +2 )
- GUICtrlSetData( $HAtome , $ausg1 *2 +2 )
- Case $Button2
- $ausg2 = GUICtrlRead( $HAtome )
- GUICtrlSetData( $Ausgabe , "C" & ($ausg2 -2) /2 & "H" & $ausg2 )
- GUICtrlSetData( $CAtome , ($ausg2 -2) /2 )
- Case $Button3
- $ausg3 = GUICtrlRead( $CAtome )
- $ausg4 = GUICtrlRead( $HAtome )
- $ausg5 = GUICtrlRead( $Ausgabe )
- MsgBox( 0 , "popup" , "C Atome: " & $ausg3 & @CRLF & "H Atome: " & $ausg4 & @CRLF & "Formel: " & $ausg5 & @CRLF & "Atome: " & $ausg3 + $ausg4 & @CRLF & "Atommasse: " & ($ausg3 *12.011) + ($ausg4 *1.008))
- Case $Button4
- If GUICtrlRead( $CAtome ) = 1 Then MsgBox(0,"Methan"," H" & @CRLF & "HCH" & @CRLF & " H" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 90,65K" & @CRLF & "Siedepunkt: 111,4K" & @CRLF & "Gasförmig")
- If GUICtrlRead( $CAtome ) = 2 Then MsgBox(0,"Ethan"," HH" & @CRLF & "HCCH" & @CRLF & " HH" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 90K" & @CRLF & "Siedepunkt: 185 K" & @CRLF & "Gasförmig")
- If GUICtrlRead( $CAtome ) = 3 Then MsgBox(0,"Propan"," HHH" & @CRLF & "HCCCH" & @CRLF & " HHH" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 85K" & @CRLF & "Siedepunkt: 231K" & @CRLF & "Gasförmig")
- If GUICtrlRead( $CAtome ) = 4 Then MsgBox(0,"Butan"," HHHH" & @CRLF & "HCCCCH" & @CRLF & " HHHH" & @CRLF & "Flammpunkt: /" & @CRLF & "Schmelzpunkt: 135K" & @CRLF & "Siedepunkt: 272,5K" & @CRLF & "Gasförmig")
- If GUICtrlRead( $CAtome ) = 5 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 6 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 7 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 8 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 9 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 10 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 11 Then MsgBox(0,"hallo","")
- If GUICtrlRead( $CAtome ) = 12 Then MsgBox(0,"hallo","")
- If Int(GUICtrlRead($CAtome)) > 12 then MsgBox(16,"Fehler","Zu hohe Zahl , Für Nutzung eine Zahl von 1-12 Wählen")
- EndSwitch
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment