zurück zur Startseite...
Teilbeschreibung :
Download hier : 55,40 KB
'Beispiel : Verwendung der Freeware - Dll EZX.DLL : Teil 10. 'Hinweis : Erstellen Sie eine Referenz zur ' EZX 1.0 Type Library. ' Grafikausgabe in 2 Anzeigebereiche aufteilen. (Clipping) ' Bereich 1 : Zur Animationsausgabe. ' Bereich 2 : Zur Ausgabe einer Zahlenanimation. Private Const EZX_COUNTVALUE As Integer = 15 Private Const EZX_CLIPREGION As Long = 9000 Private Const EZX_CLIPNUMBERTOPPOS As Long = 9500 Private Const EZX_CLIPNUMBERLEFTPOS As Long = 5500 Private Const EZX_BOTTOM As Long = 10000 Private Const EZX_RIGHT As Long = 10000 Private Const EZX_NUMBERDIFF As Long = 350 Dim lSpeed As Long Dim n As Long Dim ezs As New EZScreen Dim lLeft As Long Dim lTop As Long Private Sub sInit() Dim lNumberCountValue As Long Dim ezk As New EZKeyboard ChDir App.Path Show Refresh ezs.hWnd = Frame1.hWnd lNumberCountValue = 0 lLeft = 0 lTop = 0 lSpeed = 1000 'Hoeherer Wert = Schneller Do sMakeGraphicalSequence lNumberCountValue = lNumberCountValue + EZX_COUNTVALUE sMakeGraphicalScore lNumberCountValue ezs.Refresh DoEvents Loop While ezk.KeyPressed(ezk_Esc) = False End End Sub Private Sub Form_Load() sInit End Sub Private Sub sMakeGraphicalScore(ByVal lCountVal As Long) Dim sTmp As String Dim n As Long Dim lCount As Long Dim Picture As New EZPicture ezs.SetClipper EZX_CLIPREGION, 0, EZX_BOTTOM, EZX_RIGHT ezs.ClearBackground vbGreen sTmp = lCountVal For n = 1 To Len(sTmp) lCount = Mid(sTmp, Len(sTmp) - n + 1, 1) Picture.Source = App.Path & "\zahl" & lCount & ".bmp" Picture.Draw EZX_CLIPNUMBERLEFTPOS - n * EZX_NUMBERDIFF, _ EZX_CLIPNUMBERTOPPOS Next n End Sub Private Sub sMakeGraphicalSequence() Dim ezt As New EZXAdvancedOptions Dim ezp As New EZPicture Static lFrameTime As Long ezs.SetClipper 0, 0, EZX_CLIPREGION, EZX_RIGHT ezs.ClearBackground vbBlue lLeft = lLeft + lSpeed / ezs.FramesPerSecond lTop = lTop + lSpeed / ezs.FramesPerSecond If lLeft > 10000 Or lLeft < -1000 Then lSpeed = lSpeed * -1 End If If ezt.ElapsedTime > lFrameTime + 120 Then lFrameTime = ezt.ElapsedTime n = n + 1 If n > 9 Then n = 1 End If ezp.Source = App.Path & "\test" & n & ".bmp" ezp.Draw lLeft, lTop End Sub
mail
http://www.Visual-Basic5.de ( Heinz Prelle )