Welcome! Log In Create A New Profile

Advanced

Refreshing Main Window

Posted by gga 
gga
Refreshing Main Window
June 08, 2021 09:18PM
My WinDev22 Project has WIN_Main defined as the first Window
The LogIn Window is opened in the Program Initialization
So far, every thing works fine.
However, the Win_Main menu has an option to Log Out which takes the User back to the LogIn Window
When a subsequent user logs in I want to re-initialize Win_Main to refresh the controls since the Menu Options may be different for that user. I don't seem to be able to accomplish that - what am I missing?
Thanks,
Garry
Argus
Re: Refreshing Main Window
June 08, 2021 10:08PM
as there are many pieces of information missing, I'm going to assume the following:
- From the main window, you are reopening the login window as a modal window
- it's when you are closing that login window, from the code of the main window that you want to redisplay it fully
- The different menu options of tha min window are put in place in the window init code


if all that is correct, then an executeprocess of the window init code (something liek executeprocess(mywindow,trtinit) should do the trick
Another way would be to put all the init code in a local procedure of th amin window, and to simply call it
gga
Re: Refreshing Main Window
June 09, 2021 01:19AM
The LogIn Window is called in the Program Initialization so the WIN_Main has not opened yet.
I had already tried the ExecuteProcess(WIN_Main, trInit) and it didn't work but putting all the init code in a Procedure and then calling it did work just fine.
Thanks,
Garry
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: