Click here to Skip to main content
15,914,924 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHOW TO CHANGE THE COLOUR OF MSGBOX/INPUTBOX,ETC FROM ITS DEFAULT COLOUR Pin
LAYEEQ AHMED KHAN23-Jun-05 8:15
LAYEEQ AHMED KHAN23-Jun-05 8:15 
AnswerRe: HOW TO CHANGE THE COLOUR OF MSGBOX/INPUTBOX,ETC FROM ITS DEFAULT COLOUR Pin
Dave Kreskowiak23-Jun-05 9:11
mveDave Kreskowiak23-Jun-05 9:11 
GeneralGood programming - memory allocation Pin
Sled Dog23-Jun-05 4:01
Sled Dog23-Jun-05 4:01 
GeneralRe: Good programming - memory allocation Pin
T-Smooth23-Jun-05 6:42
T-Smooth23-Jun-05 6:42 
GeneralRe: Good programming - memory allocation Pin
StylezHouse23-Jun-05 9:13
StylezHouse23-Jun-05 9:13 
GeneralRe: Good programming - memory allocation Pin
Anonymous23-Jun-05 21:08
Anonymous23-Jun-05 21:08 
GeneralRe: Good programming - memory allocation Pin
StylezHouse23-Jun-05 9:18
StylezHouse23-Jun-05 9:18 
GeneralRe: Good programming - memory allocation Pin
T-Smooth24-Jun-05 1:13
T-Smooth24-Jun-05 1:13 
Does Dispose() work if the variable is never initialized?

Example:

Dim MyObject As Object
MyObject.Dispose()


I suppose I could test it quick but does that throw an exception because of a null object reference?

Edit:
Ok tested with following code
Dim oObject As New Object
oObject = Nothing
oObject.Dispose()

Which threw a NullReferenceException. This is why I was wondering if it was safe to just put cn.Dispose() in the finally clause instead of enclosing it in If Not cn Is Nothing Then block. That way you are covered if for some reason it never got initialized. Unless I'm missing something.
GeneralRe: Good programming - memory allocation [EDITED] Pin
Dave Kreskowiak24-Jun-05 1:31
mveDave Kreskowiak24-Jun-05 1:31 
GeneralRe: Good programming - memory allocation [EDITED] Pin
T-Smooth24-Jun-05 1:47
T-Smooth24-Jun-05 1:47 
GeneralRe: Good programming - memory allocation [EDITED] Pin
StylezHouse24-Jun-05 2:44
StylezHouse24-Jun-05 2:44 
Generalformat problem Pin
Member 203133523-Jun-05 3:56
Member 203133523-Jun-05 3:56 
GeneralRe: format problem Pin
Dave Kreskowiak23-Jun-05 4:54
mveDave Kreskowiak23-Jun-05 4:54 
GeneralRe: format problem Pin
Member 203133523-Jun-05 18:49
Member 203133523-Jun-05 18:49 
GeneralRe: format problem Pin
Dave Kreskowiak24-Jun-05 1:29
mveDave Kreskowiak24-Jun-05 1:29 
GeneralDataGrid Column Formating Pin
directred23-Jun-05 1:45
directred23-Jun-05 1:45 
GeneralRe: DataGrid Column Formating Pin
Het210923-Jun-05 18:52
Het210923-Jun-05 18:52 
GeneralRe: DataGrid Column Formating Pin
directred23-Jun-05 23:37
directred23-Jun-05 23:37 
GeneralRe: DataGrid Column Formating Pin
Het210923-Jun-05 23:56
Het210923-Jun-05 23:56 
GeneralRe: DataGrid Column Formating Pin
directred27-Jun-05 0:15
directred27-Jun-05 0:15 
GeneralRe: DataGrid Column Formating Pin
Het210927-Jun-05 0:48
Het210927-Jun-05 0:48 
GeneralRe: DataGrid Column Formating Pin
directred27-Jun-05 1:08
directred27-Jun-05 1:08 
GeneralRe: DataGrid Column Formating Pin
Het210927-Jun-05 1:18
Het210927-Jun-05 1:18 
GeneralRe: DataGrid Column Formating Pin
directred27-Jun-05 3:54
directred27-Jun-05 3:54 
GeneralRe: DataGrid Column Formating Pin
Het210927-Jun-05 17:18
Het210927-Jun-05 17:18 

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.