Print Page | Close Window

Floating Pane initialise is messy

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=13285
Printed Date: 28 June 2024 at 5:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Floating Pane initialise is messy
Posted By: chrisABC
Subject: Floating Pane initialise is messy
Date 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



Replies:
Posted By: Aaron
Date Posted: 29 January 2009 at 2:12pm
Hi Chris,
  1. What do you mean by: This just looks messy?
  2. Just call: wndDockingPanes.FloatPane wndDockingPanes.FindPane(1), 100, 100, 200, 200

 



-------------
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....


Posted By: chrisABC
Date Posted: 29 January 2009 at 3:44pm
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


Posted By: chrisABC
Date Posted: 29 January 2009 at 7:01pm
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


Posted By: Aaron
Date Posted: 31 January 2009 at 2:43am
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....


Posted By: chrisABC
Date Posted: 02 February 2009 at 7:35am
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


Posted By: Aaron
Date Posted: 02 February 2009 at 2:43pm
Hi Chris,
 
I still can't reproduce what you mentioned... Maybe you could add something so it does...
 
https://forum.codejock.com/uploads/20090202_144241_TestFloatingPan.zip - uploads/20090202_144241_TestFloatingPan.zip
 
 


-------------
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....


Posted By: chrisABC
Date Posted: 02 February 2009 at 6:58pm
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net