meravkn
asked on
Form deletes painted picture, and getfocus problem
Hi,
I have an application with MDI form, and a few child forms. I have a form "frmPicturePreview", in which I can call another form: "frmAddText" to add text to the picture preview form. The picture is being painted into frmPicturePreview with the paintPicture method. The problem is that when I call the frmAddText, it behaves like an erasure, in a way that if it's over the frmPicturePreview it erases the picture. Weird, huh? Does anyone know about this problem (bug?) and how to fix it?
My other problem is the "GetFocus" method. It looks like just clicking the form title doesn't fire this method. Or even clicking on the form itself. How can I know if the form is the active one? I tried to use MDIForm1.ActiveForm, but it kept telling me that I have an error.
Thanks a lot!
I have an application with MDI form, and a few child forms. I have a form "frmPicturePreview", in which I can call another form: "frmAddText" to add text to the picture preview form. The picture is being painted into frmPicturePreview with the paintPicture method. The problem is that when I call the frmAddText, it behaves like an erasure, in a way that if it's over the frmPicturePreview it erases the picture. Weird, huh? Does anyone know about this problem (bug?) and how to fix it?
My other problem is the "GetFocus" method. It looks like just clicking the form title doesn't fire this method. Or even clicking on the form itself. How can I know if the form is the active one? I tried to use MDIForm1.ActiveForm, but it kept telling me that I have an error.
Thanks a lot!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much, I requested to split the points between two of you.
I have reduced the points in half. Now you can accept one of the experts comment as an answer and post another question in this topic area for the other for the other 25 points.
Thank you
Computer101
Community Support Moderator
Thank you
Computer101
Community Support Moderator
in form load:
frmPicturePreview.AutoRedr
or in the Paint event for your form, put in a call to the code that does the paintpicture.