Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the focus
Message
De
25/03/2008 12:19:24
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Divers
Thread ID:
01304943
Message ID:
01305306
Vues:
17
Hi
I think that your link good if I call from current form to other program and I want to be back to the first.
In this case you can know where did you start from.

In my case I start the other program by outside program that I cant send parameters, the single thing that I can do is to tel this program to run other program (VFP).

More clear

user - Big project.. start
user - press on scanner 'Scan' button
scanner> running scanner program... finish...and runing my small project:
my small project> adding line to table and quite
My big project inform to user what is the table reccount
The scanner scan the next page and running the ... for each scan.


So, when I start my small project, vfp doesn't know what is my big project hwnd.

I found solution by your first link, but i need a little (I hope) help"
When I activate the big project form I send the hwnd to table and when I run the small project I take the hwnd from this table.
It's looks good but I get the main visual foxpro screen, not the active form (unclear status - the main vfp form is blue and the active form gray blue with cursor blinking - half active?).

Here is the code (I crated table 'misc').
My big Project - form \ activate
cd c:\cards\data\
if not used ('misc')
use misc again in 0 shared
endif
go top in misc
replace misc.frmwin with thisform.HWnd
use in misc
My small Project code
insert into table AAA values ('dfasfs') && the recoount table
*getting the big project hwnd
cd c:\cards\data\
if not used ('misc')
	use misc again in 0 shared
endif
go top in misc
ifr=misc.frmwin
declare integer SetForegroundWindow in win32api Integer
SetForegroundWindow(ifr)
quit
My big Project - form \ label.caption by timer syntax:
thisform.label1.caption=allt(str(reccount('AAA')))+'my big project caption'
>>Where do I have to add&call the 'procedure ActivateWindow'?
>>
>
>Chaim,
>
>You may call this procedure in your small project on exit (passing the big project's hwnd) or you can try to call it from the big project too.
Thank you
Chaim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform