What’s your point exactly ? I fail to see how that linked topic relates to the current topic.
Opening/Activating current sourcefile folder, even in Windows 11
Re: Opening/Activating current sourcefile folder, even in Windows 11
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: Opening/Activating current sourcefile folder, even in Windows 11
You mention that you use the text in the title. I suggest taking the text from the address bar.
The window class is different in different versions of Windows. I don't see a Windows version request in your code.
The window class is different in different versions of Windows. I don't see a Windows version request in your code.
Re: Opening/Activating current sourcefile folder, even in Windows 11
hWin is expected to be zero if there is no opened Explorer window titled with whatever folder you’re using. On subsequent calls — if the window is still opened of course — hWin will provide the handle for the opened window and move that window to the foreground.Denis wrote: Tue Jul 01, 2025 6:20 am […]
firstly - hwin is alway equal to 0, so test 'If hWin is never true.
secondly - I do prefer use API ShellExecute_() instead of RunProgram.
The darn code is so simple that I don’t understand why it won’t work on your machine, especially given that your system and mine are the same. On my machine, it works flawlessly and every time, so I’ll leave it at that. If you ever figure out why it fails on yours, let me know.
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: Opening/Activating current sourcefile folder, even in Windows 11
Try this one: viewtopic.php?t=7424SetForegroundWindow_
Keep in mind that the PureBasic option not only opens the folder, but also highlights the file within it.
Re: Opening/Activating current sourcefile folder, even in Windows 11
Again, what’s your point exactly?
The tool presented in this topic uses the code you’re referring to to bring the window to the forefront. So what’s there to change ? My code is not worded the same, but it calls upon the same API function.
Apparently, the whole thing fails for you, and you haven’t shown me why and where.
So, keep tinkering with it if you want. For me, it’s just perfect as it is.
The tool presented in this topic uses the code you’re referring to to bring the window to the forefront. So what’s there to change ? My code is not worded the same, but it calls upon the same API function.
Apparently, the whole thing fails for you, and you haven’t shown me why and where.
So, keep tinkering with it if you want. For me, it’s just perfect as it is.
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: Opening/Activating current sourcefile folder, even in Windows 11
On my computer it's not the case, hWin is always equal to 0, even with the correct folder is open in Explorer.Blue wrote: hWin is expected to be zero if there is no opened Explorer window titled with whatever folder you’re using. On subsequent calls — if the window is still opened of course — hWin will provide the handle for the opened window and move that window to the foreground.
bizarre ce comportement avec le même OS
OkBlue wrote: The darn code is so simple that I don’t understand why it won’t work on your machine, especially given that your system and mine are the same. On my machine, it works flawlessly and every time, so I’ll leave it at that. If you ever figure out why it fails on yours, let me know.
A+
Denis
Denis
Re: Opening/Activating current sourcefile folder, even in Windows 11
Merci pour le suivi intéressant.
Je demeure très intéressé et curieux de savoir pourquoi du code correct et fonctionnel sur un système ne fonctionne pas sur un système pratiquement identique. Bizarre de mystère qui m’intrigue.
Malheureux que ça me coûterait si cher de me déplacer jusque chez toi.
Je serais volontiers allé voir ça de plus près.
Je demeure très intéressé et curieux de savoir pourquoi du code correct et fonctionnel sur un système ne fonctionne pas sur un système pratiquement identique. Bizarre de mystère qui m’intrigue.
Malheureux que ça me coûterait si cher de me déplacer jusque chez toi.
Je serais volontiers allé voir ça de plus près.

PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: Opening/Activating current sourcefile folder, even in Windows 11
C'est pas trop le moment de venir en France (même si j'habite dans l'est vers la frontière suisse), les températures sont caniculaires!
A+
Denis
Denis
Re: Opening/Activating current sourcefile folder, even in Windows 11
Si j’en crois ce que raconte la télé, le mot « caniculaires » est faible pour décrire les températures qui vous tombent dessus. Vous vivez ces jours-ci dans un véritable four. Bon courage !
Va vite piquer une tête dans le Lac Léman. C’est beau, c’est frais, et c’est pas tellement loin de chez toi…
Va vite piquer une tête dans le Lac Léman. C’est beau, c’est frais, et c’est pas tellement loin de chez toi…
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: Opening/Activating current sourcefile folder, even in Windows 11
The SetForegroundWindow_ function gave me an error 9 times out of 10 in the programs I was using. The option I suggested gave me an error 0 times out of 10. Therefore, I permanently switched to the new function.
I googled the temperature in France - 38°, and in Russia-Ural it's 26°. Since the beginning of summer, the temperature has been normal, with a couple of days at 31° and then back to 22-26°.
Re: Opening/Activating current sourcefile folder, even in Windows 11
22-26, These are very good temperatures (I don't really like heat).AZJIO wrote: Tue Jul 01, 2025 3:51 pmI googled the temperature in France - 38°, and in Russia-Ural it's 26°. Since the beginning of summer, the temperature has been normal, with a couple of days at 31° and then back to 22-26°.
A+
Denis
Denis
Re: Opening/Activating current sourcefile folder, even in Windows 11
I think no one likes the heat. A couple of years ago, we had 36° heat all summer, all the grass was dry, and the fields were yellow. This summer, there's been a lot of rain, and even the cucumbers are growing, even though they need heat. The forecast for July is 23-26°.
Re: Opening/Activating current sourcefile folder, even in Windows 11
At temperatures like that, even people would turn yellow in Montreal (Canada) !AZJIO wrote: Tue Jul 01, 2025 4:10 pm […]
A couple of years ago, we had 36° heat all summer, all the grass was dry, and the fields were yellow.
[…]
The forecast for July is 23-26°.
So, where is that ? You mention Russia/Ural before, but that’s a mega large territory. Give me a precise point I can locate on Google Map or Google Earth. Maybe I can even see you ("Oh, look ! there’s a guy coding in PureBasic down there…")
PB Forums : Proof positive that 2 heads (or more...) are better than one 

Re: Opening/Activating current sourcefile folder, even in Windows 11
In west-France, there is small bled named "Bretagne". Do you know the "french riviera" ? Well, the "Bretagne" (english Britain), it is the "french delugia". Everybody in the hemisphere is feeling the high heats, warned by media to be careful, but in Britain, it rains standing between 18° and 22°.
We had the same recent maxima (28°, 30° and 33°) but it is far shorter than away actually. The nights are often near 17°.
I hope it will stay like that this summer. Not easy, as in 2022, when the nights were hot also...
From here, I think AZJIO lives a little bit further behind Saint-Malo (east part).
We had the same recent maxima (28°, 30° and 33°) but it is far shorter than away actually. The nights are often near 17°.
I hope it will stay like that this summer. Not easy, as in 2022, when the nights were hot also...
From here, I think AZJIO lives a little bit further behind Saint-Malo (east part).