New test MAIN WINDOW OFF and multithread

122 views
Skip to first unread message

José Quintas

unread,
Jul 22, 2025, 2:31:58 PMJul 22
to Harbour Minigui

testmt.png

With this change, it becames better about focus on window close. using multithread and MAIN WINDOW OFF.

To do: close first window on thread do not close application

Considering previous wrong focus, and this code part, to hmg first window is set as main window, and it is saved on _HMG_MainHandle

José M. C. Quintas

José Quintas

unread,
Jul 30, 2025, 5:31:49 PMJul 30
to Harbour Minigui
video of my test


Looking the video you will see an application running, and several windows.
You do not know that it is multithread, if I do not talk about it.
All working ok, except last window closed.
And EXE running gtwvg, hmg extended and hwgui.

This is a test only.
With the single change on this post, multithread focus was solved.
Change resource too, to be for each thread, change STATIC aResources to THREAD STATIC aResources
I do not have knowledge to know if there is needed more changes, it is a test only.
At momment, last needed change is about do not close application when close first window on thread.
I do not know how to do that.

As I said before, I have few knowledge about windows API, and no knowledge about C language.
But I can contribute with "let's change it and see what happens" test.
I've been using multithread in my application for a few years, and I base my tests on situations i've encountered before.
Wheter it's right or wrong, I can't say, but it has worked.

I began to use multithread with gtwvg, to have several windows, and to open dbf in separate threads without needing any extra control over aliases, indexes, order, filter, this is very useful when working with dbf and multiple windows.
And GUI is this: multiple windows, why not multithread?
Maybe a heavy application becames light if each thread takes care of part of application.

Maybe multithread is like open source.
Main thread do not needs to make all job alone, when threads can help main thread.

José M. C. Quintas
Reply all
Reply to author
Forward
0 new messages