?
Solved

How to Make app invisible?

Posted on 1997-05-31
10
Medium Priority
?
329 Views
Last Modified: 2010-04-06
I need my application to be invisible.

I can make my app invisible to the taskbar by placing the line of code below in the Project Source.

ShowWindow(application.handle, SW_HIDE);

However, setting the main forms Visible property to false has no effect.  

I can set if to false after the form has been initially shown, but the form is "Flashed" on screen.  This is not acceptable for my needs.  

How can I make my application invisible on startup, without any flashing on screen?
I am using Delphi 2.0
0
Comment
Question by:sleach
[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
  • 5
  • 4
10 Comments
 
LVL 1

Author Comment

by:sleach
ID: 1336702
Edited text of question
0
 

Expert Comment

by:richweed
ID: 1336703
Sleach

Try making the form borderless and setting the height to 0 in the application source.

By the way, do you put the showwindow between the initialize and the createform?

Cheers
Richard
0
 

Expert Comment

by:richweed
ID: 1336705
Sleach

Try making the form borderless and setting the height to 0 in the application source.

By the way, do you put the showwindow between the initialize and the createform?

Cheers
Richard
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:sleach
ID: 1336706
Real good idea, but it isn't consistant.

Your method works perfectly in a small test application.  However when I implement it in my larger app with many forms, It works most of the time, but ocassionally the main form will stay on screen for about a second or so before it dissapears.

I cannot explain this behavior, or trace it in the debugger.
Any other ideas?
0
 
LVL 1

Author Comment

by:sleach
ID: 1336707
richwee, I found a workaround, so repost with answer, and i'll you award points.

thanks.
0
 

Accepted Solution

by:
richweed earned 200 total points
ID: 1336708
How do you mean repost? Just anything?

What was the workaround?
0
 
LVL 1

Author Comment

by:sleach
ID: 1336709
I was setting the form height to 0 in the OnCreate event.  Then a short time after the program had started, I was setting the visible property to false, and resetting the height back to normal.  The problem was that the form would occasionally show anyway.

The workaround was to wait until I acutally needed to make the form visible again, and then reset the height, and border style.

Thanks :)
0
 

Expert Comment

by:richweed
ID: 1336710
Sleach, thanks for the points!

By the way, I put the height assignment in the project source, just after creating the form.

Cheers
Richard
0
 

Expert Comment

by:richweed
ID: 1336711
Sleach, thanks for the points!

By the way, I put the height assignment in the project source, just after creating the form.

Cheers
Richard
0
 
LVL 3

Assisted Solution

by:Pegasus100397
Pegasus100397 earned 200 total points
ID: 1336704
Sleach,

give this a shot:

In your main form, set it's WindowsState property to wsMinimized and add the following to the [Private Declarations} of the main form:

PROCEDURE WMQUERYOPEN(VAR Msg: TWMQueryOpen);
 message WM_QUERYOPEN;

in the {implementation} section of the unit, add this:

Procedure TForm1.WMQUERYOPEN(VAR Msg: TWMQueryOpen);
Begin
 Msg.Result := 0;
END;

Hope this helps!
Pegasus
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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