bug in suitepro controls pushbutton |
Post Reply |
Author | |
pragmatic_panoy
Newbie Joined: 06 December 2007 Location: Philippines Status: Offline Points: 8 |
Post Options
Thanks(0)
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!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Please upload sample. I can't reproduce it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
pragmatic_panoy
Newbie Joined: 06 December 2007 Location: Philippines Status: Offline Points: 8 |
Post Options
Thanks(0)
|
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 |
|
Programming is fun!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
pragmatic_panoy
Newbie Joined: 06 December 2007 Location: Philippines Status: Offline Points: 8 |
Post Options
Thanks(0)
|
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 |
|
Programming is fun!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Thanks a lot for samples. I see now.
Please use separate buttons to avoid this problem.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |