curly
Full Member
Posts: 161
|
Post by curly on Jun 29, 2021 9:45:00 GMT -5
Hi Again,
I am using two main windows, with several hundred text and conbo boxes that are hiddena and shown as needed. Additionally, lots of them are replicated in a different colour to highlight missing data. In order to insert data remotely in a window that doesn't have focus, I open both windows at start-up. I currrently run and test my application using the debugging window, in case I end up in a continuous loop or cannot move forward, and with all the text and combo boxes appearing before they are hidden, start-up takes about 5 seconds during which I have a mass of flashing images.
I assume the debugging window runs much slower than a standalone application? Is that likely to resolve the problem?
Is there a way the text and comboboxes do not appear before they are hidden? Is this something I will have to live with?
Thank you all, David
ps Didn't do any work Sunday, took my 1955 Riley to a classic car show with the grandkids and had a picnic! Strange thing with the Riley, if you do a Google search on the UK registration number, DYJ624, lots of pictures of my car appear, not simply a Riley like mine, but my actual car, taken all over the place, both before and since I became the owner.
|
|
|
Post by Chris Iverson on Jun 29, 2021 12:17:28 GMT -5
I assume the debugging window runs much slower than a standalone application? Is that likely to resolve the problem?
Debugging mode DOES slow things down, but it's possible it might still be visible, even at full speed. Is there a way the text and comboboxes do not appear before they are hidden? There are two ways I can think of to help alleviate this. The first and simpler way is to hide the main window itself, in its entirely, as soon as you open it, and then perform your control manipulation. #main, "hide" The window shouldn't even appear, and you can manipulate everything you need to, and then show the window again once you're done. #main, "show" This has the benefit of only being two extra lines of code, while still keeping the control manipulation invisible to the end user. The downside is I think it's possible, although unlikely, for the window to be visible for a split second before it's hidden by the code. You can work around this by using STYLEBITS to make the window invisible before it opens, so that it's not shown at all until you're ready. stylebits #main, 0, _WS_VISIBLE, 0, 0 'Remove the WS_VISIBLE style, making the window invisible until explicitly shown open "test" for window as #main input "Press ENTER to show window.";a #main, "show" input "Press ENTER to end program.";a close #main end If you're doing a LOT of rearranging controls before the window opens, however, I might recommend a couple things. First would be to open a separate window as a splash screen while you prepare the main one. This lets the user know that your application IS loading, it's just taking a little while. Otherwise, if they open your app and see nothing, they may assume something is wrong. The other is a bit more complicated, but would reduce the amount of control management you have to do when the window opens. Take the STYLEBITS option above, and instead of applying it to the entire window, use a STYLEBITS command to make every control invisible that you don't want to be seen when the window opens. stylebits #main.tb, 0, _WS_VISIBLE, 0, 0 'Remove the WS_VISIBLE style, making the control invisible until explicitly shown textbox #main.tb, 10, 10, 100, 25 open "test" for window as #main input "Press ENTER to show the control.";a #main.tb, "!show" input "Press ENTER to end program.";a close #main end That way, as soon as the window opens, the only thing that will be visible are the controls you want to be visible.
|
|
curly
Full Member
Posts: 161
|
Post by curly on Jun 30, 2021 4:51:43 GMT -5
Thank you Chris, and I'm like Brandon, I like it. I have too many text and comboboxes to hide them all and then show them all, but hiding the window before opening is great! Thank you very much. I'm now going to LB help to find out how to create the current Windows waiting icon.
Thank you again, you are lovely people!
|
|
|
Post by Rod on Jun 30, 2021 5:04:44 GMT -5
Check cursor command in the help file.
|
|
curly
Full Member
Posts: 161
|
Post by curly on Jul 1, 2021 9:34:52 GMT -5
Hi Rod, Found it - done it
Thank you - just about to raise another thread
|
|