×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How To Hide App from taskList

How To Hide App from taskList

How To Hide App from taskList

(OP)
How do i make my application hidden in the tasklist so no one can remove it using ctrl-alt-del?

RE: How To Hide App from taskList

    First, to hide the icon from the taskbar, do the following . . .
ShowWindow(Application->Handle, SW_HIDE);

    To make it reappear (if you need to), do this . . .
ShowWindow(Application->Handle, SW_SHOW);

    To hide your form from the tasklist, you will need to use GetWindowLong and SetWindowLong in your WinMain function like this . . .
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
    DWORD dwExStyle = GetWindowLong(Application->Handle, GWL_EXSTYLE);
    dwExStyle ¦= WS_EX_TOOLWINDOW;
    SetWindowLong(Application->Handle, GWL_EXSTYLE, dwExStyle);

    try
    {
        Application->Initialize();
        Application->CreateForm(__classid(TForm1), &Form1);
        Application->Run();
    }
    catch (Exception &exception)
    {
        Application->ShowException(&exception);
    }
    return 0;
}

    These snippets came from the "FAQ" section of www.bcbdev.com .

James P. Cottingham

International Veneer Co., Inc.
All opinions are mine alone and do not necessarily reflect those of my employer.

RE: How To Hide App from taskList

(OP)
How do i implement the given code using OWL framework? What window should i pass to the GetWindowLong and where do i insert this?

RE: How To Hide App from taskList

    Opps. I didn't realize that you were using OWL. I've never used OWL so I threw my old manuals out. This will work with BCB (Borland C++ Builder). The Window's name is sent to GetWindowLong in the Application->Handle. This is put into the Window's WinMain code section. I'm not familar enough with OWL to translate it. Sorry.

James P. Cottingham

International Veneer Co., Inc.
All opinions are mine alone and do not necessarily reflect those of my employer.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close