RunProgram top window

Just starting out? Need help? Post your questions and find answers here.
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 209
Joined: Thu Dec 28, 2023 9:04 pm

RunProgram top window

Post by rndrei »

How to make the called program on top of all windows?

Code: Select all

            program_run=RunProgram("./file","","", #PB_Program_Open | #PB_Program_Read | #PB_Program_Write | #PB_Program_Error )
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 5038
Joined: Sun Apr 12, 2009 6:27 am

Re: RunProgram top window

Post by RASHAD »

Try

Code: Select all

StickyWindow(your main window, 1) 
Egypt my love
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 209
Joined: Thu Dec 28, 2023 9:04 pm

Re: RunProgram top window

Post by rndrei »

I need the running program to be on top of all open windows?
Axolotl
Addict
Addict
Posts: 936
Joined: Wed Dec 31, 2008 3:36 pm

Re: RunProgram top window

Post by Axolotl »

On windows this could work
1. Find window handle
2. Send message to the window with topmost style
Sorrry cannot provide code, because i am on mobile phone.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Post Reply