Results 1 to 15 of 15

Thread: Form2 dosn`t actually close!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Form2 dosn`t actually close!

    I made Simple 2 Forms
    Form1 with Button1_Click = Form2.Show()
    Form2 with Pictrebox1 image from resource normal without code
    when I Compile it to exe
    everytime I open Form2 and close it Memory increasing!
    really I have many problem like this! Memory increasing more and more !
    Name:  07-21-14_23-22-50.jpg
Views: 332
Size:  27.6 KB
    Last edited by Noob13; Jul 21st, 2014 at 03:48 PM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    I found this release all the memory
    But really should I add it to all my project forms !!

  3. #3
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: Form2 dosn`t actually close!

    Do you not think it help if you showed us how you closed the form2?

  4. #4
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: Form2 dosn`t actually close!

    AND how you opened Form2 as well...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    normal
    open :
    Form2.show

    Close :
    Close ControlBox

  6. #6
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: Form2 dosn`t actually close!

    That is not all your code.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    please take a look on image I uploaded
    picturebox from internal resource
    there is no code

  8. #8
    Member vava456's Avatar
    Join Date
    Jul 2014
    Posts
    45

    Re: Form2 dosn`t actually close!

    In my opinion you should Run Diagnostics to Check Your System for Memory Problems : Click Start, type mdsched.exe in the Search box, and then press Enter.
    Then , choose whether to restart the computer and run the tool immediately or schedule the tool to run at the next restart.

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Form2 dosn`t actually close!

    After closing Form2, if you minimise Form1 does the memory drop back?

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    vava456
    No everthng is OK
    btw 8GB-i5-3210 Win8.1x64

    jmcilhinney
    Nope!

  11. #11
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Form2 dosn`t actually close!

    How are you setting the Image of the PictureBox? Is it in the designer or from My.Resources in code?

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    its designer

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    My Simple
    Attached Files Attached Files

  14. #14
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,398

    Re: Form2 dosn`t actually close!

    So when we look at your code that you have already posted the same question on, i asked "Do you not think it help if you showed us how you closed the form2?" you replied "Form2.show" now this is clearly not the case. Not to mention you have form1 designer code chucked under load. WHY? I have already told you img.dispose never gets called yet you have ignored it. I highly doubt you wrote any of that.

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Nov 2010
    Posts
    159

    Re: Form2 dosn`t actually close!

    This is my replay
    normal
    open :
    Form2.show

    Close :
    Close ControlBox
    your replay not ignored
    I told you:
    I don`t Know if it right use it like this at this place
    I just add for test
    I still waiting for answer for my questions !!
    what is the best way for Close everything in right way ?

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