by Overlord (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 22nd August 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Mini Task for your applications, use this sample to build up your programs. i use this in my internet applications.
API Declarations
'Inside The Code Make a Timer. Interval: (the speed of the tasks) I choose 1
'Make a Module.
'Inside the Module put this:
Public Type TaskType
Id As Long
' put your storage variables, i use 2 a string and a integer:
Data As String
Number As Integer
End Type
Public Task(0 To 1000) As TaskType '0-1000 tasks, u can increade or decrease
Public TaskId As Long ' this is the counter used for identify tasks
'This is a sample Procedure for Adding New Tasks:
Public Sub NewTask(Index As Integer, Data As String)
Dim Id As Integer
Do
If Task(Id).Id = 0 Then Exit Do
Id = Id + 1
Loop Until Id > 1000
TaskId = TaskId + 1
Task(Id).Id = TaskId
' you storage of variables I use a string and a Integer:
Task(Id).Number = Index
Task(Id).Data = Data
End Sub
Dim FoundId As Long
Dim Count As Integer
FoundId = -1
Do
If Task(Count).Id > 0 And FoundId < Task(Count).Id Then FoundId = Count
Count = Count + 1
Loop Until Count > 1000 'Amount of Tasks.
If Not FoundId = -1 Then
Task(FoundId).Id = 0 'Remove Tasks from the List
' You Code Here! '
End If
No comments have been posted about Mini Task for your applications, use this sample to build up your programs. i use this in my intern. Why not be the first to post a comment about Mini Task for your applications, use this sample to build up your programs. i use this in my intern.