Results 1 to 5 of 5

Thread: Prevent form from coming to front

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    On 1 application i'm using form.BringToFront. May or may not be what you are after. There's more you can test with, like Application.Restore...

  2. #2
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    In lazarus you can use this to lock focus to a single form, I believe this will work with delphi as well.

    Form.ShowModal;

  3. #3
    Thanks for replying. I haven't seen application.restore before, I will check out what that does. The showmodal is great when you have multiple forms within same project but I have an issue where I have to launch another exe that in turn opens up dlls containing software for the students to work on. It has always worked well in the past. Anyway, I have since got a work around that seems to be holding. fingers xed
    The views expressed on this programme are bloody good ones. - Fred Dagg

  4. #4
    you can try some of these calls with the application that you want to bring up. I guess it's best to call them on FormShow if you are using a form event.
    BringWindowToTop(Application.Handle);
    SetForegroundWindow(Application.Handle);
    SetActiveWindow(Application.Handle);

Bookmarks

Posting Permissions

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