Jump to content

vshvetsov

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. vshvetsov

    MessageBox is hidden by a modal form

    Thanks a lot for the discussion. I think that the problem really comes from calls to ProcessMessages inside OnClick. I needed to switch to using threads for a very long time, but I still can’t choose the time. Does anyone know a good text about thread programming for beginners? I need 1) performing calculations with displaying progress in the window and the possibility of interruption, 2) parallelization. Of course, there are many texts, but I will be grateful for a link to a good one.
  2. vshvetsov

    MessageBox is hidden by a modal form

    1) I show the form with ShowModal(). 2) I press the button "Execute". 3) In a ButtonClick event handler I call Func(). 4) Func performs long mathematical calculation. 5) During the calculation Func regularily calls Application->ProcessMessages(). 6) During the calculation I often swith to other applications on my comp and do smth else. 7) At the end of calculation Func() calls Application->MessageBox(). I don't know, what other details could be important for the description of the situation.
  3. vshvetsov

    MessageBox is hidden by a modal form

    Do you mean, I may write a ApplicationGetActiveFormHandle function, assign the function to Application->FOnGetActiveFormHandle, and set any form as an active form? Couldn't this mess up the Application object? After all, the object uses GetActiveFormHandle in other situations as well?
  4. vshvetsov

    MessageBox is hidden by a modal form

    The function Func() belongs to the "kernel" part of my code, it doesn't know anything about forms. In fact, all my kernel functions, when they want to give a message, generate a special MyKernel.OnMessage(string, MB_flags) event. In the "interface" part of the program, a general response to this event is implemented. It simply passes string and flags to an Application->MessageBox. When a OnMessage event is generated by kernel functions, different forms can be active (and are not guaranteed to have focus). To determine an active form I would need to write a complex code. But I just need to display a message on the screen so that it is guaranteed to be visible. It's a pity, if it is not possible. Maybe it will help to explicitly specify the MB_TOPMOST flag in a MessageBox?
  5. vshvetsov

    MessageBox is hidden by a modal form

    Hi, My function Func() calls Application->MessageBox(..). If Func() is called from a member function of a modal form, then sometimes (not always!) the message box appears hidden under the modal form. In this case, the modal form is not active. It looks like my app is stuck. Switching between windows in Windows with Alt-tab helps to see the message. What could be the reason? How can you ensure that the message box always appears on top of all open windows?
  6. vshvetsov

    how to respond on user drag of a column border in a listview

    Thank you, @Anders Melander and @Remy Lebeau. I dont see where I can put a mark "question is answered" or smth like that. It was useful in old forum.
  7. Hi, how can I write a respond to the event, that user has changed the width of a column in a TListView (report view) by dragging a column border with a mouse?
×