>>>>Also, one thing you might do after your Draw() code is add this:
>>
DECLARE INTEGER InvalidateRect IN WIN32API INTEGER hwnd, INTEGER ignore1, INTEGER ignore2
>>InvalidateRect(thisForm.hwnd, 0, 0)
>>*InvalidateRect(thisForm.hwnd, 0, 1)
>>>>
>>>>That will force the window to repaint itself at the Windows OS level, and may help it "go away".
>>>
>>>The Themes = .F. had no effect.
>>>But InvalidateRect() does work perfectly, I don't even need to call THISFORM.Draw().
>>>So I created a method THISFORM.Redraw() and put the API call in there.
>>>Thank you!
>>
>>
>>You're welcome. I updated the note above about the ignore1 and ignore2 values. The ignore2 parameter is actually "redrawBackground?"
>
>PMFJI, but I was wondering if the above code (using InvalidateRect) would work for a following case:
>I have a form that processes many items (actually printing report for each item). So I wanted to show the ID of the item being processed in a textbox on the form. I have code:
>
>thisform.Draw
>DOEVENTS
>
>in the DO WHILE loop where the items are being processed. It never actually showed the items (at least I never could see them). But I left the code there and since the customers didn't complain, I forgot about it. If I replace my thisform.Draw with the above API function call, do you think it will work showing the items being processed? And if yes, would it make sense to call the
>
>DECLARE INTEGER InvalidateRect IN WIN32API INTEGER ...
>
>only once at the top of the procedure and then only call Invalidate() after every record ID is set in the textbox on the form?
>Thank you.
For the OFUG message this month, I'm introducing a remote process management feature built atop the GuiThread library I released a while back (
https://github.com/RickCHodgin/guithread). There will be facilities in that release which allow you to spawn a generic remote process and send it commands to execute and general purpose messages for custom uses, as well as send a response back.
By using that library, you could create a window without a border or title bar which presents itself physically atop the form in your main thread app, and then update it in the remote thread, thereby making it appears as though the one application is doing real-time updates. Using such a system you can do anything a regular VFP FoxPro form can do, making some really exciting possibilities.
That online meeting is the 18th. I plan to have the changes done by then.