version 6.30 0 Form1 1 1 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 238 268 1 ControlsEx.dll 0 2 TB:TrackBar ProgBar:ProgressBar Sub designer addform(Form1,"NoteCombat V0.1","",65,69,126)@ addtimer(form1,Timer1,95,95,250)@ addtextbox(form1,TextBoxBad,160,230,75,35,"",104,81,111,255,0,0,True,True,False,14)@ addtextbox(form1,TextBoxGood,5,230,75,35,"",104,81,111,0,255,0,True,True,False,14)@ End Sub @EndOfDesignText@Sub Globals 'NoteCombat V.0.1 ' Hilft beim Notenlernen durch Abfrage ' By Token y = 50 MiddleC = 130 CurrentNote = 130 CurrentNoteName = "" End Sub Sub App_Start Form1.Show form1.ForeLayer = true AddTimer ("GameTimer") GameTimer.Enabled = True y = 175 x = 4 Spacing = 32 ButtonWidth = 30 AddButton ("Form1", "ButtonC", x, y, ButtonWidth, 32, "C") x = x + Spacing AddButton ("Form1", "ButtonD", x, y, ButtonWidth, 32, "D") x = x + Spacing AddButton ("Form1", "ButtonE", x, y, ButtonWidth, 32, "E") x = x + Spacing AddButton ("Form1", "ButtonF", x, y, ButtonWidth, 32, "F") x = x + Spacing AddButton ("Form1", "ButtonG", x, y, ButtonWidth, 32, "G") x = x + Spacing AddButton ("Form1", "ButtonA", x, y, ButtonWidth, 32, "A") x = x + Spacing AddButton ("Form1", "ButtonB", x, y, ButtonWidth, 32, "B") AddEvent ("ButtonC", Click, "NoteButtonsClick") AddEvent ("ButtonD", Click, "NoteButtonsClick") AddEvent ("ButtonE", Click, "NoteButtonsClick") AddEvent ("ButtonF", Click, "NoteButtonsClick") AddEvent ("ButtonG", Click, "NoteButtonsClick") AddEvent ("ButtonA", Click, "NoteButtonsClick") AddEvent ("ButtonB", Click, "NoteButtonsClick") progBar.New1("Form1",10,10,200,15) TB.New1("Form1",5,30,10,130,true) TB.Maximum=100 TB.Minimum=0 TB.Value=50 GenerateNote End Sub Sub DrawNote Form1.Line (1,1,300,170,cWhite, BF) Form1.Circle (100, CurrentNote, 5, 0, 0, 0, F) form1.Line(104,CurrentNote,104,(CurrentNote - 30),cBlack) y = 70 For i = 1 To 5 y = y + 10 form1.Line(1,y,320,y,cBlack) Next i DrawHelpLines StartTimer End Sub Sub StartTimer Progbar.Value=100 Timer1.Interval=(101-TB.Value)*40 Timer1.Enabled=true End Sub Sub DrawHelpLines For i = 130 To CurrentNote Step 10 y = i form1.Line(90,y,110,y,cBlack) Next i For i = 80 To CurrentNote Step -10 y = i form1.Line(90,y,110,y,cBlack) Next i End Sub Sub GenerateNote Timer1.Enabled=false CurrentNote = Rnd(1,23) * 5 + 50 For i = 25 To 200 Step 35 Select CurrentNote Case i CurrentNoteName = "C" Exit Case i + 5 CurrentNoteName = "B" Exit Case i + 10 CurrentNoteName = "A" Exit Case i + 15 CurrentNoteName = "G" Exit Case i + 20 CurrentNoteName = "F" Exit Case i + 25 CurrentNoteName = "E" Exit Case i + 30 CurrentNoteName = "D" Exit End Select Next i DrawNote End Sub Sub Button1_Click GenerateNote End Sub Sub NoteButtonsClick If CurrentNoteName = Sender.text Then TextBoxGood.Text = TextBoxGood.Text + 1 GenerateNote Else TextBoxBad.Text = TextBoxBad.Text + 1 GenerateNote End If End Sub Sub Timer1_Tick Progbar.Value = progbar.Value-1 End Sub