Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

20100521部内勉強会

1,057 views

Published on

Published in: Education
  • Be the first to comment

  • Be the first to like this

20100521部内勉強会

  1. 1. Microsoft Small Basic
  2. 2. Public Class Form1 Dim x, y As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load x = 0 y = 0 Timer1.Interval = 100 Timer1.Enabled = True End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim g As Graphics g = CreateGraphics() g.Clear(Color.White) x = x + 1 y = y + 1 g.FillEllipse(Brushes.Aquamarine, x, y, 30, 30) If (x + 60 > Me.Width) Then Timer1.Enabled = False End If End Sub End Class 画面の上を円が左上から右下へと移動する処理を「Visual Basic」で記述したコード
  3. 3. x=0 y=0 ball = Shapes.AddEllipse(30,30) For x=0 To GraphicsWindow.Width Shapes.Move(ball, x, y ) y=y+1 Program.Delay(10) EndFor 画面の上を円が左上から右下へと移動する処理を「Small Basic」で記述したコード

×