Print Page | Close Window

bug in suitepro controls pushbutton

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9495
Printed Date: 16 November 2024 at 11:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: bug in suitepro controls pushbutton
Posted By: pragmatic_panoy
Subject: bug in suitepro controls pushbutton
Date Posted: 05 February 2008 at 3:31am
Hi,

I wanted to ask if there have been some bugs regarding the use of the PushButton in the SuitePro controls (ActiveX).  I am using the latest one, XtremeSuitePro v.11.2.2.

I have an array of two pushbuttons, I am calling the Unload Me statement on the first button element in the array and when the form unloads/exist, vb6 unexpectedly quits.

When compiled, the application does unload but an application error is still encountered.

In my form's unload event, I am releasing the form by setting it to nothing.

Ex: Set Form1 = Nothing

I think the error is caused by making a pushbutton control array and then releasing the instance of the form in its Unload event.

I have tried separating the two buttons, having a dedicated function for each button ( I have removed the control array), and have successfully prevented the error from appearing.

Just try this out:

1.) Drop two pushbuttons on your form, make them a control array.
     In my case, my index is zero-based.

2.) Assign an Unload Me statement on any index, either in 1 or 0.

3.) Release the form or set it to nothing in its Unload event.

4.) Watch the error when your form unloads and when focus returns back to the vb6 IDE or when your compiled application exits.


-------------
Programming is fun!



Replies:
Posted By: Oleg
Date Posted: 05 February 2008 at 1:01pm
Hello,
 
Please upload sample. I can't reproduce it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: pragmatic_panoy
Date Posted: 06 February 2008 at 2:52am
This is the vb6 project file.

I have service pack 6 on it, running windows XP SP 2.

I have previously used SuitePro v11.2.1, and later upgraded to v11.2.2.
I noticed that there were side by side installation, allowing me to use the v11.2.1 version and the v11.2.2 version.  Am I correct on this?

I later than uninstalled both versions, and re-installed the newest version (v11.2.2).

Thanks and god bless.

File:
uploads/20080206_025117_test.rar - uploads/20080206_025117_test.rar

-------------
Programming is fun!


Posted By: Oleg
Date Posted: 06 February 2008 at 9:20am
Hi,
 
Indeed :( Error comes from Vb6 code, looks like some conflict with MFC library.
 
Do you really need
 Set Form1 = Nothing
line in your application in Unload event? If I comment it, problem gone.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: pragmatic_panoy
Date Posted: 06 February 2008 at 8:38pm
Hi,

Yes sir, by commenting the code in the unload event, the error will not occur.  By practice, I am always using the

Set Form1= Nothing

I think it helps if you are using public variables that are declared within the form level.  I have seen the difference by using that statement.  It does help if you are using public variables only.  It prevents the public variables from retaining their previous values.

I will try to attach a sample program for this.

How about you sir?  Have you experience this or what is your take on this approach?

Another way to prevent the error is to try separating the buttons.  This will also work, so far I have not yet encountered any error at all.  I have one button for every function.  I just try to stay away from making them a control array.

Many thanks.

uploads/20080206_203806_public_variable.rar - uploads/20080206_203806_public_variable.rar



-------------
Programming is fun!


Posted By: Oleg
Date Posted: 07 February 2008 at 12:56am
Hi,
 
Thanks a lot for samples. I see now.
Please use separate buttons to avoid this problem.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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