Author |
Topic: notepad 'hides' behind my main screen. (Read 381 times) |
|
kingsmiller
New Member
member is offline


Gender: 
Posts: 13
|
 |
notepad 'hides' behind my main screen.
« Thread started on: Oct 7th, 2016, 7:32pm » |
|
Sorry to keep asking questions, but i am stumpted on this as well.
My program calls for several 'Notepad Reports' to be displayed, such as :-
1680 WHEN 35: file$=(FNspecialfolder(38)+"Fabric Predictor\documents\myformulea.txt") 1690 SYS "ShellExecute", @hwnd%, 0, "notepad", file$, 0, 1
Quite often the report "hides" behind the program screen. How can I always ensure it appears in front and not masked.
|
« Last Edit: Oct 8th, 2016, 09:00am by kingsmiller » |
Logged
|
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: notepad 'hides' behind my main screen.
« Reply #1 on: Oct 8th, 2016, 2:31pm » |
|
Again beyond my expertise, but ShellExecute will return a handle to the opened program (add something like TO ntpdhandle% to the end of the SYS command) - can you then use SYS "SetWindowPos" or "BringWindowToTop" to bring it up?
Of course you could move your program window down, or minimise it, but I'm assuming you don't want to do that.
I'd be interested to know if that works!
You could contact Richard Russell directly - I know he is always open to requests for help, and his knowledge of this kind of thing is WAY ahead of mine... Or you could use the cross-platform BBC Basic forum.
Best wishes,
D
|
|
Logged
|
|
|
|
kingsmiller
New Member
member is offline


Gender: 
Posts: 13
|
 |
Re: notepad 'hides' behind my main screen.
« Reply #2 on: Oct 8th, 2016, 3:24pm » |
|
When you dont use BB4W for several years then we get rusty. I have been scratching my head all afternoon with this problem.
I think I have solved it now, probually not the correct method, but it works.
I have forced my program to use the entire screen, with -
REM *** Constants *** SYS "GetSystemMetrics", 0 TO SCREENWIDTH% SYS "GetSystemMetrics", 1 TO SCREENDEPTH%
etc, etc
The only "drawback" is that I cannot maximise any more because I am using all the screen.
Now when I view these 'notepad' docs then they are always in front of the program screen.
Hopefully after a few more days I will have got back into the BB4W way of thinking again.
Kind Regards ..
|
|
Logged
|
|
|
|
|