I would like to add TOPMOST to my constants program but when I add in the topmost style the filerequest screen is hidden.
Is there a way to add Topmost to filerequest?
Set the FILEREQUEST parent, second parameter, to the TOPMOST window. It will be mandatory or will you allow the user to choose if the app is TOPMOST or not?
SetWindowPos(w1.hwnd, HWND_TOPMOST, 0, 0, 0, 0,SWP_NOSIZE | SWP_NOMOVE)
' main loop
WAITUNTIL w1 = 0
' window procedure
SUB w1_handler(), INT
SUB GetFilename(WINDOW w), STRING
string filter = "All Files (*.*)|*.*|Text Files (*.txt)|*.txt||"
ISTRING filename[MAX_PATH] = FILEREQUEST("Select File", w, 1, filter,"txt", 0, "")
IF LEN(filename) THEN SETCAPTION w1, filename
if fasecero's post doesn't solve your problem then have a look Here (https://www.ionicwind.com/forums/index.php?topic=1396.msg13086#msg13086)
in the bottom sub:
create a temp WINDOW t1
use the MODIFYEXSTYLE command to add WS_EX_TOPMOST after the _Postmessage command
Fasecero and Larry,
Thanks for the help with the topmost problem.
It did work, but ultimately I didn't use it in the final version of the constants search program as the program also opens your browser but still remains topmost.
So in the end it wasn't what I wanted, but many thanks anyway.