Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want to have a phone conversation?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00958978
Message ID:
00960469
Views:
10
Not in VFP...but this is a good place to find some instant-messenger source code....
http://www.miranda-im.org/

>>>
>>>Well, it's in several locations on the sample form. You'd have to pull the
>>>stuff and put it into your own. I send preformatted messages to HQ so the
>>>officers don't have to type anything. This code is right out of the
>>>sample. Here's the code to instantiate the object. It also uses windows
>>>scripting host:
>>>
>>>*****************************************************************************
>>>**** messenger code
>>>Local llRetVal As Boolean
>>>Local loExc As Exception
>>>llRetVal = .F.
>>>*DODEFAULT()
>>>*thisform.cboContacts.SetFocus()
>>>
>>>Try
>>>*------------------------------------------------------------------------------------------------------------------------
>>>*-- See http://msdn.microsoft.com/downloads/default.asp?url=/downloads/topic.asp?url=/msdn-files/028/001/359/topic.xml
>>>*-- for information on Messenger APIs.
>>>*------------------------------------------------------------------------------------------------------------------------
>>>*-- This form is not meant as an alternate UI to Messenger. It is meant to
>>>*-- demonstrate the Messenger APIs you have access to via COM. You can
>>>*-- use these methods to send automated Instant Messages, Email or Files
>>>*-- to any MSN user from your automated processes. Additionally, if that user
>>>*-- has set up mobile messaging ( http://mobile.msn.com ), the email
>>>*-- will be sent to their mobile device.
>>>*---------------------------------------------------------------------------
>>>	Thisform.oMessenger = Createobject("Messenger.UIAutomation.1")
>>>
>>>	Declare Long SetForegroundWindow In WIN32API Long
>>>	Declare Integer FindWindow In WIN32API String @ cClass, String @ cTitle
>>>	Declare Long CloseWindow In WIN32API Long
>>>	Declare Sleep In WIN32API Long
>>>
>>>*-- We will use the Windows Scripting host to send key strokes so we can
>>>*-- auto-compose messages and automate the messenger windows.
>>>	Thisform.oWsh = Createobject("wscript.Shell")
>>>
>>>*-- Add registered messenger contacts to the dropdown.
>>>*-- However, you can send messages to any MSN user by
>>>*-- email address, they don't have to be in the contact list.
>>>
>>>*	Thisform.GetContacts()
>>>	llRetVal = .T.
>>>
>>>Catch To loExc
>>>	llRetVal = .F.
>>>	If Vartype(Thisform.oMessenger)!="O"
>>>		Messagebox("There was a problem loading Windows Messenger. Make sure it is properly installed. This sample also requires that Windows Messenger 4.7 or higher be installed.", 48, Thisform.Caption)
>>>	Else
>>>		Messagebox(loExc.Message, 16, Thisform.Caption)
>>>	Endif
>>>Endtry
>>>
>>
>>Thank you.. The cool stuff is that this one seems applicable for older releases (as 6.. Seems to be an automation task)
>>
>>Do you know any deeper documentation for V.F.P. ?
>>
>>Claudio
>
>
>Well, here is a link:
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winmessenger/winmessenger/messenger_entry.asp
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform