By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,969 Members | 1,705 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,969 IT Pros & Developers. It's quick & easy.

Set Calling FORM Visible = False by CALLED FORM

100+
P: 126
Hi Good Guys,
I have an interesting problem and I need your help.
Please Help me.

Requested were made by Businese Analyst to set the few Main FORMs VISIBLE PROPERTY TO FALSE when the POPUP FORM is loaded.
Expand|Select|Wrap|Line Numbers
  1.  MAIN FORM NAME                  POPUP FORM 
  2. FRMSALES                         FRMPOPUPCUSTOMER
  3. FRMTRANS                         FRMPOPUPCUSTOMER
  4. FRMSHIPPER                       FRMPOPUPCUSTOMER
  5. FRMINVOICE                       FRMPOPUPCUSTOMER
  6.  

When the MAIN FORM loads the POPUP FORM,
on the FRMPOPUPCUSTOMER-FORMLOAD even, it has to set the MAIN FORM Visible to False.

When FRMPOPUPCUSTOMER FORM IS UNLOAD it has to set the MAIN FORM Visible = TRUE.

How to the coding is to ensure that different MAIN FORM when loaded FRMPOPUPCUSTOMER it will turn the MAIN FORM Visible to FALSE.
Sep 6 '10 #1
Share this Question
Share on Google+
2 Replies


dip_developer
Expert 100+
P: 648
Dim popupform As New PopupForm()
popupform.Show
me.Hide()
Sep 8 '10 #2

100+
P: 126
Hullo Good Guys,
Thanks to all of you for your share of sample codings with me. I have modify to suit my application and environment. It's now Working very well.

Here are the coding that I want to share with other Newbies who may have similar problems and need helps.

Expand|Select|Wrap|Line Numbers
  1.  
  2. 'This FORM called FrmCustMaint
  3. Option Explicit On
  4.  
  5. Public Class FrmMain
  6.  
  7. Private Sub btnCustomer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCustomer.Click
  8.  
  9.         Dim FM As New FrmCustMaint
  10.         Dim callFrm As System.Windows.Forms.Form = Me
  11.  
  12.         FM.PropCallForm = callFrm
  13.         FM.ShowDialog()
  14.         FM = Nothing
  15.  End Sub
  16. End class
  17.  
  18. ---------------------------------------------------
  19. Option Explicit On
  20.  
  21. Public Class FrmCustMaint
  22.  
  23.     Private FrmCall As System.Windows.Forms.Form
  24.  
  25.  Private Sub FrmCustMaint_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
  26.         Handles MyBase.Load   
  27.         FrmCall.Visible = False
  28. End sub
  29.  
  30.  Public Property PropCallForm()
  31.         Get
  32.             Return FrmCall
  33.         End Get
  34.         Set(ByVal value)
  35.             FrmCall = value
  36.         End Set
  37.   End Property
  38. End Class
  39.  
Sep 8 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.