Floating Pane initialise is messy |
Post Reply |
Author | |
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
Posted: 29 January 2009 at 1:49pm |
I am creating a small Floating Pane with a Form attached. It all works OK but when the Pane first appears it is a frame around a black area. After that the Form appears in the frame. This just looks messy.
How can I make it look prettier? Also, FloatingPane always appears top left of my screen. How can I make it initially appear in different position? |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Chris,
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
When I create the floating pane, I get flicker at top left of screen. Then frame (outside edge of pane) appears in the specified location (eg 100, 100), but the centre of this area is all black. So I've got a black rectangle on the screen. Then it flickers again and the form appears in the pane. So it looks messy.
I have tried many things to try and stop this. eg. try and create pane and set it not visible, then attach Form handle, then make it visible etc. But no improvement. Here is roughly what I am doing: Set myForm = New TheForm W = myForm.Width H = myForm.Height Set myPane = DPM.CreatePane(Id, W, H, 0, Nothing) myPane.Handle = myForm.hWnd myPane.Floating = True |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
Additional Information.
The same thing happens even if I do not attach a Form to the Pane. So I get the flickering and black centre even if I just use Set TmpFloatPane = DPM.CreatePane(......) TmpFloatPane.Floating = True If I only have the first line (.CreatePane(... ) the pane appears instantly with no flickering. But when I make the Pane float, I get the problem. Is there some property I need to set? |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Chris,
I can't reproduce it Can you upload test project?
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
I have done more experiments. Some of my problem was that I had a DoEvents loop waiting for the floating form to become visible.
(Did you know that this happens....... myForm.show debug.print myForm.visible (prints True) myPane.Handle = myForm.hWnd debug.print myForm.visible (print False) wait for a while (eg 50 mSec) debug.print myForm.visible (prints True) ) My DoEvents while waiting caused the black background effect. So that is now fixed. But I still have problem that floating form appears on screen, and then moves to final Pane position/size. This causes flickering effect. I can minimise this by trying to preset Pane size and position to match the Form. ------------------------------------------------------------ Can you get a Floating Pane to appear in the middle of the screen with its attached Form, instantly? (ie. without flicker?). If yes, please what code do you use? |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Chris,
I still can't reproduce what you mentioned... Maybe you could add something so it does...
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
Thank you Aaron for taking trouble to investigatae.
To make your sample same as what I am doing, just take all the code in your Form_Load event and move it to the Command1_Click event. That is, I only create the Form1 when I need to show it in the Pane. (because I will be displaying many different Forms in this same Pane). So when I click the Command button, the Form1 is loaded and then the Pane created and then the Form1 attached to the Pane, and the Pane floated and moved to the location I require. When I run this code on my PC there is no problem. The Pane and Form seems to appear almost instantly on screen with no "flicker". So I guess that my real app is slower because of many forms and many controls, and this causes the appearance on screen to be slower. My code is very similar to your example. So I conclude there is no better way to create/display a floating Pane. Thank you again for all your comments. |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |