Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Floating Pane initialise is messy
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Floating Pane initialise is messy

 Post Reply Post Reply
Author
Message
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Topic: Floating Pane initialise is messy
    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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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...
 
 
 
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....
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.