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

Visual Basic

 
GeneralRe: File in use error Pin
Christian Graus2-Jan-09 5:45
protectorChristian Graus2-Jan-09 5:45 
GeneralRe: File in use error Pin
TheComputerMan2-Jan-09 6:22
TheComputerMan2-Jan-09 6:22 
GeneralRe: File in use error Pin
Luc Pattyn2-Jan-09 7:00
sitebuilderLuc Pattyn2-Jan-09 7:00 
AnswerRe: File in use error Pin
Dave Kreskowiak2-Jan-09 6:21
mveDave Kreskowiak2-Jan-09 6:21 
GeneralRe: File in use error Pin
TheComputerMan2-Jan-09 6:25
TheComputerMan2-Jan-09 6:25 
GeneralRe: File in use error [modified] Pin
TheComputerMan2-Jan-09 6:44
TheComputerMan2-Jan-09 6:44 
GeneralRe: File in use error Pin
Fabio V Silva2-Jan-09 11:53
Fabio V Silva2-Jan-09 11:53 
GeneralRe: File in use error Pin
TheComputerMan3-Jan-09 4:20
TheComputerMan3-Jan-09 4:20 
Hi Fabio,

Thanks for that. I had pulled the code from another program where I am using it to store the picture in SQL Server and forgot to take that bit out! Duh!! Roll eyes | :rolleyes:

The corrected code block is:

Friend Function GetAvatar(ByVal ContactID As Integer) As Drawing.Bitmap
    Dim pict As Drawing.Bitmap
    'This just gets the file name
    Dim strFilename As String = cDBHandler.ExtractContactImage(ContactID)

    Try

        If strFilename.Trim > "" Then
            Dim fs As New System.IO.FileStream(strFilename, IO.FileMode.Open, IO.FileAccess.Read)
            pict = Drawing.Bitmap.FromStream(fs)
            fs.Close()
        Else
            pict = My.Resources.nouserpic_grey
        End If

    Catch ex As Exception

        pict = My.Resources.nouserpic_grey

    End Try
    Return pict
End Function


Sorry if that caused any confusion to anyone.
GeneralNext Inner Pin
dadashri2-Jan-09 1:44
dadashri2-Jan-09 1:44 
GeneralRe: Next Inner Pin
TheComputerMan2-Jan-09 5:10
TheComputerMan2-Jan-09 5:10 
GeneralRe: Next Inner Pin
Dave Kreskowiak2-Jan-09 6:14
mveDave Kreskowiak2-Jan-09 6:14 
GeneralRe: Next Inner Pin
TheComputerMan2-Jan-09 6:47
TheComputerMan2-Jan-09 6:47 
GeneralRe: Next Inner Pin
Dave Kreskowiak2-Jan-09 6:15
mveDave Kreskowiak2-Jan-09 6:15 
NewsSchool Library System Software RUN-TIME error 713 Pin
dadashri2-Jan-09 1:36
dadashri2-Jan-09 1:36 
GeneralRe: School Library System Software RUN-TIME error 713 Pin
Dave Kreskowiak2-Jan-09 3:42
mveDave Kreskowiak2-Jan-09 3:42 
GeneralRe: School Library System Software RUN-TIME error 713 Pin
Christian Graus2-Jan-09 5:47
protectorChristian Graus2-Jan-09 5:47 
QuestionAdd two mp3 files into one mp3 file. Pin
Gagan.202-Jan-09 0:21
Gagan.202-Jan-09 0:21 
AnswerRe: Add two mp3 files into one mp3 file. Pin
Dave Kreskowiak2-Jan-09 3:44
mveDave Kreskowiak2-Jan-09 3:44 
AnswerRe: Add two mp3 files into one mp3 file. Pin
LloydA1112-Jan-09 5:27
LloydA1112-Jan-09 5:27 
QuestionIssue with : Setting system time Pin
nishkarsh_k1-Jan-09 22:30
nishkarsh_k1-Jan-09 22:30 
AnswerRe: Issue with : Setting system time Pin
Dave Kreskowiak2-Jan-09 3:52
mveDave Kreskowiak2-Jan-09 3:52 
QuestionListview labelwrap? Pin
Prasadsm1-Jan-09 21:15
Prasadsm1-Jan-09 21:15 
AnswerRe: Listview labelwrap? Pin
Dave Kreskowiak2-Jan-09 3:39
mveDave Kreskowiak2-Jan-09 3:39 
GeneralRe: Listview labelwrap? Pin
Prasadsm2-Jan-09 22:57
Prasadsm2-Jan-09 22:57 
QuestionCapture Screen Pin
Pasan1481-Jan-09 21:03
Pasan1481-Jan-09 21:03 

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.