Friday April 29th

Thursday April 28th

Wednesday April 27th

3 Kicks

Intuipic : WPF image viewer with source

Intuipic is an application that allows you to quickly and easily view your images on your PC. It's goal is to be simple but effective. Source code now available along with version


Eh. Nothing special. Its a bit of a ripoff of the Vista image viewer. Except his threw an exception halfway through my images folder. And it doesn't do much of anything special.

BTW, can i say "nothing special" again? Sheesh, my vocab sucks.

So by "nothing special" you mean "simple but effective"? :) Oh, and I've never even run Vista so it's good to know that it came out so similar. I'll be looking at the exception you got sometime soon.

Thanks for the, um, constructive criticism.

this function To view Image From Database

Function ReadImagFromDB(ByVal strsql As String) As BitmapImage
Dim jpg As New BitmapImage
Dim img As Byte()
Dim cmd As New SqlCommand(strsql, con)
img = CType(cmd.ExecuteScalar, Byte())
If img Is Nothing OrElse img.Length < 1 Then
Return Nothing
End If
Using ms As New MemoryStream(img, 0, img.Length)
jpg.DecodePixelWidth = 130.5
jpg.DecodePixelHeight = 144.5
jpg.CacheOption = BitmapCacheOption.OnLoad
jpg.StreamSource = ms
ms.Seek(0, TimeSeekOrigin.BeginTime)
End Using
Return jpg
Catch ex As Exception
Throw ex
End Try
End Function
dim strsql as string = "Select Img from tblUsersImage where ID = 9"
sub SHowImage()
myImage.sourse = ReadImagFromDB(strsql )
end sub

open Image File And save it into DB

Function ReadImagrFromFIl() As Byte()
Dim DG As New OpenFileDialog
DG.Filter = program.ImageFiles
DG.Multiselect = False
Dim FN As String = ""
Dim IMG() As Byte
DG.Multiselect = False
If DG.ShowDialog = True Then
IMG = System.IO.File.ReadAllBytes(DG.FileName)
If IMG.Length > 3145728 Then
Dim ex1 As New Exception("Sorry ! File Size Is Big than 3 Megabytes Attached Image size Must be less than or equal 3 Megabytes Opration Canceled for THis Exception ")
End If
Dim EX As New Exception("Opration Abourted By User Thanks Must Select File To Countinue")
Throw EX
End If
Return IMG
Catch ex2 As Exception
Throw ex2
End Try
End Function

end Class
Dim IMGBinary As Byte() = imgProcess.ReadImagrFromFIl
strsql = "Delete from tblLeaveImages where LeaveID = " & CurId & " INSERT INTO tblLeaveImages (EmpID, LeaveID, IMG) VALUES (" & Me.EmpID & "," & Me.CurId & ",@IMG) "
Dim cmd As New SqlCommand(strsql, con)
cmd.Parameters.AddWithValue("@IMG", IMGBinary)

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network