What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Running in background

Pages: (2): « First « 1 [ 2 ] Last »
Running in background
Author: Message:
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
42 / Male / Flag
Joined: Jan 2003
RE: RE: Running in background
quote:
Originally posted by wipey
sorry can I just say what I originally meant to ask?:$

where do you put code like functions and timers in a dll?

To use timers in a dll you have to use a hidden form and place a timer control in that form or use API functions to create a timer. The first option may be easier for you, but I prefer the 2nd one. It looks more professional :P and gives you more control over the timer. These are the timer API functions (the ones that you need)(declarations for VB)
code:
Declare Function SetTimer Lib "user32" Alias "SetTimer" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long

Declare Function KillTimer Lib "user32" Alias "KillTimer" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long

As I said you in other thread look for the in Google or in the Microsoft online help (or whatever that is called ;))

About putting functions in a dll (you'll need to do this if you use the SetTimer API), place them in a module or in a class and make then Public. I think that is the easiest way for you.
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
08-30-2003 02:21 PM
Profile PM Find Quote Report
Predatory Kangaroo
Full Member
***


Posts: 144
– / Male / –
Joined: Jul 2003
RE: Running in background
That's not the way I did it...
I put this in the general declarations part (the very top of the module):
code:
Public WithEvents my_timer As Timer


Then this in the initialize function:
code:
my_timer = New Timer


Then, I set the properties like I would with any normal timer

--EDIT--
Oh, and add a function for the timer to call:
code:
Private Sub my_timer_Timer()
'Code goes here
End Sub


This post was edited on 08-30-2003 at 05:12 PM by Predatory Kangaroo.
[Image: imagetest.php?display=You%20dont%20know%...djust=true]
08-30-2003 05:10 PM
Profile PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On