Click here to Skip to main content
15,918,168 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: keeping a class in scope Pin
Christian Graus25-Feb-07 10:01
protectorChristian Graus25-Feb-07 10:01 
GeneralRe: keeping a class in scope Pin
cstrader23225-Feb-07 16:22
cstrader23225-Feb-07 16:22 
GeneralRe: keeping a class in scope Pin
Christian Graus25-Feb-07 17:08
protectorChristian Graus25-Feb-07 17:08 
QuestionDatagrid and MS Access Pin
China-Gary25-Feb-07 5:19
China-Gary25-Feb-07 5:19 
QuestionCreating a Picture Box Pin
Klazen25-Feb-07 4:28
Klazen25-Feb-07 4:28 
AnswerRe: Creating a Picture Box Pin
Dave Kreskowiak25-Feb-07 6:06
mveDave Kreskowiak25-Feb-07 6:06 
GeneralRe: Creating a Picture Box Pin
Klazen25-Feb-07 9:52
Klazen25-Feb-07 9:52 
Questionxml iterator Pin
chater buster25-Feb-07 3:57
chater buster25-Feb-07 3:57 
Questionretrieving thr Explorer folder menu. Possible? Pin
BenedictArf25-Feb-07 0:44
BenedictArf25-Feb-07 0:44 
Questionmultiple forms [modified] Pin
manni_n24-Feb-07 22:06
manni_n24-Feb-07 22:06 
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 

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.