Posts: 98
Threads: 46
Joined: Oct 2008
I have recently reinstalled XP OS on my machine. My earlier macro is showing abnormal behaviour.
In the problematic macro when a input box appears after 2 seconds the input box loses focus and focus is shifted to parent window and input box remains on screen inactive. Please suggest a solution.
Posts: 12,147
Threads: 143
Joined: Dec 2002
How this?
Function
inp2
;\Dialog_Editor
function# str&s [$text] [$caption] [$default] [x] [y]
;Input box. Similar to inp, but you can set position.
;Requires QM 2.1.8 or later.
;EXAMPLE
;str s
;if(!inp2(s "text" "caption" "" 0 -10)) end
;out s
str controls = "0 3 4"
str d0 st3 e4
d0=iif(len(caption) caption "QM Input")
st3=text
e4=default
if(!ShowDialog("inp2" 0 &controls 0 0 0 0 0 x y)) ret
s=e4
ret 1
;BEGIN DIALOG
;0 "" 0x90C80A4A 0x188 0 0 222 68 ""
;3 Static 0x54000000 0x0 6 6 216 12 ""
;4 Edit 0x54030080 0x200 6 24 214 14 ""
;1 Button 0x54030001 0x4 118 50 48 14 "OK"
;2 Button 0x54030000 0x4 170 50 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2010900 "" ""
Posts: 98
Threads: 46
Joined: Oct 2008
Right now I am not in office will check and let you know. Could you please suggest why the focus is shifted as the said macro contains input box twice. On first occurence it does not have any problem but on second occurence problem creeps in. Are there any thing which might be creating problem.
Posts: 12,147
Threads: 143
Joined: Dec 2002
Now I don't have an idea why it could happen.