473,394 Members | 1,865 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,394 software developers and data experts.

Problem with Multi-Project Solution

Hello All,

Yes, I'm back again on this subject.

I've started again to set up the solution and I can, if you like, move
deeper into the program, accessing various forms as I go BUT I cannot for the
life of me work out how to get back. I have set "CommonForms" in the
Properties/References of StartUp.

Just working with two projects "StartUp" & "CommonForms" I place a parent
form with child in "StartUp" and one form in "CommonForms". In the "StartUp"
child form I have the following code:

Public Class OpenSplash

Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click

Dim FormChild2 As New CommonForms.Form1
FormChild2.MdiParent = Background
FormChild2.Show()
Me.Hide()
End Sub
End Class

This closes the OpenSplash screen and shows Form1. How do I close Form1 and
get back to OpenSplash?

With this solved I can move forward, I'm sure.

Best Rgds,
22Pom
Sep 20 '08 #1
8 1147
Try changing:

FormChild2.Show()
Me.Hide()

to:

Me.Visible = False
FormChild2.ShowDialog()
Me.Visible = True

Does that achieve what you wanted?

"22Pom" <22***@discussions.microsoft.comwrote in message
news:40**********************************@microsof t.com...
Hello All,

Yes, I'm back again on this subject.

I've started again to set up the solution and I can, if you like, move
deeper into the program, accessing various forms as I go BUT I cannot for
the
life of me work out how to get back. I have set "CommonForms" in the
Properties/References of StartUp.

Just working with two projects "StartUp" & "CommonForms" I place a parent
form with child in "StartUp" and one form in "CommonForms". In the
"StartUp"
child form I have the following code:

Public Class OpenSplash

Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click

Dim FormChild2 As New CommonForms.Form1
FormChild2.MdiParent = Background
FormChild2.Show()
Me.Hide()
End Sub
End Class

This closes the OpenSplash screen and shows Form1. How do I close Form1
and
get back to OpenSplash?

With this solved I can move forward, I'm sure.

Best Rgds,
22Pom
Sep 20 '08 #2
You cannot 'close' the main form that starts off the application.
The most you can do is 'hide' it and show it.

Miro

"22Pom" <22***@discussions.microsoft.comwrote in message
news:40**********************************@microsof t.com...
Hello All,

Yes, I'm back again on this subject.

I've started again to set up the solution and I can, if you like, move
deeper into the program, accessing various forms as I go BUT I cannot for
the
life of me work out how to get back. I have set "CommonForms" in the
Properties/References of StartUp.

Just working with two projects "StartUp" & "CommonForms" I place a parent
form with child in "StartUp" and one form in "CommonForms". In the
"StartUp"
child form I have the following code:

Public Class OpenSplash

Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click

Dim FormChild2 As New CommonForms.Form1
FormChild2.MdiParent = Background
FormChild2.Show()
Me.Hide()
End Sub
End Class

This closes the OpenSplash screen and shows Form1. How do I close Form1
and
get back to OpenSplash?

With this solved I can move forward, I'm sure.

Best Rgds,
22Pom
Sep 20 '08 #3
Hi Family Tree Mike,

Sorry mate, no it doesn't. I have tried to use the following code in Form1,
as I have done in a single project solution, but in this case I get the error
"Formchild2 is not declared".

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

Dim FormChild2 As New StartUp.Opensplash
FormChild2.MdiParent = background
FormChild2.Show()
Me.Hide()
End Sub
End Class

There is probably a simple way of doing this, like most other problems I've
had in the past, but I cannot work it out.

Best Rgds,
22Pom

"Family Tree Mike" wrote:
Try changing:

FormChild2.Show()
Me.Hide()

to:

Me.Visible = False
FormChild2.ShowDialog()
Me.Visible = True

Does that achieve what you wanted?
Sep 20 '08 #4
Hi Miro,

I don't want to close off the application with my code I just want to close
the current form and go back to the previous form. I have tried this code
but I get the error that Formchild2 is not declared.

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

Dim FormChild2 As New StartUp.Opensplash
FormChild2.MdiParent = background
FormChild2.Show()
Me.Hide()
End Sub
End Class

If I can't overcome this problem then I'm lost. My current Single Solution
project has well over 70 Forms, Modules etc in it and I was advised that the
only real way to develop such a large program was to go to the Multi-Project
Solution.

Best Rgds,
22Pom
"Miro" wrote:
You cannot 'close' the main form that starts off the application.
The most you can do is 'hide' it and show it.

Miro
Sep 20 '08 #5
22Pom wrote:
<snip>
Just working with two projects "StartUp" & "CommonForms" I place a parent
form with child in "StartUp" and one form in "CommonForms". In the "StartUp"
child form I have the following code:

Public Class OpenSplash

* * Private Sub Button3_Click(ByVal sender As System.Object, _
* * * * * * * * * * ByVal e As System.EventArgs) Handles Button3.Click

* * * * Dim FormChild2 As New CommonForms.Form1
* * * * FormChild2.MdiParent = Background
* * * * FormChild2.Show()
* * * * Me.Hide()
* * End Sub
End Class

This closes the OpenSplash screen and shows Form1. How do I close Form1 and
get back to OpenSplash?
<snip>

I'm not sure if I really understand your setup, but since it seems
Opensplash will be controlling the other forms' lifetime, you could
have a form variable *with events* in Opensplash, so it could know
when the current form closed.

<example>
Public Class OpenSplash
Private WithEvents CurrentForm As Form
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click

Dim FormChild2 As New CommonForms.Form1
'***********
CurrentForm = FormChild2
'***********
FormChild2.MdiParent = Background
FormChild2.Show()
Me.Hide()
End Sub
Private Sub CurrentForm_FormClosed( _
ByVal sender As Object, _
ByVal e As FormClosedEventArgs _
) Handles CurrentForm.FormClosed

CurrentForm = Nothing
Me.Show()

End Sub
End Class
</example>

Regards,

Branco.
Sep 21 '08 #6
Hi Branco Mendeiros,

I thank you for you code but it operates in the same fashion that I'm
currently using.

My program starts with the OpenSplash screen on a background and the user,
by clicking a button moves forward to screen 2, and this automatically closes
screen 1. So far so good - this I can achieve. What bugs me is closing
screen 2 and returning to screen 1.

This is only the start. I have 4 Product groups which in turn have 5
Products which in turn etc, so as you can see there are a lot of separate
screens. At the moment I have a Single Solution with some 70 odd Forms,
Modules etc ,which works ok up till now. I cannot keep adding forms as this
is causing the program to play up.

I think that I've opened up a massive can of worms with this problem, a
problem that I don't think has come up before.

Thanks for your time.

Best Rgds
22Pom

"Branco Medeiros" wrote:
>
I'm not sure if I really understand your setup, but since it seems
Opensplash will be controlling the other forms' lifetime, you could
have a form variable *with events* in Opensplash, so it could know
when the current form closed.

<example>
Public Class OpenSplash

Private WithEvents CurrentForm As Form
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click

Dim FormChild2 As New CommonForms.Form1
'***********
CurrentForm = FormChild2
'***********
FormChild2.MdiParent = Background
FormChild2.Show()
Me.Hide()
End Sub

Private Sub CurrentForm_FormClosed( _
ByVal sender As Object, _
ByVal e As FormClosedEventArgs _
) Handles CurrentForm.FormClosed

CurrentForm = Nothing
Me.Show()

End Sub
End Class
</example>

Regards,

Branco.
Sep 21 '08 #7
Hi, 22Pom!

When you say "What bugs me is closing screen 2 and returning to screen
1", what exactly do you mean? Do you want to show "screen 1" again
after closing "screen 2"?

Can you provide more information about what you are trying to
acomplish? Maybe if you clarify that we can find out how to achieve
it.

Regards,

Branco.
On Sep 21, 12:35*am, 22Pom <22...@discussions.microsoft.comwrote:
Hi Branco Mendeiros,

I thank you for you code but it operates in the same fashion that I'm
currently using.

My program starts with the OpenSplash screen on a background and the user,
by clicking a button moves forward to screen 2, and this automatically closes
screen 1. *So far so good - this I can achieve. *What bugs me is closing
screen 2 and returning to screen 1.

This is only the start. *I have 4 Product groups which in turn have 5
Products which in turn etc, so as you can see there are a lot of separate
screens. *At the moment I have a Single Solution with some 70 odd Forms,
Modules etc ,which works ok up till now. *I cannot keep adding forms asthis
is causing the program to play up.

I think that I've opened up a massive can of worms with this problem, a
problem that I don't think has come up before.

Thanks for your time.

Best Rgds
22Pom
<snip>
Sep 21 '08 #8
Hi Branco Medeiros,

Yes that's it. My program starts off with the opening splash screen (1) the
user then moves forward to the next screeen (2) which is where they can
select a product range from a set of (4). Each of these sets has a further
(5) products, and so the process continues until they have reached the
product they want and the selection begins, hence the number of forms.
modules etc in the program, currently stands at 74 with at least another 25
to go.

What I need to be able to do is reverse out of an area reached. This is the
problem. I could attach a copy of what I have but I don't see how I can do
this in this forum. What I will do is post a link to another Forum so you
can see what I have.

Best Rgds,
22Pom

"Branco Medeiros" wrote:
Hi, 22Pom!

When you say "What bugs me is closing screen 2 and returning to screen
1", what exactly do you mean? Do you want to show "screen 1" again
after closing "screen 2"?

Can you provide more information about what you are trying to
acomplish? Maybe if you clarify that we can find out how to achieve
it.

Regards,

Branco.

Sep 22 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chung Jiho | last post by:
Hello, We have been deploying our web application over win2k servers. It is written in Python and uses Active Scripting to meet our requirements that it must be ASP application. So far, it was...
0
by: Atul Kshirsagar | last post by:
I am embedding python in my C++ application. I am using Python *2.3.2* with a C++ extention DLL in multi-threaded environment. I am using SWIG-1.3.19 to generate C++ to Python interface. Now to...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
2
by: RipTide | last post by:
Background: Using an unsupported/abandoned multi-user multi-database program that uses Access 97 and Jet 3.5. Program itself appears to have been built with PowerBuilder 6.5. Databases reside on...
2
by: google | last post by:
Hello everyone, I am having an issue using the "Multi Select" option in a list box in MS Access 2003. I am making a form that users can fill out to add an issue to the database. Each issue can...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
4
by: snowweb | last post by:
I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but...
2
by: Diz | last post by:
Can anyone please help with this? when i run the following query, using SELECT*, SELECT * FROM tbl_artwork, tbl_artworkmedium, tbl_medium WHERE tbl_artwork.artworkID =...
0
by: pvannie | last post by:
Hello there, I've been trying to install DBD::mysql on Mac OS X Server 10.3 for 2 days, but it still raises error. So I'm going to send this message to ask for help. Any help will be much...
7
by: Adam01 | last post by:
Im not perl expert with perl, and I am trying to run a server script (that I didnt write). And perl reports: Can't locate IO/Compress/Gzip.pm in @INC (@INC contains:...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.