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

Visual Basic

 
QuestionFile in use error Pin
TheComputerMan2-Jan-09 5:04
TheComputerMan2-Jan-09 5:04 
AnswerRe: File in use error Pin
Jon_Boy2-Jan-09 5:11
Jon_Boy2-Jan-09 5:11 
GeneralRe: File in use error Pin
TheComputerMan2-Jan-09 5:21
TheComputerMan2-Jan-09 5:21 
GeneralRe: File in use error Pin
Jon_Boy2-Jan-09 5:30
Jon_Boy2-Jan-09 5:30 
GeneralRe: File in use error Pin
TheComputerMan2-Jan-09 6:24
TheComputerMan2-Jan-09 6:24 
GeneralRe: File in use error Pin
Jon_Boy2-Jan-09 7:04
Jon_Boy2-Jan-09 7:04 
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 
I tried that Christian (using pict2 = pict.clone and then disposing pict) but still the same problem. It obviously carries the info accross to the clone.

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

    Try

        If strFilename.Trim > "" Then
            pict = Drawing.Bitmap.FromFile(strFilename)
            pict2 = pict.Clone()
            pict.Dispose()
        Else
            pict2 = My.Resources.nouserpic_grey
        End If

    Catch ex As Exception

        pict2 = My.Resources.nouserpic_grey

    End Try
    Return pict2
End Function


Looks like I might have to try storing the pic in the database, but I did not want to do that as it is only an SQL Server 2005 Compact so space limited.

Thanks anyway! (If you can think of any other way I would like to hear from you)
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 
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 

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.