Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. getting icon location

getting icon location

Scheduled Pinned Locked Moved Visual Basic
helptutorialhtmlquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pnpfriend
    wrote on last edited by
    #1

    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 = " "_ & 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) Dim loc As String 'Use this to get the small icon. Dim fName As String 'The file name to get the icon from. Dim shinfo As SHFILEINFO shinfo = New SHFILEINFO Dim openFileDialog1 As OpenFileDialog openFileDialog1 = New OpenFileDialog Dim hImgSmall As IntPtr 'The handle to the system image list. hImgSmall = SHGetFileInfo(aAttachment.Name, 0, shinfo, Marshal.SizeOf(shinfo), _ SHGFI_ICON Or SHGFI_SMALLICON) loc = " " & filename Thank You

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups