BBC BASIC for Windows
« notepad 'hides' behind my main screen. »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:53pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: notepad 'hides' behind my main screen.  (Read 380 times)
kingsmiller
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 13
xx 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 » User IP Logged

DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 321
xx 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
User IP Logged

kingsmiller
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 13
xx 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 ..







User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls