hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jul 2, 2003 10:53:34 GMT -5
Im trying to make one, but im a bit stuck I want to do DeleteSetting App.EXEName, "Kicks", "Joe Bloggs" 8 seconds from now. Then 2 seconds later do DeleteSetting App.EXEName, "Kicks", "Peter Bloggs" 8 seconds later, what wud i do.. The timer can only hold one command, ie Private Sub TimerUnset_Timer() DeleteSetting App.EXEName, "Kicks", "Peter Bloggs" End Sub eg, Peter Bloggs is not dynamic.....its easier with mirc timers because you specify the command w hen you set them
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Jul 2, 2003 11:02:17 GMT -5
So use more than one timer
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jul 2, 2003 11:14:47 GMT -5
Well it will set something everytime someone kicks, and that needs to be unset after 8 seconds, thus "X" amount of timers would be needed
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Jul 2, 2003 14:15:00 GMT -5
so create a timer class to make new timers with specific properties
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jul 2, 2003 14:26:07 GMT -5
Class?! who what when where how
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Jul 2, 2003 16:55:58 GMT -5
lol okay ill explain classes a bit
classes for one are the basis of "object oriented programming" ( ooo big words mmm ) anyways classes make objects like the text box or the form for your projects. The thing is before vb .net vb was an event driven programming languages instead of an oop language, but you still had the ability to create custom objects by adding a class to ur project. Classes have constuctors an deconstructors. The constuctor ( Sub Class_Initialize ) is just a sub function that is ran when an object of the class is created (Set MyObject = New ObjectType ). The deconstuctor ( Sub Class_Terminate ) is ran when the object is destroyed ( Set MyObject = Nothing ). Search on msdn for the house of straw example it will help explain classes better
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jul 3, 2003 3:10:19 GMT -5
Thanks, but could you gimme a small example what its actually used for. I searched on msdn but the top 5 links are 404's
|
|
Trad
New Member
Posts: 1,122
|
Post by Trad on Jul 3, 2003 9:59:46 GMT -5
basics, i hope Tewl can translate this into VB.... class CreateUserTimer { public br]..CreateUserTimer(int inter,int howmanytimes) { .... inter = interval; .... howmanytimes = howmanytimestorun; vb's code to start a timer with the parameters above. vb's code to call delete to this object } ..~CreateUserTimer() { //cleanup code vb's code to stop a timer } private br]..int interval; ..int howmanytimestorrun; }; i dont know what it is in VB, but allocating this memory is used by new and deleteso when you wanna start a timer, like... CreateUserTimer Joe_Bloggs = new CreateUserTimer(8,1) so, then, class constructor is called and a new timer is started to run once with an interval of 8 seconds. then after 8 seconds, it calls delete, and the destructor is called, all cleaned up and you can use like CreateUserTime name = new CreateUserTimer(interval, how many times to run) thats how it would be done in C++, and i hope Tewl understands and can put my theory together
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Jul 3, 2003 11:09:52 GMT -5
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jul 3, 2003 11:27:55 GMT -5
Ty tewl, ill check them out tommorow
|
|
Trad
New Member
Posts: 1,122
|
Post by Trad on Jul 3, 2003 12:21:26 GMT -5
Well Tewl, i thought classes in Visual Basic were like classes in C++ (allthough a lot simpler) but like, the stuff i mentioned is all in Visual Basic, and adding the VB code for starting a timer and stopping one, and allocating and destroying memory. Oh ok, i just thought it'd be easy for you to Decypher Why not check them out now Danger?
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jul 3, 2003 13:00:25 GMT -5
Because i have all day at work tommorow to read through them
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Jul 3, 2003 16:20:55 GMT -5
Well the constructors in vb 6 dont have parameters so you have to figure out another way to do it
|
|
|
Post by Lazer on Jul 3, 2003 16:27:03 GMT -5
any jobs going where u work ?
|
|
Trad
New Member
Posts: 1,122
|
Post by Trad on Jul 3, 2003 17:01:02 GMT -5
i applied at ASDA
|
|