Ok, here's a step-by-step test which control is not set
If InkPicture1 IsNot Nothing Then
If InkPicture1.Image IsNot Nothing Then
InkPicture1.Image.Save(IO.Directory.GetCurrentDirectory() & "\test_out.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
Else
' InkPicture1.Image is nothing
End If
Else
' InkPicture1 is nothing
End If
Put a message box or breakpoint on both Else parts to see if the InkPicture1 or InkPicture1.Image is not set. Can't think that something else could cause that error. This is without seeing more of your code. My guess is that you haven't assigned any initial image to InkPicture1.Image or you've somehow "lost" InkPicture1.Image in your code. In WinForms the image can be assign, for example, in the following way
InkPicture1.Image = Image.FromFile("D:\test.jpg") , but I don't know how you do it with Tablet PC.
HTH
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Offline 1,024 posts
since Aug 2008