Save bitmap image code explanation

Beginner

Well-known member
Joined
Mar 12, 2008
Messages
114
Programming Experience
Beginner
Private Sub SaveImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveImage.Click
Dim sfd As New SaveFileDialog
sfd.Filter = "Bitmap Files|*.bmp"
sfd.ShowDialog()
If sfd.FileName <> "" Then


Regarding the <> what does it exactly mean ?
 
Type "<>" in help and you get the "Comparison Operators" article that says it means "Not equal to".
 
Thanx John but whats the logci behind that ?


so the code line is saying if sfd.filname not equals to then execute the following command; End if ??

Still not making sense why cant we skip the part.


When i put the mouse over the <> it says "Represents a Boolean Value"

Still dont understand.
 
The expression compares the Filename string with an empty string. Obviously the code only wants to do something if the filename is not an empty string. A correct code would compare the result of the ShowDialog function to see if user clicked OK.
 
Back
Top