gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Jun 3, 2022 8:33:14 GMT -5
'** Created by Liberty BASIC Workshop - 3/6/2022 16:21:22 '** Window Title
[InitColors] 'Please use default colors when possible. 'ForegroundColor$ = "Black" 'BackgroundColor$ = "Buttonface"
True = 1 : False = 0
[WindowSetup] NOMAINWIN WindowWidth = 524 : WindowHeight = 251 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup] stylebits #main.bu1, _BS_MULTILINE, 0, 0, 0 button #main.bu1, "Entrance", [entr], UL, 40, 85, 185, 35 stylebits #main.bu2, _BS_MULTILINE, 0, 0, 0 button #main.bu2, "Exit", [quit], UL, 280, 85, 175, 35
Open "Window Title" for Window_nf as #main #main "trapclose [quit]" #main "font ms_sans_serif 10"
[loop] Wait
[quit] close #main : END
[entr] [wWindowSetup] NOMAINWIN WindowWidth = 242 : WindowHeight = 171 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[wControlSetup] Menu #main1, "&File" , "E&xit", [wquit1] stylebits #main1.bu1, _BS_MULTILINE, 0, 0, 0 button #main1.bu1, "Exit", [wquit1], UL, 40, 20, 145, 50
Open "Window Title" for Window_nf as #main1 #main.bu2 "!disable" #main1 "trapclose [wquit1]" #main1 "font ms_sans_serif 10"
[wloop] Wait
[wquit1] #main.bu2 "!enable" close #main1 goto [loop]
Hello from Greece. I would like to ask a question. How can I disable TRAPCLOSE on a form that is not active?
Thank you very much Gaslouk
|
|
|
Post by Walt Decker on Jun 3, 2022 8:53:39 GMT -5
Quick answer: Disable the form window. Disabled windows, whether form or control do not receive user input.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Jun 3, 2022 9:00:16 GMT -5
How to activate the closing trap in one window when another dependent on the first window has opened.
Thank you very much Gaslouk
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Jun 3, 2022 9:19:02 GMT -5
Ok Now I understand.
[InitColors] 'Please use default colors when possible. 'ForegroundColor$ = "Black" 'BackgroundColor$ = "Buttonface"
True = 1 : False = 0
[WindowSetup] NOMAINWIN WindowWidth = 524 : WindowHeight = 251 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup] stylebits #main.bu1, _BS_MULTILINE, 0, 0, 0 button #main.bu1, "Entrance", [entr], UL, 40, 85, 185, 35 stylebits #main.bu2, _BS_MULTILINE, 0, 0, 0 button #main.bu2, "Exit", [quit], UL, 280, 85, 175, 35
Open "Window Title" for Window as #main #main "trapclose [quit]" #main "font ms_sans_serif 10"
[loop] Wait
[quit] close #main : END
[entr] [wWindowSetup] NOMAINWIN WindowWidth = 242 : WindowHeight = 171 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[wControlSetup] Menu #main1, "&File" , "E&xit", [wquit1] stylebits #main1.bu1, _BS_MULTILINE, 0, 0, 0 button #main1.bu1, "Exit", [wquit1], UL, 40, 20, 145, 50
Open "Window Title" for Window as #main1 #main.bu2 "!disable" #main1 "trapclose [wquit1]" #main "disable" #main1 "font ms_sans_serif 10"
[wloop] Wait
[wquit1] #main.bu2 "!enable" close #main1 #main "enable" goto [loop]
Thank you very much Gaslouk
|
|
|
Post by Rod on Jun 3, 2022 10:28:32 GMT -5
Consider “modal” style window for the window that interrupts the main window. Thus the main window is isolated until the middle window is used and closed.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Jun 3, 2022 11:07:24 GMT -5
Consider “modal” style window for the window that interrupts the main window. Thus the main window is isolated until the middle window is used and closed. Thank you Rod
I will see and this.
Thank you
Gaslouk
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Jun 21, 2022 0:43:57 GMT -5
Consider “modal” style window for the window that interrupts the main window. Thus the main window is isolated until the middle window is used and closed. Hi Rod The modal window can be only a dilog window and can't have menu or popup menu. Don't help that for my app. For windows when haven't menus is ok.
regards Gaslouk.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Jun 21, 2022 1:53:59 GMT -5
'** Created by Liberty BASIC Workshop - 3/6/2022 16:21:22 '** Window Title
[InitColors] 'Please use default colors when possible. 'ForegroundColor$ = "Black" 'BackgroundColor$ = "Buttonface"
True = 1 : False = 0
[WindowSetup] NOMAINWIN WindowWidth = 524 : WindowHeight = 251 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup] stylebits #main.bu1, _BS_MULTILINE, 0, 0, 0 button #main.bu1, "Entrance", [entr], UL, 40, 85, 185, 35 stylebits #main.bu2, _BS_MULTILINE, 0, 0, 0 button #main.bu2, "Exit", [quit], UL, 280, 85, 175, 35
Open "Window Title" for Window_nf as #main #main "trapclose [quit]" #main "font ms_sans_serif 10"
[loop] Wait
[quit] close #main : END
[entr] [wWindowSetup] NOMAINWIN WindowWidth = 242 : WindowHeight = 171 UpperLeftX = INT((DisplayWidth-WindowWidth)/2) UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[wControlSetup] Menu #main1, "&File" , "E&xit", [wquit1] stylebits #main1.bu1, _BS_MULTILINE, 0, 0, 0 button #main1.bu1, "Exit", [wquit1], UL, 40, 20, 145, 50
Open "Window Title" for Window_nf as #main1 #main1 "trapclose [wquit1]" #main1 "font ms_sans_serif 10" #main "disable"
[wloop] Wait
[wquit1] close #main1 #main "enable" goto [loop]
This can help.
|
|