Click here to Skip to main content
15,921,837 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: lpCurrentDirectory Pin
Dave Kreskowiak31-May-04 6:39
mveDave Kreskowiak31-May-04 6:39 
GeneralRe: lpCurrentDirectory Pin
soul.ripper31-May-04 9:45
soul.ripper31-May-04 9:45 
GeneralRe: lpCurrentDirectory Pin
Dave Kreskowiak31-May-04 11:11
mveDave Kreskowiak31-May-04 11:11 
GeneralRe: lpCurrentDirectory Pin
soul.ripper31-May-04 11:43
soul.ripper31-May-04 11:43 
GeneralAPI Problem - Get The Icon For Another Window Pin
ColonelSanders30-May-04 15:56
ColonelSanders30-May-04 15:56 
GeneralRe: API Problem - Get The Icon For Another Window Pin
DSclub30-May-04 21:05
DSclub30-May-04 21:05 
GeneralRe: API Problem - Get The Icon For Another Window Pin
Dave Kreskowiak31-May-04 1:05
mveDave Kreskowiak31-May-04 1:05 
GeneralRe: API Problem - Get The Icon For Another Window Pin
ColonelSanders31-May-04 8:38
ColonelSanders31-May-04 8:38 
Thanks for the help, but I think both of you are looking at this the wrong way.

Extractoing icons from the exe would work, but if there was more than one icon I wouldn'y know which to use. The application's icon is not alwayse the window icon.

Shell replacements seem to have no problems getting the icon for a running window... The following code is from Soft Shell Logi - a VB6 shell replacement: (Declarations neglected)

<br />
Private Sub DrawIcon(HDC As Long, hwnd As Long, X As Integer, Y As Integer)<br />
    ico = GetIcon(hwnd)<br />
    DrawIconEx HDC, X, Y, ico, 16, 16, 0, 0, DI_NORMAL<br />
End Sub<br />
<br />
Public Function GetIcon(hwnd As Long) As Long<br />
    Call SendMessageTimeout(hwnd, WM_GETICON, 0, 0, 0, 1000, GetIcon)<br />
    If Not CBool(GetIcon) Then GetIcon = GetClassLong(hwnd, GCL_HICONSM)<br />
    If Not CBool(GetIcon) Then Call SendMessageTimeout(hwnd, WM_GETICON, 1, 0, 0, 1000, GetIcon)<br />
    If Not CBool(GetIcon) Then GetIcon = GetClassLong(hwnd, GCL_HICON)<br />
    If Not CBool(GetIcon) Then Call SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, GetIcon)<br />
End Function<br />


Is there a way I can use DrawIcon to draw to a bitmap and create the icon for use in the system tray?
GeneralRe: API Problem - Get The Icon For Another Window Pin
Dave Kreskowiak31-May-04 11:18
mveDave Kreskowiak31-May-04 11:18 
GeneralrtlMoveMemory Dll Call Problem In .NET Pin
Pugman81230-May-04 11:55
Pugman81230-May-04 11:55 
GeneralRe: rtlMoveMemory Dll Call Problem In .NET Pin
Dave Kreskowiak31-May-04 1:03
mveDave Kreskowiak31-May-04 1:03 
QuestionHow can I disable CANCEL box in System.Window.form? Pin
ATC30-May-04 5:43
ATC30-May-04 5:43 
AnswerRe: How can I disable CANCEL box in System.Window.form? Pin
Syed Abdul Khader30-May-04 18:59
Syed Abdul Khader30-May-04 18:59 
GeneralRe: How can I disable CANCEL box in System.Window.form? Pin
ATC31-May-04 8:13
ATC31-May-04 8:13 
Generalanswer can or cannot Pin
GaryKoh29-May-04 16:12
GaryKoh29-May-04 16:12 
GeneralRe: answer can or cannot Pin
Hesham Amin31-May-04 7:33
Hesham Amin31-May-04 7:33 
GeneralRe: answer can or cannot Pin
f6431-May-04 10:05
f6431-May-04 10:05 
GeneralRe: answer can or cannot Pin
GaryKoh31-May-04 14:05
GaryKoh31-May-04 14:05 
General Importing from password protected .xls (I know the password) Pin
GameFaqsPower12329-May-04 9:29
GameFaqsPower12329-May-04 9:29 
GeneralRe: Importing from password protected .xls (I know the password) Pin
Dave Kreskowiak29-May-04 15:15
mveDave Kreskowiak29-May-04 15:15 
Generalconnect to server Pin
GaryKoh28-May-04 21:41
GaryKoh28-May-04 21:41 
GeneralPlugins Pin
beowulfagate28-May-04 14:15
beowulfagate28-May-04 14:15 
GeneralRe: Plugins Pin
Mike Ellison28-May-04 14:43
Mike Ellison28-May-04 14:43 
GeneralRe: Plugins Pin
beowulfagate28-May-04 14:56
beowulfagate28-May-04 14:56 
GeneralWM_GETTEXT from text box. Please Help... Pin
danfloun28-May-04 12:33
danfloun28-May-04 12:33 

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.