Results 1 to 10 of 10

Thread: IDE vs EXE

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    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.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: IDE vs EXE

    Quote 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.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  5. #5

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: IDE vs EXE

    Quote 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.

  6. #6

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: IDE vs EXE

    I've even change the startup form. It's not longer the form itself but Sub Main.

    VB Code:
    1. Sub Main()
    2.     Dim fSudoku As frmSudoku
    3.    
    4.     Set fSudoku = New frmSudoku
    5.    
    6.     fSudoku.Show vbModal
    7.    
    8.     Set fSudoku = Nothing
    9. 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.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  8. #8

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    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.

  9. #9

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    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:
    1. Private iColumn As Integer
    2. Private iLine As Integer
    3. Private iGroup As Integer
    4. Private bValueSet As Boolean
    5.  
    6. Private n_txt As Long    'This was defined as object -> Now, soft referenced
    7. Private n_pct As Long   'This was defined as object -> Now, soft referenced
    8.  
    9. Private iValue As Integer
    10.  
    11. Private sPerColumn As String
    12. Private sPerLine As String
    13. Private sPerGroup As String
    14. 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.

  10. #10

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Cool Re: IDE vs EXE

    Found the solution. Got rid of MS Coolbar's OCX. My toolbars are fixed on the top of th usercontrol now
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width