Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - bug in suitepro controls pushbutton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

bug in suitepro controls pushbutton

 Post Reply Post Reply
Author
Message
pragmatic_panoy View Drop Down
Newbie
Newbie
Avatar

Joined: 06 December 2007
Location: Philippines
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote pragmatic_panoy Quote  Post ReplyReply Direct Link To This Post Topic: bug in suitepro controls pushbutton
    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!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2008 at 1:01pm
Hello,
 
Please upload sample. I can't reproduce it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
pragmatic_panoy View Drop Down
Newbie
Newbie
Avatar

Joined: 06 December 2007
Location: Philippines
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote pragmatic_panoy Quote  Post ReplyReply Direct Link To This Post 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
Programming is fun!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
pragmatic_panoy View Drop Down
Newbie
Newbie
Avatar

Joined: 06 December 2007
Location: Philippines
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote pragmatic_panoy Quote  Post ReplyReply Direct Link To This Post 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

Programming is fun!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.