|
-
Dec 24th, 2005, 01:53 PM
#1
Thread Starter
Need-a-life Member
IDE vs EXE
Can anybody explain me why the difference between this two logs:
IDE
Board UserControl_Paint
ctlSudoku TB_ButtonClick
Board UserControl_Terminate
ctlSudoku UserControl_Terminate
EXE
Board UserControl_Paint
ctlSudoku TB_ButtonClick
Board UserControl_Paint
The first one is the log for the project being run on the IDE. The second one is the log for the same project being run the EXE. I have to correct this, because if the Terminate events are not fired the objects are not released and the program raises an awful error when it should close itself smoothly. Any ideas how to fix this? TIA,
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Dec 24th, 2005, 01:55 PM
#2
Re: IDE vs EXE
Instead of _Terminate couldnt you use _QueryUnload?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 24th, 2005, 02:01 PM
#3
Thread Starter
Need-a-life Member
Re: IDE vs EXE
 Originally Posted by RobDog888
Instead of _Terminate couldnt you use _QueryUnload?
There are usercontrols and/or classes. Shouldn't these events fire when the form it contains the usercontrol is unloaded?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Dec 24th, 2005, 02:10 PM
#4
Re: IDE vs EXE
If the form that contains the UC does not unload then the UC will remain in memory and never fire the _Terminate event. Perhaps that may be part of the reason.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 24th, 2005, 02:26 PM
#5
Thread Starter
Need-a-life Member
Re: IDE vs EXE
 Originally Posted by RobDog888
If the form that contains the UC does not unload then the UC will remain in memory and never fire the _Terminate event. Perhaps that may be part of the reason.
But I'm doing "Unload Me", so the UC should be terminated.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Dec 24th, 2005, 02:33 PM
#6
Thread Starter
Need-a-life Member
Re: IDE vs EXE
I've even change the startup form. It's not longer the form itself but Sub Main.
VB Code:
Sub Main()
Dim fSudoku As frmSudoku
Set fSudoku = New frmSudoku
fSudoku.Show vbModal
Set fSudoku = Nothing
End Sub
But the terminate events are not fired yet.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Dec 24th, 2005, 02:34 PM
#7
Re: IDE vs EXE
Should be, but if you have any referenced objects that are not unloaded or destroyed it can cause the form to atay loaded. Like when doing Office automation from vb6. If you dont close and destroy Office apps/objects it will cause your program or the Office app to remain running.
What do you have that may be causing the form to remain in memory?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 24th, 2005, 03:44 PM
#8
Thread Starter
Need-a-life Member
Re: IDE vs EXE
The form is not held in memory. Im printing a list of loaded forms before and after unload them... and none gets printed once it's finish this task. However, the UC's control (which is held on another UC) remains in memory.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Dec 25th, 2005, 08:07 PM
#9
Thread Starter
Need-a-life Member
Re: IDE vs EXE
I've found this article: http://www.developerfusion.co.uk/show/2929/2/ Which I thought it would be the answer for my problem. However, after implementing that solution, I'm still stuck. I have a little doubt with the collection. The items I'm adding to a collection are:
VB Code:
Private iColumn As Integer
Private iLine As Integer
Private iGroup As Integer
Private bValueSet As Boolean
Private n_txt As Long 'This was defined as object -> Now, soft referenced
Private n_pct As Long 'This was defined as object -> Now, soft referenced
Private iValue As Integer
Private sPerColumn As String
Private sPerLine As String
Private sPerGroup As String
Private sMissing As String
Which are member variables which can be accessed through public properties. The question is, should I add a soft reference into the collection or can I just add the object itself?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Dec 28th, 2005, 07:20 AM
#10
Thread Starter
Need-a-life Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|