Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Program does not execute when compiled into Exe program
Message
De
14/11/2016 16:42:02
 
 
À
12/11/2016 16:38:08
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01643256
Message ID:
01643438
Vues:
73
some suggestions:
1-avoid macro substitution as pointed by Naomi
2.In general,if you createObject dont omit at the end to destroy it (oshell=null).in principe oshell declared as local does it.
3.if your exe works on win XP try to run it with compatibility on win7 (or upper)
4.this function is a scripting one.then scripting host must be mandatory installed on PC to run COM object shell application
5.in my personal experience with shell.application objects i avoid loops and work with
for each.....endfor &&often with zip/unzip

6. this is a working code on my Win10 , compiled as exe and tested successfully.
#define  FOF_CREATEPROGRESSDLG  0x0   &&this fires a windows progressaber for big contents 
ParentFolder = "E:\asup"
if !directory("e:\asup")  &&create folder asup if not exists
md e:\asup
endi
set defa to (m.Parentfolder)

local objShell
objShell = CreateObject("Shell.Application")
objFolder = objShell.NameSpace(ParentFolder)
objFolder.CopyHere ("C:\Users\yousfi\Pictures\*.jpg", FOF_CREATEPROGRESSDLG )    &&copy the jpg from win pictures folder to asup
objShell=null
run/n explorer &ParentFolder 
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform