Click here to Skip to main content
15,887,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: progress bar Pin
Dave Kreskowiak15-May-07 4:01
mveDave Kreskowiak15-May-07 4:01 
Questionself referential classes Pin
Sonia Gupta15-May-07 0:50
Sonia Gupta15-May-07 0:50 
AnswerRe: self referential classes Pin
Colin Angus Mackay15-May-07 0:53
Colin Angus Mackay15-May-07 0:53 
QuestionRe: self referential classes Pin
Sonia Gupta15-May-07 0:56
Sonia Gupta15-May-07 0:56 
AnswerRe: self referential classes Pin
Colin Angus Mackay15-May-07 1:56
Colin Angus Mackay15-May-07 1:56 
GeneralRe: self referential classes Pin
Sonia Gupta15-May-07 2:01
Sonia Gupta15-May-07 2:01 
GeneralRe: self referential classes Pin
Colin Angus Mackay15-May-07 3:55
Colin Angus Mackay15-May-07 3:55 
Questionbasic concepts Pin
Sonia Gupta15-May-07 0:39
Sonia Gupta15-May-07 0:39 
Hi there
i have
two forms named form1 and form2
two class files named class1.vb , class2.vb

now in class1 the code is as follows
class class1
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class

class2 code is as follows
class class2
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class

In form1 i am writing the following code
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim d1 as new form2
d1.show
End Sub
End Class

In form2 i am writing the following code
Public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

dim d1 as new class1

End Sub
End Class


The startup page is form1

At form1 loads i am getting form2 automatically.
now i am closing the form2 .
Though the object of class1 is declared in form2
ad on closing the form2 , i am not getting the automatic call of the class1 destructor.Rather getting the automatic call of the finalize function of class1 at the form1 (startup page) closing.

Now my question is
1. y the automatic call of the class1 destructor is not getting called on form2 closing because class1 is assigned the memory in form2.
2. Can i call the finalize function of class1 using it's object
like dim d as new class1
d.finalize
i was getting error but.
3.in the finalize function , i am writing
Mybase.finalize
what's the mean of this line.
I know it is a desctructor
Finalize funtion get called automatically when the startup form gets closed.
AnswerRe: basic concepts Pin
Dave Kreskowiak15-May-07 3:56
mveDave Kreskowiak15-May-07 3:56 
QuestionUrgently required solution Pin
d_smit15-May-07 0:34
d_smit15-May-07 0:34 
AnswerRe: Urgently required solution Pin
Colin Angus Mackay15-May-07 0:51
Colin Angus Mackay15-May-07 0:51 
Answerurgent message titles Pin
leckey15-May-07 4:19
leckey15-May-07 4:19 
QuestionAbout Datagrid and xml data(urgent) Pin
Wlink14-May-07 23:08
Wlink14-May-07 23:08 
AnswerRe: About Datagrid and xml data(urgent) Pin
Ch_Shahzad iqbal15-May-07 23:28
Ch_Shahzad iqbal15-May-07 23:28 
GeneralRe: About Datagrid and xml data(urgent) Pin
Wlink16-May-07 2:27
Wlink16-May-07 2:27 
QuestionI added a column to a table, but, I can't see it. Pin
furjaw14-May-07 21:49
furjaw14-May-07 21:49 
AnswerRe: I added a column to a table, but, I can't see it. Pin
Ch_Shahzad iqbal14-May-07 22:05
Ch_Shahzad iqbal14-May-07 22:05 
AnswerRe: I added a column to a table, but, I can't see it. Pin
Dave Kreskowiak15-May-07 3:46
mveDave Kreskowiak15-May-07 3:46 
GeneralRe: I added a column to a table, but, I can't see it. Pin
furjaw16-May-07 9:31
furjaw16-May-07 9:31 
GeneralRe: I added a column to a table, but, I can't see it. Pin
Dave Kreskowiak16-May-07 13:31
mveDave Kreskowiak16-May-07 13:31 
GeneralRe: I added a column to a table, but, I can't see it. Pin
furjaw17-May-07 13:27
furjaw17-May-07 13:27 
GeneralRe: I added a column to a table, but, I can't see it. Pin
Dave Kreskowiak17-May-07 15:50
mveDave Kreskowiak17-May-07 15:50 
Questionisual Studio 2005 Connection to the Server Issue Pin
R. A. Abbasi14-May-07 21:37
R. A. Abbasi14-May-07 21:37 
AnswerRe: isual Studio 2005 Connection to the Server Issue Pin
Dave Kreskowiak15-May-07 3:51
mveDave Kreskowiak15-May-07 3:51 
GeneralRe: isual Studio 2005 Connection to the Server Issue Pin
R. A. Abbasi16-May-07 1:08
R. A. Abbasi16-May-07 1:08 

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.