Click here to Skip to main content
15,926,703 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Virus scan Pin
Dave Kreskowiak31-May-07 10:21
mveDave Kreskowiak31-May-07 10:21 
QuestionRemoting Service Question Pin
Ridge Howison31-May-07 7:55
Ridge Howison31-May-07 7:55 
AnswerRe: Remoting Service Question Pin
kubben31-May-07 7:58
kubben31-May-07 7:58 
QuestionHow to display the image in VB 6.0 Pin
AR Reddy31-May-07 7:29
AR Reddy31-May-07 7:29 
AnswerRe: How to display the image in VB 6.0 Pin
Dave Kreskowiak31-May-07 7:39
mveDave Kreskowiak31-May-07 7:39 
AnswerRe: How to display the image in VB 6.0 Pin
Billypon31-May-07 16:01
Billypon31-May-07 16:01 
GeneralRe: How to display the image in VB 6.0 Pin
AR Reddy31-May-07 18:54
AR Reddy31-May-07 18:54 
GeneralRe: How to display the image in VB 6.0 [modified] Pin
Billypon1-Jun-07 16:15
Billypon1-Jun-07 16:15 
Add this API declare to the Module which I told you.

Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

And the write down this function into the Module.

Public Function PictureFromPointer(Pointer As Long, Length As Long) As IPicture<br />
    Dim hMem  As Long<br />
    Dim lpMem  As Long<br />
    Dim IID_IPicture As GUID<br />
    Dim istm As stdole.IUnknown<br />
    Dim ipic As IPicture<br />
<br />
    On Error GoTo Out<br />
    If Pointer > 0 And Length > 0 Then<br />
        hMem = GlobalAlloc(GMEM_MOVEABLE, Length)<br />
        If hMem Then<br />
            lpMem = GlobalLock(hMem)<br />
            If lpMem Then<br />
                CopyMemory ByVal lpMem, Pointer, Length<br />
                Call GlobalUnlock(hMem)<br />
                If (CreateStreamOnHGlobal(hMem, CTrue, istm) = S_OK) Then<br />
                    If (CLSIDFromString(StrPtr(sIID_IPicture), IID_IPicture) = S_OK) Then<br />
                        Call OleLoadPicture(ByVal ObjPtr(istm), Length, CFalse, IID_IPicture, PictureFromPointer)<br />
                    End If<br />
                End If<br />
            End If<br />
        End If<br />
    End If<br />
Out:<br />
End Function


Now you can use the function like this:

PictureFromPointer(YourPointer,LengthOfPointer)

I was test nothing about this function,so I can't promise it will work fine..

Luckly!!!


-- modified at 22:31 Friday 1st June, 2007
QuestionAdding or Deleting an Access Table during an Update Pin
RichFeldman31-May-07 7:09
RichFeldman31-May-07 7:09 
AnswerRe: Adding or Deleting an Access Table during an Update Pin
Dave Kreskowiak31-May-07 7:20
mveDave Kreskowiak31-May-07 7:20 
Questionhow to validate a textbox accordingly to MM/DD/YYYY Format Pin
pashitech31-May-07 6:29
pashitech31-May-07 6:29 
AnswerRe: how to validate a textbox accordingly to MM/DD/YYYY Format Pin
Dave Kreskowiak31-May-07 7:14
mveDave Kreskowiak31-May-07 7:14 
QuestionHelp: Creating VB text based game log in screen Pin
jblouir31-May-07 6:14
jblouir31-May-07 6:14 
AnswerRe: Help: Creating VB text based game log in screen Pin
Dave Kreskowiak31-May-07 7:03
mveDave Kreskowiak31-May-07 7:03 
GeneralRe: Help: Creating VB text based game log in screen Pin
jblouir31-May-07 9:09
jblouir31-May-07 9:09 
GeneralRe: Help: Creating VB text based game log in screen Pin
Dave Kreskowiak31-May-07 9:27
mveDave Kreskowiak31-May-07 9:27 
QuestionReplace blank characters in a text file. Pin
Diego F.31-May-07 6:09
Diego F.31-May-07 6:09 
AnswerRe: Replace blank characters in a text file. Pin
Dave Kreskowiak31-May-07 6:32
mveDave Kreskowiak31-May-07 6:32 
GeneralRe: Replace blank characters in a text file. Pin
Diego F.31-May-07 6:40
Diego F.31-May-07 6:40 
GeneralRe: Replace blank characters in a text file. Pin
Dave Kreskowiak31-May-07 6:57
mveDave Kreskowiak31-May-07 6:57 
GeneralRe: Replace blank characters in a text file. Pin
Diego F.31-May-07 6:59
Diego F.31-May-07 6:59 
AnswerRe: Replace blank characters in a text file. Pin
Diego F.31-May-07 6:58
Diego F.31-May-07 6:58 
GeneralRe: Replace blank characters in a text file. Pin
Dave Kreskowiak31-May-07 7:05
mveDave Kreskowiak31-May-07 7:05 
QuestionConvert selectedindex value to an email recipient Pin
archangel71731-May-07 5:49
archangel71731-May-07 5:49 
AnswerRe: Convert selectedindex value to an email recipient Pin
Dave Kreskowiak31-May-07 6:39
mveDave Kreskowiak31-May-07 6:39 

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.