Print Page | Close Window

Another VB 2005 bug?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5668
Printed Date: 20 June 2025 at 5:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Another VB 2005 bug?
Posted By: Majek
Subject: Another VB 2005 bug?
Date Posted: 02 December 2006 at 6:45pm
For some reason I can't use the Resize event on CommandBars in VB 2005, perhaps i'm doing something wrong?
 
(CB = CommandBars, PL = ListView)
 
    Private Sub CB_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles CB.Resize
            Dim left, top, right, bottom As Integer
            CB.GetClientRect(left, top, right, bottom)
            PL.SetBounds(left, top, right - left, bottom - top)
    End Sub
 
That works fine in VB 2003, but in 2005 i receive this error:
 
Method 'GetClientRect' cannot be invoked at this time.
 
Is this another 200 bug or is there a way to fix it?



Replies:
Posted By: Majek
Date Posted: 02 December 2006 at 6:46pm
2005*


Posted By: Majek
Date Posted: 02 December 2006 at 6:54pm
Wow sorry I feel dumb now  It was CB_ResizeEvent not CB_Resize



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