How can I hide an xBase++ application so it is not visible on the desktop and on the windows task bar. I want an application to wake up when a file appears at a network location.
Doug
Hide Xbase++ application
Re: Hide Xbase++ application
Create the app as a service (look at ..\XPPW32\source\samples\apps\SimpleService).
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Hide Xbase++ application
Another solution: DCGET OPTIONS ... NOTASKLIST. This will prevent your app from to be shown in the task list. DCGET OPTIONS ... HIDE will hide the dialog unless oDialog:Show() is called (DCREAD GUI ... PARENT @oDialog).
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Hide Xbase++ application
I think this is what you want:
Code: Select all
#INCLUDE "dcdialog.CH"
FUNCTION Main()
LOCAL GetList[0], oMenuBar, oMenu1, oMenu2, oDlg, GetOptions
DCMENUBAR oMenuBar
DCSUBMENU oMenu1 PROMPT 'File' PARENT oMenuBar
DCMENUITEM 'New' PARENT oMenu1
DCSUBMENU oMenu1 PROMPT 'Edit' PARENT oMenuBar
DCMENUITEM 'New' PARENT oMenu2
DCGETOPTIONS HIDE
DCREAD GUI TITLE 'Wakeup Test' OPTIONS GetOptions PARENT @oDlg ;
EVAL {|o|o := Thread():new(),Sleep(5),o:start({||Check4WakeUp(oDlg)})}
RETURN nil
* --------------
PROC appsys ; return
* --------------
STATIC FUNCTION Check4WakeUp( oDialog )
DO WHILE .t.
Sleep(100)
IF FExists('Wakeup.Txt')
IF !oDialog:isVisible()
oDialog:show()
ENDIF
ELSEIF oDialog:isVisible()
oDialog:hide()
ENDIF
ENDDO
RETURN nil
The eXpress train is coming - and it has more cars.
-
- Posts: 32
- Joined: Fri Jan 20, 2012 9:24 am
Re: Hide Xbase++ application
Thanks Roger,
That code does what I wanted to do. I like Tom's idea of creating a service too.
Doug
That code does what I wanted to do. I like Tom's idea of creating a service too.
Doug
Re: Hide Xbase++ application
Doug,
services are limited if they try to interact with the desktop. Network shares and other installed hardware may not be visible to services. This is an elegant solution for lots of issues, but it may not be first choice for everything.
services are limited if they try to interact with the desktop. Network shares and other installed hardware may not be visible to services. This is an elegant solution for lots of issues, but it may not be first choice for everything.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Hide Xbase++ application
We have tried and failed numerous times to create a service with a built-in UI. We ended up building two separate apps to communicate, a service and a UI. The service app if for multiple services, each on it's own tab.. it's based on roger's service app (which doesn't run as an actual service). It's a maintenance/debugging nightmare when trying to deal with messaging between the apps..
Brian
Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises