Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What cursors are in a DataSession
Message
De
14/10/1999 14:43:15
 
 
À
14/10/1999 13:05:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00276307
Message ID:
00276501
Vues:
19
>Erik,
>
>Do you know of a method to have "Help" from VFP bring up the UT???? Maybe we can put it in as a Wishlist item. "Internet Help" could be 1 of the bars on the Help Menu.
>

I can do that. Here's some code. You'll need to put this in a program called startut.prg, and then put a couple of lines of code in your VFP startup program. This code will place a menu item on your VFP menu to "Ask a question on UT". When you click the item, it will launch internet explorer, log you into the Universalthread, and click on the "Create a new message icon".

Startup.prg:

lcUserName = "utusernamehere"
lcPassword = "utpasswordhere"

oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("www.levelextreme.com")

INKEY(1)
nStartSeconds = SECONDS()
DO WHILE oIE.Document.ReadyState <> "complete" AND (SECONDS()-nStartSeconds < 30)
ENDDO

IF oIE.Document.ReadyState <> "complete"
MESSAGEBOX("Universalthread is unavailable")
oie.Visible = .T.
RETURN .F.
ENDIF

oie.document.forms(0).Key.Value = lcUsername
oIE.Document.Forms(0).Password.Value = lcPassword

oIE.Document.Forms(0).Submit()

nStartSeconds = SECONDS()
DO WHILE oIE.Document.ReadyState <> "complete" AND (SECONDS()-nStartSeconds < 30)
ENDDO
IF oIE.Document.ReadyState <> "complete"
MESSAGEBOX("Universalthread is unavailable")
oie.Visible = .T.
RETURN .F.
ENDIF

oFrame = oIE.Document.Frames(0)
oFrame.Document.Links(0).Click()
oIE.Visible = .T.

Next you'll need these 2 lines to in your startup program to add the menu item to your VFP help menu.

DEFINE BAR 8 OF _MSM_SYSTM PROMPT "Ask a question on UT"
ON SELECTION BAR 8 OF _MSM_SYSTM DO StartUT.prg

How's that?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform