Mad Except Box Need to stay on top with applicaion
Mad Except Box Need to stay on top with applicaion
Hi,
[b]How to make madExcept exception box "stay on top" with my application?
My code is to make it stay on top as:
[/b]
//========================================================================
procedure MyOnExceptBoxCreate(exceptBox: dword; simpleMsgBox: boolean);
begin
with MESettings do SetTopmost (GetExceptBoxHandle,True); //True = need to stay on top
end;
//========================================================================
initialization
with MESettings do OnExceptBoxCreate := MyOnExceptBoxCreate;
//========================================================================
By this code Exception Box stay always on top even with other application too.
Thanks in Advance
[b]How to make madExcept exception box "stay on top" with my application?
My code is to make it stay on top as:
[/b]
//========================================================================
procedure MyOnExceptBoxCreate(exceptBox: dword; simpleMsgBox: boolean);
begin
with MESettings do SetTopmost (GetExceptBoxHandle,True); //True = need to stay on top
end;
//========================================================================
initialization
with MESettings do OnExceptBoxCreate := MyOnExceptBoxCreate;
//========================================================================
By this code Exception Box stay always on top even with other application too.
Thanks in Advance
Re: Mad Except Box Need to stay on top with applicaion
Looks ok to me. Is there a question hidden in your post? Or did you just want to share your idea?
Re: Mad Except Box Need to stay on top with applicaion
I had posted my query not an idea.
My question is:
How to make madExcept exception box "stay on top" with my application?
currently it stays always on top with other windows too, but I need to make it stay on top with my application.
My question is:
How to make madExcept exception box "stay on top" with my application?
currently it stays always on top with other windows too, but I need to make it stay on top with my application.
Re: Mad Except Box Need to stay on top with applicaion
Can you explain in a bit more detail? I'm not sure I understand what you mean exactly...
Re: Mad Except Box Need to stay on top with applicaion
Let me explain through an example:
suppose we have an application "ABC Management System" in which MadExcept is enabled. When any exception raised in application, the madExcept box will appear to user with error information. The error dialogue box should always stay with the application as dialogue on top of the application.
In my case...
The error dialogue box appears on top of the application but if you go to other window like MS Word, the error dialogue box still stay on top of the MS Word window if you not handle the error box. The Error Message box must be stay with application in which the exception raised.
I hope the above details will help you to understand the issue.
If you still have any confusion please let me know...
suppose we have an application "ABC Management System" in which MadExcept is enabled. When any exception raised in application, the madExcept box will appear to user with error information. The error dialogue box should always stay with the application as dialogue on top of the application.
In my case...
The error dialogue box appears on top of the application but if you go to other window like MS Word, the error dialogue box still stay on top of the MS Word window if you not handle the error box. The Error Message box must be stay with application in which the exception raised.
I hope the above details will help you to understand the issue.
If you still have any confusion please let me know...
Re: Mad Except Box Need to stay on top with applicaion
Have you tried "SetTopmost(..., false)" in your "MyOnExceptBoxCreate" handler?
Re: Mad Except Box Need to stay on top with applicaion
Yes, that's make strange, If you will not clear madExcept box it goes behind the application and you will not get any more exception error message. I need to make it stay on top with application.
Re: Mad Except Box Need to stay on top with applicaion
You could try using "SetParent" to make the madExcept window a child of your main window. This way the madExcept window should probably stay on top with your application. I haven't tried that myself yet, though. If you want to do this you should probably make sure that the option "pause all running delphi/bcb threads" is disabled here:
http://help.madshi.net/madExceptSettings2.htm
http://help.madshi.net/madExceptSettings2.htm
Re: Mad Except Box Need to stay on top with applicaion
It's really looks good...!
I am unable to locate the madException box where I will have to set it as "SetParent". Please add steps to make it as child window or if you have any source that could be great (if any).
Thanks!
I am unable to locate the madException box where I will have to set it as "SetParent". Please add steps to make it as child window or if you have any source that could be great (if any).
Thanks!
Re: Mad Except Box Need to stay on top with applicaion
You should be able to call SetParent in "MyOnExceptBoxCreate". You may have to change the window styles (SetWindowLong(GWL_STYLE)), I'm not sure.
Re: Mad Except Box Need to stay on top with applicaion
It's not working.
TY
TY
Re: Mad Except Box Need to stay on top with applicaion
A few more details, please?hareram wrote:It's not working.
BTW, do you have a commercial license, or are you using the non-commercial edition?
Re: Mad Except Box Need to stay on top with applicaion
Yes, I have commercial license.
Re: Mad Except Box Need to stay on top with applicaion
See if SetWindowPos() helps, pay special attention to the second parameter.
--Iconic
--Iconic
Re: Mad Except Box Need to stay on top with applicaion
I have already used the SetWindowPos() and tried with both true and false as second parameter. By using "false", MadExcept box goes behind the screen and "true" make the box stay on top with every windows.
My objective is to make the exception box stay on top with application and user can not carry their work until madeExcept box handled.
My objective is to make the exception box stay on top with application and user can not carry their work until madeExcept box handled.