Results 1 to 5 of 5

Thread: [RESOLVED] Still unloads form when i tell it to turn it visible=false? WHY?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Resolved [RESOLVED] Still unloads form when i tell it to turn it visible=false? WHY?

    First off, what does that mean at all? Modual? huh?????????? How is one of my forms a modual!? And how do i fix this? When i test it, it doesn't give me this error! Only when i make a .exe! Please help!

    Another thing, when i do the Form_Unload, i put

    form1.visible = false

    But why does it still unload it? How can i get it to not do this? Thanks
    Last edited by Gamemaster1494; Jun 1st, 2010 at 12:32 AM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Run time error 401 Cant show non modual form when modual form is displaed?

    1. Modal problem:
    When a form is shown as Modal, you can't show any other non-modal forms without closing the modal form.
    ie.Suppose there are 3 forms - Form1, Form2 and Form3.
    You call Form2 from Form1 like this:
    Code:
    Form2.Show vbModal
    And if you have coded in such a way that, you will show Form3 from Form1.
    Code:
    Form3.Show
    But note that, already you are displaying Form2 as modal to Form1. So, you can't show the Form3 from Form1. You have to close the first form, Form2 (modal form), inorder to show Form3.

    2. Unloading problem:
    Code:
    Private Sub Form_Unload(Cancel As Integer)
        Me.Hide     '~~~ Hides the form
        Cancel = 1  '~~~ Prevent the form from unloading
    End Sub
    Good luck...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Still unloads form when i tell it to turn it visible=false? WHY?

    But, i dont have code that has
    frmSysTray.show vbModal

    what does the vbModal do anyways?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Still unloads form when i tell it to turn it visible=false? WHY?

    I think this tutorial will shed some light on you: http://www.brainbell.com/tutors/Visu...r_Modeless.htm ...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Still unloads form when i tell it to turn it visible=false? WHY?

    Oh. Okay. xD Cool. thanks! (i see where the code came in for vbModal in my project).
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

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