#889 closed Bug (No Bug)
GUISetIcon() stops working after FileOpenDialog()
| Reported by: | doudou | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.0.0 | Severity: | None |
| Keywords: | gui icon standard dialogs | Cc: |
Description
If you create a form AFTER FileOpenDialog() was called and SUCCESSFULLY returned a file name chosen by the user, all subsequent calls to GUISetIcon() have no effects (your form will assume the default AutoIt icon).
Calling FileOpenDialog() alone isn't enough to reproduce the bug: closing it with "Cancel" or "X" would not break GUISetIcon().
There's a test AU3 script attached, extract it along with both icons and run. Press "Show Dialog" first - you will see "Icon2.ico" as icon in the new form, then press "Browse For File", select a file and Press "Open", then press "Show Dialog" again and here we go - standard AutoIt icon.
Attachments (1)
Change History (4)
by , 17 years ago
comment:1 by , 17 years ago
OpenFileDialog() changes the Workdir to the directory the file was chaoosen from.
Try setting it back to de @Scriptdir right after the OpenFileDialog().
comment:2 by , 17 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
doc say
@WorkingDir is changed on successful return.
so no bug
comment:3 by , 17 years ago
Thanks for clarification. Connecting GUISetIcon's behavior to OpenFileDialog's change of working directory never came to my mind.

Bug show case