Opened on Apr 4, 2009 at 8:02:02 PM
Closed on Apr 5, 2009 at 4:54:28 PM
Last modified on Apr 8, 2009 at 11:33:56 PM
#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)
comment:1 by , on Apr 4, 2009 at 8:20:59 PM
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 , on Apr 5, 2009 at 4:54:28 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
doc say
@WorkingDir is changed on successful return.
so no bug
comment:3 by , on Apr 8, 2009 at 11:33:56 PM
Thanks for clarification. Connecting GUISetIcon's behavior to OpenFileDialog's change of working directory never came to my mind.

Bug show case