Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 Tags
Subject: RE: Windows 7 Taskbar
Thread ID: 373301 Message ID: 373426 # Views: 41 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Windows 7 and VFP
Date: Friday, March 22, 2013 6:21:39 AM         
   


> >
> > Possibly that the form is losing focus when you call the API's.
> >
> > Maybe the next line of your code after closing/hiding the taskbar should be to ACTIVATE the VFP window. That can also be done by API's.
> >
> > Bernard
> >
> > ** If you see someone without a smile, give em one of yours :) **
> > My Blog
>
> Hi Bernard,
>
> I think you must be right about the form losing focus because I tried ...
>
>
myForm.myGrid.SetFocus() 

> ... as the next line and it still didn't work.
>
> It does work if I use something like ...
>
>
MESSAGEBOX('Task bar hidden.')

> ... but that is not ideal obviously.
>
> Do you know the syntax for activating the VFP window using an API?
>


Hi Russell,

In Windows7, the following seems to work quite well. Looks a little kludgy though.

#define SW_MINIMIZE         6
#define SW_RESTORE          9
DECLARE INTEGER ShowWindow IN WIN32API integer, integer
ShowWindow(_vfp.hWnd, SW_MINIMIZE)
ShowWindow(_vfp.hWnd, SW_RESTORE)




hth
-Stefan

ENTIRE THREAD

Windows 7 Taskbar Posted by Russell Hill @ 3/21/2013 2:28:13 AM
RE: Windows 7 Taskbar Posted by Borislav Borissov @ 3/21/2013 8:33:14 AM
RE: Windows 7 Taskbar Posted by Russell Hill @ 3/21/2013 12:19:21 PM
RE: Windows 7 Taskbar Posted by Russell Hill @ 3/22/2013 1:23:14 AM
RE: Windows 7 Taskbar Posted by Bernard Bout @ 3/22/2013 2:46:36 AM
RE: Windows 7 Taskbar Posted by Russell Hill @ 3/22/2013 2:58:57 AM
RE: Windows 7 Taskbar Posted by Stefan Wuebbe @ 3/22/2013 6:21:39 AM
RE: Windows 7 Taskbar Posted by Russell Hill @ 3/23/2013 12:05:06 PM