If x is nothing then
........
end if
----- Original Message -----
From: "Peter N. Kipe" <pkipe@c...>
To: "professional vb" <pro_vb@p...>
Sent: Tuesday, October 29, 2002 1:05 PM
Subject: [pro_vb] RE: nullreferenceexception
> You should probably post this over at vb_dotnet.
>
> Pete
>
> -----Original Message-----
> From: Abraham Luna [mailto:abe@a...]
> Sent: Tuesday, October 29, 2002 3:17 PM
> To: professional vb
> Subject: [pro_vb] nullreferenceexception
>
>
> here is my code
>
> Private bmpStreetScene_Before_Big As Bitmap
>
> Private Sub pbSendPhotos_Click(ByVal Sender As System.Object, ByVal E
As
> System.EventArgs) Handles pbSendPhotos.Click
> Dim strTempPath As String = Mid(Application.ExecutablePath, 1,
> InStrRev(Application.ExecutablePath, "\")) & "temp\"
> bmpStreetScene_Before_Big.Save(strTempPath &
> "streetscene_before_big.jpg", Imaging.ImageFormat.Jpeg)
> MsgBox("Done saving jpg's")
> End Sub
>
> if i dont set bmpStreetScene_Before_Big = New Bitmap(strFilePath) then i
get
> a nullreferenceexception. what kind of if statement do i have to write to
> test for this instead of using a try catch block. thanks for your help.
>
> ---------
> i'm using visual studio .net on windows 2000 pro
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>