Paul,
As with all VFP objects their visibility is not set until you set them to be 
visible. This has caught me out a number of times when I thought that the 
object had not been created correctly so you need to set the .Visible property 
on in the init. Control the actual on screen visibility via the ShowWindow 
property of the form and Windowstate property.

Dave

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Paul Newton
Sent: 21 September 2017 14:35
To: [email protected]
Subject: RE: Focus not returning to command window after CreateObject

Good thinking Tracy

Excel does not bring up its UI until you explicitly make it visible.

Stopwatch does not have a UI until, after o = 
CreateObject("Stopwatch.Stopwatch") when you issue o.Start()


-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Tracy 
Pearson
Sent: 21 September 2017 14:31
To: [email protected]
Subject: RE: Focus not returning to command window after CreateObject

Does Stopwatch bring up a UI and Excel does not?

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Paul Newton
Sent: Thursday, September 21, 2017 9:27 AM
To: [email protected]
Subject: RE: Focus not returning to command window after CreateObject

No and no ...

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Alan Bourke
Sent: 21 September 2017 14:15
To: [email protected]
Subject: Re: Focus not returning to command window after CreateObject

Is the Init() in stopwatch.exe waiting for something?

Is CreateObjectEx() any different ?

--
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm

On Thu, 21 Sep 2017, at 01:58 PM, Paul Newton wrote:
> Hi all
> 
> In the command window if I run the command o = 
> CreateObject("Excel.Application"), an instance of Excel is created and 
> focus returns to the command window.
> 
> If I run the command o = CreateObject("Stopwatch.Stopwatch"), an 
> instance of my stopwatch (in Stopwatch.EXE) is created but focus does 
> NOT return to the command window.
> 
> Any ideas?  TIA
> 
> Paul Newton


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to