Click here to Skip to main content
15,923,909 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: datagrid Pin
vengaqua10-Aug-06 18:34
vengaqua10-Aug-06 18:34 
QuestionCrystal Report Invalid Key Pin
iamalik9-Aug-06 20:09
professionaliamalik9-Aug-06 20:09 
AnswerRe: Crystal Report Invalid Key Pin
Dave Sexton9-Aug-06 22:10
Dave Sexton9-Aug-06 22:10 
GeneralRe: Crystal Report Invalid Key Pin
iamalik10-Aug-06 0:32
professionaliamalik10-Aug-06 0:32 
QuestionDo I need to delete the class? Pin
IlanTal9-Aug-06 19:33
IlanTal9-Aug-06 19:33 
AnswerRe: Do I need to delete the class? Pin
Dave Sexton9-Aug-06 22:05
Dave Sexton9-Aug-06 22:05 
GeneralRe: Do I need to delete the class? Pin
IlanTal10-Aug-06 3:30
IlanTal10-Aug-06 3:30 
GeneralRe: Do I need to delete the class? Pin
Dave Sexton10-Aug-06 21:35
Dave Sexton10-Aug-06 21:35 
IlanTal wrote:
When it goes out of scope does the instance hang around in memory?


No, if it goes out of scope the instance is no more and the memory is reclaimed.

IlanTal wrote:
Should I use Dispose() at the end of the button routine?


You can call the Dispose() method when you no longer need your class. If you call it at the end of your button routine you'll throw a null reference exception if you try to make use of the class later in another sub as you cannot access a disposed object. A basic use of the Dispose() method in your click event would be something like

Option Strict On
Public Class Form1

Dim myScope as ScopeClass 'declare the class

Private Sub Test_Click(...)

'create new ScopeClass instance
myScope = New ScopeClass

'do whatever the ScopeClass needs to do
'call other methods/functions etc
......

'ScopeClass is no longer needed,
'all processing that needed to be done is complete
myScope.Dispose()

End Sub
End Class


Because of the automatic garbage collection of the .NET framework you don't HAVE to call Dispose() but it can be used to manually reclaim memory.
AnswerRe: Do I need to delete the class? Pin
Dave Kreskowiak10-Aug-06 2:39
mveDave Kreskowiak10-Aug-06 2:39 
QuestionAccess DB - Some columns not updating Pin
draynumfa9-Aug-06 12:54
draynumfa9-Aug-06 12:54 
QuestionPlz can anyone help?? Pin
Paul Ferris9-Aug-06 10:39
Paul Ferris9-Aug-06 10:39 
AnswerRe: Plz can anyone help?? Pin
Christian Graus9-Aug-06 11:44
protectorChristian Graus9-Aug-06 11:44 
GeneralRe: Plz can anyone help?? Pin
Paul Ferris10-Aug-06 3:21
Paul Ferris10-Aug-06 3:21 
GeneralRe: Plz can anyone help?? Pin
Christian Graus10-Aug-06 10:59
protectorChristian Graus10-Aug-06 10:59 
QuestionHelp with set up - app. installlation Pin
alexfromto9-Aug-06 10:21
alexfromto9-Aug-06 10:21 
QuestionGreek Characters [modified] Pin
Harold_Wishes9-Aug-06 9:36
Harold_Wishes9-Aug-06 9:36 
QuestionGet source from a web page [modified] Pin
Grags9-Aug-06 9:27
Grags9-Aug-06 9:27 
Questionlistview item update Pin
eatwork9-Aug-06 8:09
eatwork9-Aug-06 8:09 
QuestionVB 2005 How to code an emailing function? Pin
Solly749-Aug-06 8:05
Solly749-Aug-06 8:05 
AnswerRe: VB 2005 How to code an emailing function? Pin
Christian Graus9-Aug-06 11:45
protectorChristian Graus9-Aug-06 11:45 
GeneralRe: VB 2005 How to code an emailing function? Pin
Paul Conrad9-Aug-06 12:13
professionalPaul Conrad9-Aug-06 12:13 
QuestionHow to add a select all button to a OpenFileDialog Pin
Glen Conaway9-Aug-06 7:24
Glen Conaway9-Aug-06 7:24 
QuestionParametric sql command: see actual sql statement Pin
raul.net9-Aug-06 7:17
raul.net9-Aug-06 7:17 
AnswerRe: Parametric sql command: see actual sql statement Pin
Dave Kreskowiak9-Aug-06 10:22
mveDave Kreskowiak9-Aug-06 10:22 
GeneralRe: Parametric sql command: see actual sql statement Pin
raul.net9-Aug-06 21:59
raul.net9-Aug-06 21:59 

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.