Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / field positioning

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. field positioning
#1161
Posted by: 2004-02-08 08:51:07
i use a screen that has one field that i enter data into and a button the when pressed will save this data and then i go to another screen.  when i come back to the screen with one field and one button the location of activity is still on the button.  since i use this screen alot i would like to have the position at the beginning of the screen each time i visit it.  how do i do this?  thanks.
Message2. Re: field positioning
#1162
Posted by: 2004-02-08 22:44:39
add this to the start of your program;

Declare Function SetFocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long

then when the button is pressed use

SetFocus(object)

where object is the thing you want to set the focus to.

One point; if you set focus to a Qedit any text in that QEdit will be selected automatically, it won't be removed, so you might want to clear its contents too.
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥490.00 ·
 
 
¥307.00 ·
 
 
¥288.00 ·
 
 
¥900.00 ·
 
 
¥790.00 ·
 
 
¥487.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0