' Это для jpg, gif, для bmp можно проще... Я думаю bmp из ресурсов загрузить под силу каждому Private Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long Private Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long
Private Function GetJpgPic(ID As String, rType As String) As Picture On Error Resume Next
Dim sPath As String: sPath = GetTempFile
Dim sData() As Byte, nf As Integer sData = LoadResData(ID, rType) nf = FreeFile Open sPath For Binary Access Write As nf Put nf, 1, sData Close nf Set GetJpgPic = LoadPicture(sPath)
Call DeleteFile(sPath) End Function
Private Function GetTempFile() As String Dim sTmpPath As String * &H100, Tmp As Long Call GetTempPath(&H100, sTmpPath) Tmp = InStr(1, sTmpPath, vbNullChar, vbTextCompare) GetTempFile = Left(sTmpPath, Tmp - 1): sTmpPath = Space(&H100)
Call GetTempFileName(GetTempFile, "tmp", 0&, sTmpPath) Tmp = InStr(1, sTmpPath, vbNullChar, vbTextCompare) GetTempFile = Left(sTmpPath, Tmp - 1) End Function
думаю bmp из ресурсов загрузить под силу каждому Private Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (ByVal lpszPath As String, ByVal lpPrefixString As String, ByVal wUnique As Long, ByVal lpTempFileName As String) As Long Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long Private Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long
Private Function GetJpgPic(ID As String, rType As String) As Picture On Error Resume Next
Dim sPath As String: sPath = GetTempFile
Dim sData() As Byte, nf As Integer sData = LoadResData(ID, rType) nf = FreeFile Open sPath For Binary Access Write As nf Put nf, 1, sData Close nf Set GetJpgPic = LoadPicture(sPath)
Call DeleteFile(sPath) End Function
Private Function GetTempFile() As String Dim sTmpPath As String * &H100, Tmp As Long Call GetTempPath(&H100, sTmpPath) Tmp = InStr(1, sTmpPath, vbNullChar, vbTextCompare) GetTempFile = Left(sTmpPath, Tmp - 1): sTmpPath = Space(&H100)
Call GetTempFileName(GetTempFile, "tmp", 0&, sTmpPath) Tmp = InStr(1, sTmpPath, vbNullChar, vbTextCompare) GetTempFile = Left(sTmpPath, Tmp - 1) End Function
Уууу, да, засада Неет не знаю, в свое время хотел найти формат RES файла, но это так и осталось желанием Люди может действительно у кого есть работа с RES файлами, было бы не плохо...
Я знаю где скачать, на сайте: "Визуал Бейсик не для чайников" (поищи в яндексе), там есть пример использования скинов, где скины выполнены ввиде РЕС файлов.Сейчас поищу...