Opened 15 years ago

Closed 15 years ago

#1145 closed Bug (Fixed)

GUICtrlCreateTreeView() steals application focus

Reported by: tayou fabrice Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc: tayoufabrice tayoufabrice@…

Description (last modified by Valik)

The following code steals focus from the active application even though the GUI isn't visible immediately:

#cs ----------------------------------------------------------------------------

 AutoIt Version:
 Author:         TayouFabrice

After creating a GUICtrlTreeView the GUI take focus it is a problem for an app
whish start on Background and dosn't want ot get focus before being visible
i have put sleep ( ) at line 21 to shaw that gui is not visible but has allready
focus. This problem is serious
#ce ----------------------------------------------------------------------------

#include <GUIConstantsEx.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 215)
ConsoleWrite ( "> GUI is created but have no focus"&@CRLF)
Sleep ( 6000)
$TreeView1 = GUICtrlCreateTreeView(96, 32, 345, 273)
ConsoleWrite ( "> GUI has already focus"&@CRLF)
Sleep ( 6000)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg


Attachments (1)

Test.au3 (1.0 KB) - added by tayou fabrice 15 years ago.
This file demontrate my Problem

Download all attachments as: .zip

Change History (5)

comment:1 follow-up: Changed 15 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

Go read WikiStart and stop wasting people's time, please. Not only did you fail to provide an example so I could show you where the problem in your code lies, you shouldn't have even been posting here in the first place.

Changed 15 years ago by tayou fabrice

This file demontrate my Problem

comment:2 in reply to: ↑ 1 Changed 15 years ago by anonymous

i have attached the file

comment:3 Changed 15 years ago by Valik

  • Description modified (diff)
  • Resolution No Bug deleted
  • Status changed from closed to reopened
  • Summary changed from activate the windows to GUICtrlCreateTreeView() steals application focus
  • Version changed from to

Your ticket describes activation, your example describes focus and demonstrates focus. It does demonstrate the problem for me on 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.

comment:4 Changed 15 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.