Click here to Skip to main content
15,881,760 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have multiple project in a solution

StartUpProject references to ProjectSub1 and ProjectSub2.

I want to open the main form in ProjectSub1 and hide the form in StartUpProject.

This works fine using:
VB
Hide()
Dim frm As New ProjectSub1.START_MainMenu()
frm.WindowState = FormWindowState.Maximized
frm.Show()


Now I hide the StartScreen in StartUpProject
I need to show it again when I close the form ProjectSub1.START_MainMenu()

StartUpProject.StartScreen.Show() does not work because the you cannot reference back from ProjectSub1 to StartUpProject.

Basically I want to show a form in a different project and while showing, hide the previous form, when I finished I want to return to that form by showing it again

How do I do this???
Posted
Updated 3-Nov-15 4:39am
v2
Comments
Sergey Alexandrovich Kryukov 3-Nov-15 9:43am    
During "runtime", there are no "projects". The only essential thing is: do you want to communicate this way between different processes, or this is the same process? You need to fix your whole understanding of things: what is the project, solution, application, process, assembly, and the purpose of each. So far, your question just makes no sense, as well as what you are trying to achieve.
—SA
Member 10621558 3-Nov-15 10:20am    
I have a solution with different projects like -Financial, -Logistic, -Sales.
Depending on the distribution (Different entities) some could use only financial or logistic or sales. However all projects use Table Currency. The form to add or change currency I put in a project CommonForms. I want to use this form in all projects. I made a reference and be able to so. However I want to hide the form that calls the CurrencyForm, which I can, but when the CurrencyForm closes I want to show the hidden form again and that I cannot.

Basically I want to show a form in a different project and while showing, hide the previous form, when I finished I want to return to that form by showing it again
Sergey Alexandrovich Kryukov 3-Nov-15 11:21am    
You are not getting it. Essentially, there are no "projects". Everything else you are talking about is irrelevant, as soon as you are talking about something which does not exist.

Anyway, if they are different processes, it would be a considerable abuse. If you are talking about in-process forms, there is no a problem.

I already advised you what to do.

—SA

1 solution

I found the solution.

VB
Dim frm As Form = My.Application.OpenForms.Item("STARTUP_Screen")
   frm.Show()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900