Possible Duplicate:
Programmatically move the cursor to a desired location on the screen
I made a Button with the name of "Click",if we have to click on Button,CreateDialog will appear with two InputFields and one Button.
I want to focus the cursor in the first InputField,whenever we have to press on Button(Click)
first = Null;
second = Null;
Button["Click",
(*Button Action Start from here*)
(CreateDialog[Grid[{{Style["first", Bold],InputField[Dynamic[first]]},
{Style["Second", Bold],InputField[Dynamic[second]]},
{Button["Ok",DialogReturn[]],SpanFromLeft}}]]
)(*Button Action closed here*),
ImageSize -> {180, 60}
]