I have main menu, DCSUMBENU... DCMENUITEM ..... ACTION call other dialog window
How I prevent to click to main MENU and prevent to open other dialog windows twice, 3,4,... times ?
I saw some command in one sample or manual what by I cannot found where
I want make, then if I click on MENU, select some function that open next dialog window, than must close this dialog when want select other one.
Maybe it is SetAppFocus(), ?
My source code is in my other post DCBROWSE refresh.
Also I have question, how sizing and positioning Aplication window size, size of dialogs, for universal torun on user PCs with differently screen resolutions ? Maybe on have resolution 640/480, anyone 1280/1024,... etc.
I count size from SetAppWindow():currentsize(), then set main app windows to size for example 0,9x currentsize ,
ane other dialog windows ? in PIXEL size or ROW, COL ? what is better, If i count their size in 0,xx of current size, I can fill better screen, if in row,col, user with hgh resolution have small dialog windows.
Need too count font size ? to best "visual design" of aplication ?
Sizing in relative row, col is easier
thanks...
How to prevent open child window only once
-
- Posts: 479
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: How to prevent open child window only once
Make the dialog you call modal:I want make, then if I click on MENU, select some function that open next dialog window, than must close this dialog when want select other one.
Code: Select all
DCREAD GUI TITLE "Mywin" MODAL SETAPPWINDOW FIT.....
DCGUI_RESIZE_AUTORESIZE_SCALEFONT and click the button "Test Rule".
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: How to prevent open child window only once
Use a STATIC variable in your window programs like this:
Code: Select all
FUNCTION Window1()
STATIC slIsRunning := .f.
IF slIsRunning
RETURN .f.
ENDIF
slIsRunning := .t.
@ ... DCSAY ... GET ...
DCREAD GUI FIT ADDBUTTONS TO lStatus
slIsRunning := .f.
RETURN lStatus
The eXpress train is coming - and it has more cars.
Re: How to prevent open child window only once
thank you for help , SETAPPWINDOW is command, what I need, but I putting it to DCGETOPTIONS, where is not possible, when I put it to DCREAD GUI, , work fine.
Roger, how simple, but work safely
Roger, how simple, but work safely
Re: How to prevent open child window only once
Ok, I didn't realize you were using MODAL windows.
Yes, SETAPPWINDOW is the solution for that.
However, if you are using NON MODAL windows, then a static variable is a proper solution.
Yes, SETAPPWINDOW is the solution for that.
However, if you are using NON MODAL windows, then a static variable is a proper solution.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact: