Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

@SW_SHOW without Focus


  • Please log in to reply
3 replies to this topic

#1 SlowCoder74

SlowCoder74

    Prodigy

  • Active Members
  • PipPipPip
  • 167 posts

Posted 27 November 2012 - 04:30 PM

#Region ### START Koda GUI section ### Form= $frmStatePopup = GUICreate("", 227, 42, 1, 1,$WS_POPUPWINDOW,$WS_EX_TOPMOST,WinGetHandle(AutoItWinGetTitle())) ;$frmStatePopup = GUICreate("", 227, 42, 1, 1,$WS_POPUPWINDOW,Default,WinGetHandle(AutoItWinGetTitle())) GUISetBkColor(0x800000) $lblStateNotify = GUICtrlCreateLabel("TEST", 8, 8, 212, 28) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_HIDE) #EndRegion ### END Koda GUI section ###


Whenever I use GUISetState(@SW_SHOW,$frmStatePopup) to popup the window, it steals focus. This is just a popup window, and I don't want focus transferred from the user's current window.

I could go the route of getting the current window's hwnd, then showing the popup, then quickly refocussing on the user's window again.

... But is there a better way?







#2 IanN1990

IanN1990

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 532 posts

Posted 27 November 2012 - 05:08 PM

@SW_SHOWNOACTIVATE
  • SlowCoder74 likes this

#3 SlowCoder74

SlowCoder74

    Prodigy

  • Active Members
  • PipPipPip
  • 167 posts

Posted 27 November 2012 - 05:16 PM

@SW_SHOWNOACTIVATE

I think that is exactly what I needed. Thanks!

#4 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,170 posts

Posted 28 November 2012 - 12:50 AM

Have you looked at Melba's signature for the Toast UDF?

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users