Click here to Skip to main content
16,005,697 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Close a running exe Pin
Ray Cassick12-Aug-02 11:26
Ray Cassick12-Aug-02 11:26 
GeneralRe: Close a running exe Pin
Nick Parker12-Aug-02 11:44
protectorNick Parker12-Aug-02 11:44 
GeneralRe: Close a running exe Pin
Oberdan Borges Nunes20-Aug-02 6:57
Oberdan Borges Nunes20-Aug-02 6:57 
GeneralWebControl Problem! Pin
blong12-Aug-02 9:32
blong12-Aug-02 9:32 
GeneralLoad bitmap from resource in VB with GDI Api Pin
Anonymous12-Aug-02 3:46
Anonymous12-Aug-02 3:46 
GeneralRe: Load bitmap from resource in VB with GDI Api Pin
mirano12-Aug-02 5:05
mirano12-Aug-02 5:05 
GeneralRe: Load bitmap from resource in VB with GDI Api Pin
mike_spice12-Aug-02 11:33
sussmike_spice12-Aug-02 11:33 
GeneralRe: Load bitmap from resource in VB with GDI Api Pin
Anonymous13-Aug-02 0:38
Anonymous13-Aug-02 0:38 
This is THE solution:

The solution to load the resource of bitmap in a StdPicture object is really effective!.

I tried to use handle property of the IPictureDisp that returned the LoadResPicture but it failed because he is not handle of bitmap.

Nevertheless, if we assigned the IPictureDisp returned by LoadResPicture in a StdPicture object, the StdPicture.handle is perfect bitmap handle!!

This is the solution that I implemented :

Dim tBitmap As BITMAP
Dim iRes As Integer
Dim picTemp As New StdPicture

' 102 is the ID of a Bitmap in the .res file.
Set picTemp = LoadResPicture(102, vbResBitmap)

hImageGray = picTemp.handle

If hImageGray <> 0 Then
GetObjectAPI hImageGray, Len(tBitmap), tBitmap
' bla bla bla bla.....
........
DeleteObject hImageGray

' I think that this DeleteObject could be cleared since bitmap
' would have to be destroyed when Set picTemp = Nothing,
' but by the doubts that Bill has forgotten to him.... Smile | :)

End If
Set picTemp = Nothing


This works excellent.

Mike_spice, when I discovered the solution jumped in a leg. I hope that it serves so much to you as it served my, since in my case, it had a ActiveX and it was already thinking the revolting thing that it would be to distribute bitmap along with the OCX .

MrSparc.
GeneralAdding Rows in DataGrid Pin
Creative Vision12-Aug-02 2:05
sussCreative Vision12-Aug-02 2:05 
QuestionHow to delete an object from DC Pin
mirano11-Aug-02 22:30
mirano11-Aug-02 22:30 
AnswerRe: How to delete an object from DC Pin
Anonymous12-Aug-02 4:20
Anonymous12-Aug-02 4:20 
QuestionHow the virtual functions in VB.NET are called? Pin
Vasek11-Aug-02 20:51
Vasek11-Aug-02 20:51 
AnswerRe: How the virtual functions in VB.NET are called? Pin
Kevin McFarlane16-Aug-02 10:23
Kevin McFarlane16-Aug-02 10:23 
GeneralOverride events in TreeView Pin
Knappen8-Aug-02 20:39
Knappen8-Aug-02 20:39 
GeneralRe: Override events in TreeView -solved Pin
Knappen10-Aug-02 5:25
Knappen10-Aug-02 5:25 
GeneralProblem whith System.Windows.Forms.Keys.Return Pin
Knappen8-Aug-02 11:20
Knappen8-Aug-02 11:20 
GeneralRe: Problem whith System.Windows.Forms.Keys.Return Pin
David Wengier11-Aug-02 16:18
David Wengier11-Aug-02 16:18 
GeneralInsert a [Enter] in a String Pin
Knappen8-Aug-02 10:52
Knappen8-Aug-02 10:52 
GeneralRe: Insert a [Enter] in a String Pin
Nick Parker8-Aug-02 11:47
protectorNick Parker8-Aug-02 11:47 
GeneralRe: Insert a [Enter] in a String Pin
Knappen8-Aug-02 16:56
Knappen8-Aug-02 16:56 
GeneralRe: Insert a [Enter] in a String Pin
Anbuselvan8-Aug-02 17:48
Anbuselvan8-Aug-02 17:48 
GeneralRe: Insert a [Enter] in a String Pin
Anonymous9-Aug-02 8:50
Anonymous9-Aug-02 8:50 
GeneralRe: Insert a [Enter] in a String Pin
Knappen9-Aug-02 9:27
Knappen9-Aug-02 9:27 
QuestionVBScript keyCode constants?? Pin
Roman Nurik8-Aug-02 8:54
Roman Nurik8-Aug-02 8:54 
GeneralActiveX component can't create object Pin
Anbuselvan7-Aug-02 19:47
Anbuselvan7-Aug-02 19:47 

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.