Author |
Topic: Running minimized (Read 582 times) |
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
Running minimized
« Thread started on: Nov 18th, 2013, 7:39pm » |
|
I have just completed a program that is liberally sprinkled with print statements that report status and progress on the monitor window. It works fine.
I have now been asked to add an option to start the program minimized (i.e. when the program starts, it creates a minimised window that can later be expanded by clicking on the tab in the Windows Taskbar). How do I do this?
Ian
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Running minimized
« Reply #1 on: Nov 18th, 2013, 8:10pm » |
|
on Nov 18th, 2013, 7:39pm, g3nrw wrote:I have now been asked to add an option to start the program minimized.... How do I do this? |
|
Add a REM!Window compiler directive including the minimised option. For example:
Code: REM!Window 800,600,client,minimised,xpstyle Don't forget to include xpstyle since it's terribly easy to disable 'Windows XP Visual Styles' accidentally when using a REM!Window directive.
Richard.
|
« Last Edit: Nov 18th, 2013, 8:16pm by admin » |
Logged
|
|
|
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
Re: Running minimized
« Reply #2 on: Nov 18th, 2013, 8:38pm » |
|
on Nov 18th, 2013, 8:10pm, Richard Russell wrote:800,600,client,minimised,xpstyle
Richard. |
|
That works as you describe, but I realize now I posed the wrong question.
What I really want to do is: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Start the program, with window minimized.
2. Fetch an option from a .ini file
3. If option is true, leave window minimized. If false, open the window. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Is this doable?
Ian
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Running minimized
« Reply #3 on: Nov 18th, 2013, 9:29pm » |
|
on Nov 18th, 2013, 8:38pm, g3nrw wrote:What I really want to do is: 1. Start the program, with window minimized. 2. Fetch an option from a .ini file 3. If option is true, leave window minimized. If false, open the window. |
|
You still want to start the program minimised, so the solution I offered is still the right one. To achieve the above all you need to do is restore (or maximise, as appropriate) the window when the option says so.
Minimising, maximising and restoring the window are documented in the main Help manual under Accessing the Windows API... Minimising or maximising the window.
Richard.
|
|
Logged
|
|
|
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
Re: Running minimized
« Reply #4 on: Nov 19th, 2013, 08:22am » |
|
on Nov 18th, 2013, 9:29pm, Richard Russell wrote:Minimising, maximising and restoring the window are documented in the main Help manual Richard. |
|
Just the job.
[One of these days I will find my way into all the crooks and nannies of the BB4W documentation, which to me seems to be spread "all over the place".]
Thank you Richard.
Ian
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Running minimized
« Reply #5 on: Nov 19th, 2013, 09:09am » |
|
on Nov 19th, 2013, 08:22am, g3nrw wrote:One of these days I will find my way into all the crooks and nannies of the BB4W documentation, which to me seems to be spread "all over the place". |
|
As far as 'formal' documentation is concerned there are only two sources: the main Help manual shipped with BB4W itself - accessed e.g. by pressing F1 (and also available online) - and the Wiki (BB4W Programmers' Reference). They are both linked from the BBC BASIC for Windows Resources panel at the top of this group's home page.
Richard.
|
|
Logged
|
|
|
|
|