quote:
Originally posted by Matty
RE: Permission To Capture A Screenie
quoteriginally posted by LipoToid
Hello,
Could someone point me to the location where the messenger plus! ( .ico ) file is located. It will be used for this ADFT application within the Tree Cntrl for navigating the nodes within this app for Messenge Plus!.
Respectfully,
LipoToid
quoteriginally posted by CookieRevised
For the Messenger Plus! forum this icon is found here:
http://shoutbox.menthix.net/favicon.ico
code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub Form_Load()
DownloadFile "http://shoutbox.menthix.net/favicon.ico", "c:\favicon.ico"
ImageList1.ListImages.Add 1, , LoadPicture("C:\favicon.ico")
TreeView1.ImageList = ImageList1
TreeView1.Nodes.Add , , , "Messenger Plus!", 1
Kill "C:\favicon.ico"
End Sub
You might want to add some error trapping in there as well just incase one of the servers you're accessing are down.. infact why not just download the .ico images and add them into the application resources?
Error Trapping code:
Try
<<insert code here that you would like to happen>>
Catch ex As Exception
<<insert code here that happens when an error occurs>>
<< ex.message = string of the error that occured>>
End Try