PyQt5 How to temporarily close the main window after opening a dialog box? - pyqt5

I want that when I click a button in the main window, it will go to the second window. I used the hide function and hid the main window, but when I finished the process on the second window, I want to return, but when I exit the second window, the program is already ending, because the first main window was already ending when I was in the second

Related

Open a new window every time a button on mainWindow is clicked - PyQt5

I'm not able to open new windows with every click of the pushButton. All I can do right now is open two windows at maximum.
Wanted to open a new window with every click of a button, but was only able to open 2 windows with 2 button clicks.
Clicking the button should open a new window each time without closing the previous one.

Maximized Main Form follows the restore window if I open another form, and I dont want that

I have a main form maximized in Access that I do not want to be in restore window or hidden or closed when another form opens.
I observed that when I open another form by DoCmd.Restore by clicking a button in the main form, the main form is also doing the restore window.
When I clicked a button in the main form, say Add Record, with DoCmd.Restore, my main form is doing a restore window rather than staying in maximized window
Any idea?
Thanks in advance
Your question is a bit confusing. If you don't want to un-maximize your forms, don't do DoCmd.Restore.
If you want to open another form non-maximized, but keep the main form maximized, you need to make the second form a popup form.
This is how MDI windows work - you can't have maximized and non-maximized forms at the same time - except popup forms.

How to open and close different windows at the same time?

I'm still new to rebol and programming in general, and I'm trying to write a program for practice.
In this program, there is a main window, which includes a button with which I want to open a new window, and close the main window at the same time.
Now, I know how to do each function separately, but how do I combine them together?
This is what I tried:
button "Start" [view start-win unview main-win]
What's happening is that start-win opens when I click the button, then immediately all the windows close.
view starts an event loop - so no code executes after that until the window view opened closes.
To start a new window without that happening, use view/new - then to start the event loop when you are ready, do-events
unviewremoves the last added window and does not take any arguments by default. To close a specific window use with refinement unview/only window-name
So in your first case you create a new window and next close it. In the other case you start closing the last created window and next create a new one.

Modal dialog box disable main window

I'm open a modal dialog box using the next code:
call screen 0010 starting at 15 1.
However it disables the main window to continue working.
It's posible to call a modal dialog box and enable the main window to work while it's opened?
The very nature of a modal window is that it blocks the application until it is closed. The opposite would be an amodal dialog, and no, you can't have an amodal modal window. What you can do:
CALL FUNCTION 'Z_FUNCTION_WITH_DIALOG' STARTING NEW TASK 'FOOBAR' - this will start an additional external session (as long as the user has not exceeded the session limit).
Use the class CL_DGUI_DIALOGBOX_CONTAINER to produce an amodal window. Be aware that you can't use screens (dynpros) inside this container. Check the report RSDEMO_DIALOGBOX_CONTROL for some example coding.

Get second active window vb.net

I need to create a form where AlwaysOnTop = True when the browser is visible. This creates some sort over "overlay". The logic works like this:
The program checks which window is active.
If the active windows is a certain process, my form will initialize the TopMost utility, and be the active window itself.
When the certain process is not the active window anymore, my form will disappear.
How I did it:
My program checks if a browser is the active window, if so: the form gets topmost and the program stops checking what the active window is. (because my topmost form is the active window now).
Now the program needs to check what the window under my form is, the second active window.
If it's not the browser anymore, the form needs to hide, and the program will check what the active window is again.
I already completed the function that checks what the first active window is,
I'm stuck on getting the function that checks what the second active window is.
I'm not sure that there's such as thing as a "Second active window" - its either active or its not.
Why don't your leave you active window checker running after the first step of detecting the browser.
You can detect when the active window is no longer your form and hide your overlay then.