Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Программирование и базы данных (http://forum.oszone.net/forumdisplay.php?f=21)
-   -   [решено] Бегущая строка (http://forum.oszone.net/showthread.php?t=306705)

Harley2011 15-10-2015 23:08 2564340

Бегущая строка
 
Имеется код с MVB 6 давайте переделаем на .Net
Вот код

Dim wirina As Integer, visota As Integer
Dim x As Integer, y As Integer

Private Sub Form_Load()

Timer1.Interval = 50
Picture2.AutoSize = True
Picture2.Picture = LoadPicture("с:\1.jpg")
wirina = Picture2.Width
visota = Picture2.Height
Picture1.Height = Picture2.Height
End Sub

Private Sub Timer1_Timer()
x = x + 40
Picture1.PaintPicture Picture2.Picture, -x, -y
If x + Picture1.ScaleWidth >= Picture2.ScaleWidth Then
Picture1.PaintPicture Picture2.Picture, -x + Picture2.ScaleWidth, -y
End If
If x >= Picture2.Width Then x = 0
End Sub

На форму будильник и два PictureBox


Время: 12:55.

Время: 12:55.
© OSzone.net 2001-