Here is my problem.  I'm asking this again because I still do not 
have a solution.  I have an application that has the ability to run a 
user generated program that is part of the application.  At any step 
in the program, it is possible to have a popup form, for errors, 
input, etc.  The problem is that returning from the popup is not 
guaranteed that the background will be restored (in every application 
I have tried it does but it is not guaranteed).  

The real problem is how to refresh the display.  I know that I must 
handle the frmUpdateForm event.  But I'm looking at an efficient way 
of refreshing the display.  When I use FrmDrawForm, it works but my 
form blinks.  It seems to erase first.  If I just redraw the fields, 
and buttons, it does not blink.  But I have another problem.

The other problem is that the app has bitmaps.   Someone suggested 
saving and redrawing the bitmaps but doing that would require saving 
the bitmap at any point which might cause a popup (which can be 
anywhere) and would really slow down operation.  The bitmap must 
already be saved somewhere because FrmDrawForm refreshes it ok.  So 
there must be a way to refresh (redraw) a bitmap without having to 
save it as an independent step.

How does one refresh a bitmap without having to save it first?

And back to my original problem, how does one use FrmDrawForm without 
erasing the screen first.  I have tried changing the 2nd parameter of 
FrmUpdateForm to other values and it does not make a difference.

Thanks



> >> > I am handling the frmUpdateEvent to redraw my form after
> >> > returning from a dialog form.  My problem is the form now blinks
> >> > when it is erased and then redrawn.
> >> 
> >> if you don't erase and redraw the whole form in your frmUpdateEvent
> >> branch, it shouldn't happen - at least it doesn't with me. normally
> >> you only have to do that when responding to update code zero.
> >
> >I'm not sure what is going on but when I use FrmDrawForm in my 
> >frmUpdate handler my fields blink.  First the come back blank, then
> >they are drawn, then they are blank again, then redrawn again.
> >
> >If I use FldDrawForm and CtlDrawControl for each field and control
> >instead of FrmDrawForm, they do not blink.  I have tried various
> >codes for FrmUpdateForm without any change.
> >
> >The question I have with this method is that I also have a bitmap
> >that also needs to be redrawn and I'm not sure how to force a bitmap
> >to be drawn.  Currently I let the form take care of that but how
> >would I specify and force the redrawing of the bitmap?
> >
> The only way I can think offhand of doing that is to save the
> bitmap and redraw it.  If it were drawn in it's own separate window,
> it might be a little cleaner to refresh it.  You can use BmpDelete and
> BmpCreate, calling BmpGetBits & BmpBitsSize first to get the data bits
> from it, and BmpGetColorTable & BmpColortableSize and BmpSize to get
> the colortable and sizes.  (Or maybe use ColorTableEntries macro)
> Store that information, delete the bitmap, then recreate it with that
> information.  (I don't know if this will work, I haven't really tried
> it...I usually just delete the bitmap object, then redraw it from a
> resource file, and not on the fly) -Rus
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to