Click here to Skip to main content
15,890,717 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: multiple forms Pin
JUNEYT24-Feb-07 23:54
JUNEYT24-Feb-07 23:54 
GeneralRe: multiple forms Pin
manni_n25-Feb-07 0:29
manni_n25-Feb-07 0:29 
GeneralRe: multiple forms Pin
JUNEYT25-Feb-07 1:09
JUNEYT25-Feb-07 1:09 
GeneralRe: multiple forms Pin
manni_n25-Feb-07 1:35
manni_n25-Feb-07 1:35 
GeneralRe: multiple forms Pin
Christian Graus25-Feb-07 8:48
protectorChristian Graus25-Feb-07 8:48 
GeneralRe: multiple forms Pin
JUNEYT25-Feb-07 1:21
JUNEYT25-Feb-07 1:21 
Generalits solved Pin
manni_n25-Feb-07 1:45
manni_n25-Feb-07 1:45 
GeneralRe: multiple forms [modified] Pin
TwoFaced25-Feb-07 8:21
TwoFaced25-Feb-07 8:21 
That code only appears to work but has a nasty consequence. Your just hiding the origninal forms and then createing a new instance every time you go back. So you have form1 which creates and shows form2 while hiding itself. You click to go back on form2 which creates a NEW instance of form1 and hides itself. Now you have TWO form1's and 1 form2. However only 1 instance of form1 is actually visible, but there are definitly two and the number of instances will continue to increase every time you go back and forth. As proof put this code in form1.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim output As String = "Open forms: " & vbCrLf
    For Each frm As Form In My.Application.OpenForms
        output &= frm.Text & vbCrLf
    Next
    MsgBox(output)
End Sub
When form1 is shown the second time you'll see there are actually two in existence.


-- modified at 14:29 Sunday 25th February, 2007
GeneralRe: multiple forms Pin
JUNEYT25-Feb-07 11:49
JUNEYT25-Feb-07 11:49 
GeneralRe: multiple forms Pin
TwoFaced25-Feb-07 14:59
TwoFaced25-Feb-07 14:59 
Generalacceptable answer Pin
JUNEYT25-Feb-07 22:59
JUNEYT25-Feb-07 22:59 
GeneralRe: acceptable answer Pin
TwoFaced26-Feb-07 13:53
TwoFaced26-Feb-07 13:53 
GeneralYour solution is not appropriate! Pin
JUNEYT26-Feb-07 23:22
JUNEYT26-Feb-07 23:22 
GeneralRe: Your solution is not appropriate! [modified] Pin
TwoFaced27-Feb-07 9:36
TwoFaced27-Feb-07 9:36 
Questionwhat is 192 bit encryption Pin
onrivman24-Feb-07 22:01
onrivman24-Feb-07 22:01 
AnswerRe: what is 192 bit encryption Pin
Guffa25-Feb-07 1:49
Guffa25-Feb-07 1:49 
Questionevents and delegates in vb.net Pin
Pankaj Garg24-Feb-07 19:31
Pankaj Garg24-Feb-07 19:31 
AnswerRe: events and delegates in vb.net Pin
JUNEYT25-Feb-07 0:50
JUNEYT25-Feb-07 0:50 
QuestionReferential classes in vb.net Pin
Pankaj Garg24-Feb-07 19:27
Pankaj Garg24-Feb-07 19:27 
AnswerRe: Referential classes in vb.net Pin
JUNEYT25-Feb-07 0:59
JUNEYT25-Feb-07 0:59 
GeneralRe: Referential classes in vb.net Pin
amaneet25-Feb-07 1:54
amaneet25-Feb-07 1:54 
GeneralRe: Referential classes in vb.net Pin
JUNEYT25-Feb-07 2:33
JUNEYT25-Feb-07 2:33 
QuestionAuthenticaton mode(Desktop application) Pin
Pankaj Garg24-Feb-07 19:07
Pankaj Garg24-Feb-07 19:07 
Questionoption explicit and option strict Pin
Pankaj Garg24-Feb-07 19:05
Pankaj Garg24-Feb-07 19:05 
AnswerRe: option explicit and option strict Pin
JUNEYT25-Feb-07 0:53
JUNEYT25-Feb-07 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.