Difficulty in SETFOCUS - WINDOW.CONTROL.SETFOCUS

45 views
Skip to first unread message

valt...@valtecom.com.br

unread,
Mar 13, 2026, 12:32:19 PMMar 13
to Harbour Minigui
Good afternoon, esteemed friends,

I am facing a difficulty. I have a counter sales routine where product codes are entered, searched, or barcodes are read. In this window, there are two TEXTBOX fields: PRODUCT CODE and QUANTITY, which are pre-filled with the value 1 but can be changed as needed. When this routine is called, the FOCUS goes directly to the PRODUCT CODE and receives the code or reads the barcode. After confirming the product and quantity, the FOCUS returns to the PRODUCT CODE. After all products are selected, it is directed to the closing screen, where the payment method is chosen and the receipt is printed. The closing window is created over the window where the products are chosen, and when the closing is completed, the closing window closes, and the FOCUS should return to the PRODUCT CODE in the window executing a SETFOCUS. WINDOW.CONTROL.SETFOCUS, but this isn't happening every time. Sometimes it works normally several times and then it stops. For example, after three sales working normally, it simply stops focusing, and then you have to close the sales window and enter again.

I don't know if it makes a difference, but all the functions and windows are in the same PRG file, and I don't use an IDE to write the system; they are all handwritten.

I don't know if this detail interferes.

Thank you.

Valteçom
Uberaba MG Brazil
Reply all
Reply to author
Forward
0 new messages