?
Solved

Start HIDDEN

Posted on 1997-08-22
7
Medium Priority
?
402 Views
Last Modified: 2010-05-18
I want a delphi 2 app (with forms) to start with its main form hidden, and not show any icon in the taskbar of the task list. Also, I DO NOT want it to appear for a second and just then diapper, I want it to never appear in the first place.

More points may be granted if needed.
0
Comment
Question by:alona041797
[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
7 Comments
 
LVL 1

Expert Comment

by:mosi
ID: 1342231
Did you try to put this in your projectfile
 Showwindow(application.handle,SW_HIDE)
just before application.run ?

 
0
 
LVL 2

Author Comment

by:alona041797
ID: 1342232
That doesn't work! The project starts a taskbar icon, hides the taskbar icon and then shows the form normally!!
0
 
LVL 3

Accepted Solution

by:
mirek071497 earned 100 total points
ID: 1342233
You mast add this to You'r MainForm OnCreate event.

procedure TForm1.FormCreate(Sender: TObject);
begin
  Left := -1000;  { You'r form is invisible on screen }
  showwindow( FindWindow (nil,@Application.Title[1]),sw_hide);  { application is invisible on task bar }
end;

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:icampbe1
ID: 1342234
Hi there alona,

Part one of your question is easy without dicking around and setting its location off screen.  Simple go to the DPR file and do the following:

PROGRAM HideForm;

USES
   Forms, OtherStuff;

{$R *.RES}

BEGIN
   Application.Initialize;
   Application.ShowMainForm := FALSE;  <-- Prevents form showing
   Application.CreateForm( TFormType, FormInstance );
   Application.Run;
END.

This is exactly what the ShowMainForm property was meant for.

Now part two of your question.  Do the following:

CONSTRUCTOR TForm1.Create( AOwner: TComponent );
BEGIN
   Inherited Create( AOwner );      {Create the object instance}

   ShowWindowAsync( (Owner AS TApplication).Handle, SW_HIDE );
END;

I hope this helps you out.
Cheers,
Ian C.
0
 
LVL 2

Author Comment

by:alona041797
ID: 1342235
I need to check both of your answers and grade the best one... wait a day or two...
0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1342236
we are waiting more than 3 weeks !
0
 
LVL 2

Author Comment

by:alona041797
ID: 1342237
... oops ... I'll check your answers ... wait ...
0

Featured Post

Technology Partners: 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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