Solved

How to minimize a VFP 7 application to the system tray

Posted on 2008-10-08
5
2,220 Views
Last Modified: 2012-05-05
Does anyone know how to minimize a VFP 7 application to the system tray. I have managed to make the applicaiton window disappear but do not know how to create a icon for the applicaiton in the system tray or just minimize the application to the system tray.

I have made the application disappear by doing the following in the Activate of the form:
IF NOT thisform.activated
     HIDE WINDOW screen
     thisform.activated = .t.
ENDIF

I have a property on the form called activated.

This will cause the application window to disappear and only show in the Task Manager --> Processes tab which is perfect excepts for I would like to make the window reappear if needed and a icon in the system tray would be the best approach for that.

If anyone has any example code please post it here.

Thanks in advance
0
Comment
Question by:Thomas Swaney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
tusharkanvinde earned 125 total points
ID: 22675724
I have used a vb dll from http://www.vbrad.com/article.aspx?id=67
0
 
LVL 33

Assisted Solution

by:CarlWarner
CarlWarner earned 125 total points
ID: 22675901
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
http://www.news2news.com/vfp/?example=336
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 22682073
foxitray.zip
http://www.foxite.com/downloads/default.aspx?id=0&keyword=tray&category=

Go down toward left bottom of web page and click on "Download This File" hyperlink.

foxitray.zip contains the Foxitray Active X control and a demo VFP form. The OCX lets VFP developers use the Windows System Tray. To use the control, you must register it with Windows using the REGSVR32 utility or from within VFP:

DECLARE LONG DllRegisterServer IN foxitray.ocx
IF DllRegisterServer() = 0
    * OK
ELSE
    * Not OK
ENDIF

Also note that the OCX requires the Visual Basic 6 Runtime file MSVBVM60.DLL. If you need help with this file, please post your questions to the Foxite Forum. Due to the bug described in Microsoft Knowledge Base Article Q200294, you can not use .ico files that have the same name as files included in your project. If you are using VFP8 or later, we advise you to use the TrayIcon class that comes with VFP instead of this Active X control. Code written by Eric den Doop. File submitted by Eric den Doop.
0
 
LVL 2

Author Comment

by:Thomas Swaney
ID: 22682673
Thanks everyone for the post I will take a look at all of these options and post the one that I choose to use.
0
 
LVL 2

Author Closing Comment

by:Thomas Swaney
ID: 31504510
Thanks for the help
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Activating an OLE Program 10 27
FORM caption height 4 213
VFP query syntax to parse text from a field 3 178
Cannot locate the COMSPEC environment variable 8 182
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question