+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Rami
    Guest

    When i set the Form Visible propertie to False it stays True at Runtime!!!!!!!!!

    Hi
    I'm trying to make the Server program Invisible, so i set the Visible propertie to False..But when i try to run the program the form is still visible!!!!!
    So i try to do that in code:
    Form1.Visible := False;
    But still the same problem!!!!!!!!!!

  2. #2
    Senior Member Dark Angel's Avatar
    Join Date
    Feb 2005
    Posts
    389
    Code:
    Application.Title:='';
     Application.ShowMainForm:=False;
    try this like that
    1.open the project then click on the project menu
    2.viow project source code
    3.add the two lines above
    thanks to me..

  3. #3
    Rami
    Guest
    hehehehehehehe
    Yes, thank to you

  4. #4
    Che
    Che is offline
    Senior Member Che's Avatar
    Join Date
    Feb 2005
    Posts
    497
    What does Google think of Che !? ...

    che is loyal .. che is now cool .. che is unique .. che is involved in many projects simultaneously .. che is exotic .. che is the brain .. che is a symbol of hope and faith .. che is not a "she"

  5. #5
    Rami
    Guest
    This is not what i was asking for, but this is great (I was going to ask sooner or later how to hide my program from the Task Manager)...Thx man

  6. #6
    ratws
    Guest
    Quote Originally Posted by Che
    Che, what do you do with this :confused:

  7. #7
    Che
    Che is offline
    Senior Member Che's Avatar
    Join Date
    Feb 2005
    Posts
    497
    Quote Originally Posted by ratws
    Che, what do you do with this :confused:
    Read it, src: http://www.delphihackerspages.nl/hide.html

    I am still searching for source code to hide programs under the processes tab in Win NT/2000. Any help will be appreciated. Please if you have any information email me.

    Hide from "Taskmanager" (Win NT/2000)

    When you press the Ctrl-Alt-Del key combination the and press the button called ''Task Manager'' The Task Manager dialog box pops up. One simple way to hide your program from that dialog (the Task Manager dialog) is to clear the Application object's Title. If a program's main window does not have a title, Windows NT/2000 does not put the program in the "Close Program" dialog window. Remember that in Delphi the so called "main" window is not the Application window. The best place to clear the Title property is inside the Project's source code. To see the Project source select Project|View Source in the IDE. After the Application.Initialize add the bolded line:

    ...
    Application.Initialize;
    Application.Title := '';
    Application.CreateForm(TForm1, Form1);
    ...

    This approach has a minor side efect: now the Application's button on the Task Bar does not have a caption (if the TaskBar is visible - of course). The application will still pop up under the Processes tab.

    Download Demo

    Hide from "Close Program" (Win 9x)

    Another way to hide the program is to register it as a service mode program by calling the RegisterServiceProcess API function. RegisterServiceProcess is a relatively undocumented function in KERNEL32.DLL and is not available with Windows NT/2000. The function is not imported in the Windows Delphi unit.

    ...
    implementation

    const
    RSPSIMPLESERVICE = 1;
    RSPUNREGISTERSERVICE = 0;

    function RegisterServiceProcess
    (dwProcessID, dwType: DWord) : DWord;
    stdcall; external 'KERNEL32.DLL';

    procedure TForm1.FormDestroy (Sender: TObject);
    begin
    RegisterServiceProcess
    (GetCurrentProcessID, RSPUNREGISTERSERVICE)
    end;

    procedure TForm1.FormCreate (Sender: TObject);
    begin
    RegisterServiceProcess
    (GetCurrentProcessID, RSPSIMPLESERVICE)
    end;
    ----
    Download Demo

    Hiding the Application's TaskBar Button

    Suppose you want to remove/hide the button on the TaskBar that represents your application. The trick is simple: in the OnCreate handler for your main form, insert the following peace of code:

    ---
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    ShowWindow(Application.Handle, SW_HIDE);
    SetWindowLong(Application.Handle, GWL_EXSTYLE,
    GetWindowLong(Application.Handle, GWL_EXSTYLE)
    or WS_EX_TOOLWINDOW );
    ShowWindow(Application.Handle, SW_SHOW);
    end;
    ----
    Download Demo

    Your application is now "invisible". Unfortunately pressing Ctrl-Alt-Del displays (if enabled) your applications Title allowing anybody to use "End Task" to terminate it or even "Shut Down" to exit from Windows.

    postamble();
    What does Google think of Che !? ...

    che is loyal .. che is now cool .. che is unique .. che is involved in many projects simultaneously .. che is exotic .. che is the brain .. che is a symbol of hope and faith .. che is not a "she"

  8. #8
    ratws
    Guest
    Sorry i didn't express myself properly and misunderstood your intention. You were not including XP right?!!?! Such question came automatically in my mind since i know it for long,and i know it doesn't work (XP) Ooops

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 03-09-2005, 23:10
  2. form help
    By fallen356 in forum Delphi Help
    Replies: 4
    Last Post: 28-08-2005, 09:59
  3. hide form from alt+tab
    By unknown in forum Delphi Help
    Replies: 1
    Last Post: 28-05-2005, 13:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.