Dim dialogObject As Object = Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")
Sleep(0) 'important line. If 0 not enough make it 25 or so
ime.HideKeyboard 'need IME lib and it needs to be initialized
Wait For (dialogObject) Complete (Result As Int)
Dim dialogObject As Object = Dialog.ShowTemplate(SearchTemplate, "", "", "CANCEL")
Sleep(0) 'important line. If 0 not enough make it 25 or so
ime.HideKeyboard 'need IME lib and it needs to be initialized
Wait For (dialogObject) Complete (Result As Int)