Desktop icon refresh
Desktop icon refresh
Hi!
Simple question. Why does the first call of an OpenFileRequester() forces an icon refresh on desktop?
And how can i turn off this annoying flickering?
Regards,
Mischa
Simple question. Why does the first call of an OpenFileRequester() forces an icon refresh on desktop?
And how can i turn off this annoying flickering?
Regards,
Mischa
Re: Desktop icon refresh
Just your PC. Doesn't happen on both my PCs here.Mischa wrote:Why does the first call of an OpenFileRequester() forces an icon refresh on desktop?
Re: Desktop icon refresh
I'm on a updated Win10 highend corparate laptop [nothing funny installed] and also get a icon update on the desktop with just:BarryG wrote:Just your PC. Doesn't happen on both my PCs here.Mischa wrote:Why does the first call of an OpenFileRequester() forces an icon refresh on desktop?
Code: Select all
OpenFileRequester("", "", "", 0)
The best preparation for tomorrow is doing your best today.
Re: Desktop icon refresh
Thanks for reply.
Hm. Ok, this happens not only on my pc, how comforting.
The question is, if this is a windows 10 bug, and much more important,
if there is a workaround? Maybe some kind of temporary 'DisableIconRefresh' or anything?
I mean, this is a really, really annoying thing, in particular because my programm starts
with an OpenFileRequester without a desktop overlapping main window.
So every start produces heavy flickering.
By the way, the second call to the file requester produces NO flickering.
Can anybody help here?
Regards,
Mischa
Hm. Ok, this happens not only on my pc, how comforting.
The question is, if this is a windows 10 bug, and much more important,
if there is a workaround? Maybe some kind of temporary 'DisableIconRefresh' or anything?
I mean, this is a really, really annoying thing, in particular because my programm starts
with an OpenFileRequester without a desktop overlapping main window.
So every start produces heavy flickering.
By the way, the second call to the file requester produces NO flickering.
Can anybody help here?
Regards,
Mischa
Re: Desktop icon refresh
Does it still happen if you open a temp invisible window first? Like this:
Code: Select all
OpenWindow(0,200,200,200,200,"",#PB_Window_Invisible)
OpenFileRequester("", "", "", 0)
Re: Desktop icon refresh
This is not a bug, it is just the way that Windows OS works. Here are some explanations that i found with a quick google search that explain what is happening and how to possibly prevent it:
https://stackoverflow.com/questions/576 ... -is-opened
https://superuser.com/questions/1330350 ... ens-a-file
https://stackoverflow.com/questions/576 ... -is-opened
https://superuser.com/questions/1330350 ... ens-a-file
Re: Desktop icon refresh
Yes, it makes no difference.BarryG wrote:Does it still happen if you open a temp invisible window first? Like this:
Code: Select all
OpenWindow(0,200,200,200,200,"",#PB_Window_Invisible) OpenFileRequester("", "", "", 0)
I've testet this before.
Re: Desktop icon refresh
Thanks for the info.cas wrote:This is not a bug, it is just the way that Windows OS works. Here are some explanations that i found with a quick google search that explain what is happening and how to possibly prevent it:
https://stackoverflow.com/questions/576 ... -is-opened
https://superuser.com/questions/1330350 ... ens-a-file
It looks like i can do nothing inside my code to prevent the effect.
Re: Desktop icon refresh
That's weird cas, because it never happens to my desktops icons. I'm on Win 10 Pro with the latest updates.
BTW, I don't know if disabling the desktop redraw (temporarily) might help?
Note: You might need to change the hWnd to something else, like hWnd=GetDesktopWindow_() or a child window of the hWnd shown in my code.
BTW, a working brute-force fix is to copy a screenshot of your desktop to an image, then show that image in full-screen before opening the dialog. Can't see the icons refresh if the desktop isn't visible (taps forehead). Hehe.
BTW, I don't know if disabling the desktop redraw (temporarily) might help?
Code: Select all
hWnd=FindWindow_("Progman","Program Manager")
SendMessage_(hWnd,#WM_SETREDRAW,0,0) ; Disable.
OpenFileRequester("", "", "", 0)
SendMessage_(hWnd,#WM_SETREDRAW,1,0) ; Enable.
BTW, a working brute-force fix is to copy a screenshot of your desktop to an image, then show that image in full-screen before opening the dialog. Can't see the icons refresh if the desktop isn't visible (taps forehead). Hehe.
Re: Desktop icon refresh
Thanks for your ideas.BarryG wrote:That's weird cas, because it never happens to my desktops icons. I'm on Win 10 Pro with the latest updates.
BTW, I don't know if disabling the desktop redraw (temporarily) might help?
Note: You might need to change the hWnd to something else, like hWnd=GetDesktopWindow_() or a child window of the hWnd shown in my code.Code: Select all
hWnd=FindWindow_("Progman","Program Manager") SendMessage_(hWnd,#WM_SETREDRAW,0,0) ; Disable. OpenFileRequester("", "", "", 0) SendMessage_(hWnd,#WM_SETREDRAW,1,0) ; Enable.
BTW, a working brute-force fix is to copy a screenshot of your desktop to an image, then show that image in full-screen before opening the dialog. Can't see the icons refresh if the desktop isn't visible (taps forehead). Hehe.
Your code freezes full Desktop/App, had to kill purebasic in taskmanager.
The brute-force method is a little bit overkill, i think. You also have to close fake desktop inside thread, cause else you can't use the dialog.
No, no, i think i can live with this little flaw.
Regards,
Mischa
Re: Desktop icon refresh
Oops, yes, it will lock the desktop until the file dialog is closed. But you could use OpenFileRequester() in a thread to avoid that.Mischa wrote:Your code freezes full Desktop/App, had to kill purebasic in taskmanager
Well, it's a Windows issue, not a PureBasic bug.Mischa wrote:No, no, i think i can live with this little flaw