Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want to show MS System Information in my apps help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00182487
Message ID:
00182737
Vues:
8
>>The MS System Information program is not distributable. The user has to have >MS Office (I think) or some other MS application that'll install it.
>
>>That's right -- we had a controversy here over that a while back. Basically, you really need a solution such as searching for the msinfo or msinfo32 app when you launch your Help/About form, and disabling the button if it can't be found...
>
>How is a good way to search for msinfo?
>
>Thanks - Brenda

I wouldn't be so bold as to proclaim this a "good" way, but it does the job. George's thought on using the registry is a better approach, but 9 times out of ten, if MSINFO is installed, its in the default location. This code, in the form's init event, shortens the form to hide the "System Info" button if it's not found:

STORE "" TO THISFORM.cMSInfoWinDir
THISFORM.cMSInfoWinDir= "c:\Program Files\Common Files\Microsoft Shared\MSInfo\MSInfo32.exe"

IF !FILE(thisform.cmsinfowindir)
THISFORM.cMSInfoWinDir=""
ENDIF

IF EMPTY(THISFORM.cMSInfoWinDir)
THISFORM.cMSInfoWinDir = " "
THISFORM.cmdSysInfo.ENABLED = .F.
thisform.Height = 260
ENDIF

Hope it helps :)
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform