473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Set Calling FORM Visible = False by CALLED FORM

126 100+
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
2 1162
dip_developer
648 Expert 512MB
Dim popupform As New PopupForm()
popupform.Show
me.Hide()
Sep 8 '10 #2
lenniekuah
126 100+
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

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

Similar topics

1
by: hanct | last post by:
"this" here refer to the form.. I type this.Visible=false;..but the form still can be seen! Worst still, the property editor has no Visible property to play with..why??is that a bug?? Wat the...
4
by: bnp | last post by:
Hi All, I am quite new the JavaScript. Basically I am a C++ programmer, but now I am working on JavaScript since last 5 days. I have a problem regarding the form validation. I have created a...
4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
5
by: DraguVaso | last post by:
Hi, I have a MDIForm with some MDIChilds. When the user clicks on the "x" in the upper right corner, I don't want the MDIChild to be closed, but the property Visible = False. So far no...
8
by: Hansen | last post by:
Hi I have a form with multiple labels and textboxes and listboxes that need to be made visible and not visible when buttons are clicked. Is there anyway of grouping them together so that I have...
4
by: Jimmy Stewart | last post by:
I have a calculated control "ContactInfo" on my form ... ="Attn: " & In the OnCurrent event for the form I have the following code... If Me.Contact Is Null Then Me.ContactInfo.Visible = False...
5
by: | last post by:
How can i make my form invisible public class Form1 : System.Windows.Forms.Form static void Main() {
8
by: Doc John | last post by:
I have an MDI container with a child Form which will be visible according to certain events. The problem is that when I set the property Visible to False and then back to True, the Form will be in...
2
by: Thelma Roslyn Lubkin | last post by:
If I close and reopen the form I lose its changes even if I set acSave to yes when closing. So I'm trying to keep the form open throughout but making it visible only when necessary. So how...
6
by: mjworks2009 | last post by:
I'm creatig a data base and in my front page i have 3 sub forms and 3 buttons for the sub forms to activate or not. 1. Subform1 is where all the current list of the patients being admitted for...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.