Thanks everyone : it works now, but i can't do the same from project2 to
project1... How to call back the first form ?
this code works in Frm_main_mdi.vb
Private Sub OrdonnerToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
OrdonnerToolStripMenuItem.Click
Me.Hide()
Try
Dim frmOrdonner As New ordonner.FrmMain
frmOrdonner.ShowDialog()
Catch ex As ApplicationException
MsgBox("Impossible d'ouvrir la fenêtre", MsgBoxStyle.Critical,
"Oops!")
End Try
End Sub
but in frmOrdonner.vb , that doesn't work : How to call back the first
form ?
I tried to make a reference to it but an error tells me there is a
circular reference !(or something like this)
Private Sub FrmMain_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Frm_main_mdi.Show()'error her
End Sub
thanks for help
pascal
--
http://www.scalpa.info
http://scalpa98.blogspot.com/
http://scalpa-production.blogspot.com/
"kimiraikkonen" <
[email protected]> a écrit dans le message de
Assuming you have 2 projects in your solution(can be added File->Add
menu) and Project1 must call Project2's form which is in the same
solution as a seperate project.
Well, first right click on the caller project(Project1) in solution
then choose "Add Reference", in "Projects" tab, add reference to the
other project (that is Project2) that you want to call its form.
When done, you can import second project to first project and
instantiate its form to call under your main project(project1) that is
in the same solution like this:
Dim instance As New Project2.Form1
instance.Show()
Hope this helps,
Onur Güzel
(e-mail address removed)
(e-mail address removed)