Click here to Skip to main content
15,913,773 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Clean Build Pin
jholt1-Sep-03 9:41
jholt1-Sep-03 9:41 
GeneralTrigger a Windows Form Notification Pin
su_see31-Aug-03 8:08
su_see31-Aug-03 8:08 
GeneralProblem In Msgbox And InputBox Pin
Meysam Khayatan30-Aug-03 8:59
Meysam Khayatan30-Aug-03 8:59 
GeneralRe: Problem In Msgbox And InputBox Pin
Hesham Amin30-Aug-03 20:49
Hesham Amin30-Aug-03 20:49 
GeneralRe: Problem In Msgbox And InputBox Pin
Dave Kreskowiak3-Sep-03 17:27
mveDave Kreskowiak3-Sep-03 17:27 
GeneralMAJOR PROJECT Pin
IT_student30-Aug-03 0:29
IT_student30-Aug-03 0:29 
Generalsaving icon to hard drive Pin
pnpfriend29-Aug-03 6:57
pnpfriend29-Aug-03 6:57 
Generalgetting icon location Pin
pnpfriend29-Aug-03 2:48
pnpfriend29-Aug-03 2:48 
Hello.. all
I used outlook to get the messages (mailItem) and then get the file attachments by calling

mailItem.attachments.attachment

So far no problem.. I got the attachment file name. still no error..
Here the problem come..
how to get the attachment icon?? I used the following code (SHGetFileInfo) to get the file attachment icon location
so I can print the file attachment name with its associate icon on the paper ( same as printing from the printer) using HTML Code

for example:
 str = "<img src=""c:\this\is\icon\location\attachmentIcon.ico""><br>"_<br />
& aAttachment.Name


here is my code to get the icon location... This code doesn't work as I want ( I want to get the directory of the image of icon or attachment icon and put it in the html code)

<br />
Dim loc As String<br />
        'Use this to get the small icon.<br />
        Dim fName As String      'The file name to get the icon from.<br />
        Dim shinfo As SHFILEINFO<br />
        shinfo = New SHFILEINFO<br />
        Dim openFileDialog1 As OpenFileDialog<br />
        openFileDialog1 = New OpenFileDialog<br />
<br />
        Dim hImgSmall As IntPtr  'The handle to the system image list.<br />
<br />
        hImgSmall = SHGetFileInfo(aAttachment.Name, 0, shinfo, Marshal.SizeOf(shinfo), _<br />
            SHGFI_ICON Or SHGFI_SMALLICON)<br />
<br />
<br />
        loc = "<img src=""" & shinfo.szDisplayName & """><br>" & filename<br />


Thank You
GeneralRandom Number Maths Quiz Pin
Alvin Wong29-Aug-03 1:50
Alvin Wong29-Aug-03 1:50 
GeneralRe: Random Number Maths Quiz Pin
Corinna John1-Sep-03 3:18
Corinna John1-Sep-03 3:18 
GeneralRe: Random Number Maths Quiz Pin
Corinna John1-Sep-03 6:16
Corinna John1-Sep-03 6:16 
QuestionHow do I check if a registry entry exists in the windows registry. Pin
Simon_22117528-Aug-03 19:08
Simon_22117528-Aug-03 19:08 
AnswerRe: How do I check if a registry entry exists in the windows registry. Pin
Dave Kreskowiak29-Aug-03 4:54
mveDave Kreskowiak29-Aug-03 4:54 
QuestionHow do I export a registry hive? Pin
wobblervb28-Aug-03 16:24
wobblervb28-Aug-03 16:24 
AnswerRe: How do I export a registry hive? Pin
Dave Kreskowiak29-Aug-03 9:10
mveDave Kreskowiak29-Aug-03 9:10 
GeneralXP Accelerators and Focus Rects Pin
Punchinello28-Aug-03 4:00
Punchinello28-Aug-03 4:00 
GeneralRe: XP Accelerators and Focus Rects Pin
Dave Kreskowiak28-Aug-03 8:24
mveDave Kreskowiak28-Aug-03 8:24 
GeneralRe: XP Accelerators and Focus Rects Pin
Punchinello28-Aug-03 8:52
Punchinello28-Aug-03 8:52 
GeneralRe: XP Accelerators and Focus Rects Pin
Dave Kreskowiak28-Aug-03 9:57
mveDave Kreskowiak28-Aug-03 9:57 
GeneralRe: XP Accelerators and Focus Rects Pin
Punchinello28-Aug-03 11:18
Punchinello28-Aug-03 11:18 
GeneralRe: XP Accelerators and Focus Rects Pin
J. Dunlap28-Aug-03 11:21
J. Dunlap28-Aug-03 11:21 
GeneralRe: XP Accelerators and Focus Rects Pin
Punchinello28-Aug-03 11:47
Punchinello28-Aug-03 11:47 
GeneralGranting &quot;Logon As Service Rights&quot; Pin
alunboyd28-Aug-03 3:09
alunboyd28-Aug-03 3:09 
GeneralRe: Granting &quot;Logon As Service Rights&quot; Pin
Dave Kreskowiak28-Aug-03 8:27
mveDave Kreskowiak28-Aug-03 8:27 
GeneralRe: Granting &quot;Logon As Service Rights&quot; Pin
alunboyd28-Aug-03 12:46
alunboyd28-Aug-03 12:46 

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.