Seems to be working correctly and as expected for all language versions of Windows.
Code: Select all
Procedure ColorRequesterWait(title)
title$=PeekS(title)
prev=GetForegroundWindow_()
Repeat
Sleep_(1)
hWnd=GetForegroundWindow_()
If hWnd<>0 And hWnd<>prev
c$=Space(999)
GetClassName_(hWnd,c$,990)
If c$="#32770" ; Dialog class.
SetWindowText_(hWnd,title$)
found=1
EndIf
EndIf
Until found
EndProcedure
Procedure ColorRequesterWithTitle(title$,defaultcolor=-1)
CreateThread(@ColorRequesterWait(),@title$)
ProcedureReturn ColorRequester(defaultcolor)
EndProcedure
c=ColorRequesterWithTitle("Pick a color!",#Red)
Debug "Color picked: "+c