Changes between Initial Version and Version 3 of Ticket #1145


Ignore:
Timestamp:
08/21/09 19:39:34 (15 years ago)
Author:
Valik
Comment:

Your ticket describes activation, your example describes focus and demonstrates focus. It does demonstrate the problem for me on 3.3.1.1. Fixing the ticket to describe the problem correctly. In the future, please submit carefully written and well thought out issues with examples to avoid further hassle.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1145

    • Property Status changed from new to reopened
    • Property Version changed from 3.3.0.0 to 3.3.1.1
    • Property Summary changed from activate the windows to GUICtrlCreateTreeView() steals application focus
  • Ticket #1145 – Description

    initial v3  
    1 if i use GUICtrlCreateTreeView my app start and get activate before become visible; it is a problem to start without being activated.
     1The following code steals focus from the active application even though the GUI isn't visible immediately:
     2{{{
     3#cs ----------------------------------------------------------------------------
     4
     5 AutoIt Version: 3.3.0.0
     6 Author:         TayouFabrice
     7
     8After creating a GUICtrlTreeView the GUI take focus it is a problem for an app
     9whish start on Background and dosn't want ot get focus before being visible
     10i have put sleep ( ) at line 21 to shaw that gui is not visible but has allready
     11focus. This problem is serious
     12#ce ----------------------------------------------------------------------------
     13
     14
     15#include <GUIConstantsEx.au3>
     16#include <TreeViewConstants.au3>
     17#include <WindowsConstants.au3>
     18#Region ### START Koda GUI section ### Form=
     19$Form1 = GUICreate("Form1", 633, 447, 192, 215)
     20ConsoleWrite ( "> GUI is created but have no focus"&@CRLF)
     21Sleep ( 6000)
     22$TreeView1 = GUICtrlCreateTreeView(96, 32, 345, 273)
     23ConsoleWrite ( "> GUI has already focus"&@CRLF)
     24Sleep ( 6000)
     25GUISetState(@SW_SHOW)
     26#EndRegion ### END Koda GUI section ###
     27
     28While 1
     29        $nMsg = GUIGetMsg()
     30        Switch $nMsg
     31                Case $GUI_EVENT_CLOSE
     32                        Exit
     33
     34        EndSwitch
     35WEnd
     36}}}