Link to home
Start Free TrialLog in
Avatar of Mat_a
Mat_a

asked on

Form always show/use, even after a showmodal

I have an application that has a "desktop form" that is always shown. However when I go into some of the applications other screens I have to use showmodal. This in turn renders the "desktop form" useless as you can't move it or anything. Looking through the source for ShowModal it disables all the windows (including my "desktop form").... Is there a way I can get this form to still work correctly?
Avatar of j42
j42

Hi,

maybe you can try an MDI application?

Regards
Don't use ShowModal for any other form. That's the purpose of ShowModal - to disable all other forms in the current app.

Regards, Geo
Hi Mat ...

As Geo suggested, it's ShowModel's purpose to freeze all other forms whilst the current form is being displayed.

Using Show instead, or just changing the visible = true parameter, will mean that all other forms, including the 'desktop' form can be in focus and selected / moved by the user.

Otherwise, if you want certain form's to be enabled and others not, you simply need to write some simple logic for enabling / showing / hiding forms at certain times.

Hope this helps,
Steve
Avatar of Mat_a

ASKER

Thanks for the input so far, I've been developingin Delphi since version 1... so I am aware of the ShowModal usage, however I probably put my original question in badly as I was trying to find if there was a hack, or another method to do this. Run the form as another process (can I do that) or would it help in it's own thread etc.?
???????
hello Mat A. . . . I could use some more information about why you "I have to use showmodal" and what you "Need" to be Modal (not functioning) and what you need to be non-modal (the desktop form I guess), maybe some info about what you are trying to do with the "new" modal form? It seems you want all other of your app's forms disabled except the desctop form and the pop-up "new" form?
Avatar of Mat_a

ASKER

Although the project is quite small (only 15 forms) the whole app is quite intertwined, and also has plugins that can access some of the forms as well (using show modal again). Perhaps I am asking the impossible and will leave it, but I was hoping that there might be a way to Ignore a form or a hack to re-enable a form once a show modal has happened (much like freeing and then re-creating/showing the form after ths show modal, which works but is messy based on the number of calls to the show form)... But yes there is one floating desktop form that I want *always* floating (and able to move) even if a show modal has happened.
ASKER CERTIFIED SOLUTION
Avatar of mocarts
mocarts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mat_a

ASKER

Fantastic - exactly the kind of hack I hoped for!!
Nice mo, very nice. And useful. I'll remember that ;-)