Yuri,
The KEYBOARD command only puts data into keyboard buffer. It doesn't execute or process it. IOW, '.TopItemid=15' is executed AFTER the KEYBOARD command but before VFP processes keyboard buffer.
>Ok, wait window is waiting. Then consider another example:
>
>Let us suppose I have a multiselect listbox on the form and I want to select all and then make a topindex, say to 15:
>
>
>with thisform.List1
> .setfocus
> .Selected(1) = .t.
> KEYBOARD '{SHIFT+END}{SHIFT+HOME}'
>
> .TopItemid=15
>....
>
>
>
>Whether it is not obvious that .TopItemid=15 should go AFTER all items are selected with the keyboard? But it is not, it goes first! (Yes, I know there is another way to select all; it is here just to play with the keyboard command).
>So how to force here the .TopItemid=15 go after keyboard command?
>
--sb--