Quote:
Originally Posted by Byak@
get the icon from exe?
|
Like this, which only works in .NET 2.0 or later and only on the desktop. Obj1 is a Door library Object.
Code:
Obj1.New1(False)
' create a new empty Icon
Obj1.CreateNew("System.Drawing.Icon" & Obj1.System_Drawing)
' get an Icon from a file
Obj1.Value = Obj1.RunMethod2("ExtractAssociatedIcon","C:\WINDOWS\system32\notepad.exe", "System.String")
' add it to an ControlsExDesktop IconList
IconList.AddIcon(Obj1.Value)
' or turn it into a bitmap
Image1.Image = Obj1.RunMethod("ToBitmap")
' alternatively
Image1.Image = IconList.ItemBitmap(0)