Here's the current arrangement of my form: I have a form (Form1) with a frame (Fra1) on it. I'm using SetParent to insert a second form (Form2) into the frame.
Form1 > Fra1 >Form2
Now, I call TransparentBlt to transfer an image onto Form2. When I want to use ExtFloodFill to fill in a region of that picture, the function executes, returns TRUE, and I call Form2.Refresh, but no colors are updated on the screen. However, if I start Form2 by itself and try the TransparentBlt > ExtFloodFill > Form2.Refresh, everything works as expected.
Would there be a reason the setting the parent of the form is affecting the way it is colored/APIs affect it? If so, what are some possible solutions to this issue?
perhaps attach a small example project demonstrating what's happening (to save people having to crack open their API viewer)
Of what the Bushmobile asks, I deliver.
If you start the program using Form 2, you'll see what kind of results I've been expecting. If you start the program using Form 1, then you'll see what I'm getting.
Try the attached, basically I set the form to be a child form, and get rid of the Form2.WindowState = vbMaximized.
It doesn't give me the appearance I want, but it gives me the functionality I want. I think I understand why setting Form 2 to be a child form helped, but why would Form2.WindowState affect it?
Not sure about the WindowState. I figured that the Child thing alone would fix it, when I didn't I commented out the resize and then it worked just fine.
You should be able to size the form to fit your needs though...
Not sure about the WindowState. I figured that the Child thing alone would fix it, when I didn't I commented out the resize and then it worked just fine.
You should be able to size the form to fit your needs though...
You're right. I can resize it. It just gives the Frame/Form a 3D frame that I would prefer hiding or a flat frame, but I'm being a sticker for that part.
Strange about the WindowState...
[Edit]
You can put the Form2.WindowState = vbMaximized after the Form2.Show call and it will work, but you can't do it before that call.
[Edit2]
*blarg* Of course, I could just remove Form2.BorderStyle to give me the graphical representation I need...
Last edited by Fedhax; Sep 22nd, 2006 at 12:36 PM.
Reason: Additional Information