2

imagelistコントロール内にいくつかの画像を含むVB6.0アプリケーションがあります。これらの画像がシステムのどこに保存されているか知りたい(これらの画像を別のアプリケーションで使用したいので、システムに画像を個別に持っていないため)したがって、唯一の方法はVisualbasic6.0プロジェクトから画像を取得することです。.Netに似たリソースフォルダのようなものはありますか?

すぐに知らせてください。

ありがとうルパ

4

3 に答える 3

6
  • 空のプロジェクトを開始します。
  • 参照を追加 (Ctrl+T)Microsoft Windows Common Controls 5.0 or 6.0
  • 画像リスト コントロールのコピー/貼り付け先Form1
  • イメージ リスト コントロールの名前を次のように変更します。ImageList1

このコードを使用

Dim lIdx As Long

For lIdx = 1 To ImageList1.ListImages.Count
    SavePicture ImageList1.ListImages(lIdx).Picture, "C:\TEMP\img" & lIdx & ".bmp"
Next
于 2010-11-01T14:55:27.320 に答える
1

少し前に同じ問題に遭遇しました。イメージリスト内の各イメージを「手動で」ディスクに保存するイメージリストを使用して、小さな関数をフォームに記述しました。

于 2010-10-31T17:42:40.687 に答える
0
' utility to save images from a VB6 imagelist - example ExtractVB6ImageListImages(ImageListModes,"ImageListModes")
Function ExtractVB6ImageListImages(myimagelist As ImageList, listname As String)
    Dim nCount As Integer
    Dim nIndex As Integer
    Dim sKey As String

    Dim temp As Image

    nCount = myimagelist.ListImages.count()
    For nIndex = 1 To nCount
        If nIndex < 10 Then
            SavePicture myimagelist.ListImages(nIndex).Picture, listname + "00" + Mid(Str(nIndex), 2) + ".bmp"
        ElseIf nIndex < 100 Then
            SavePicture myimagelist.ListImages(nIndex).Picture, listname + "0" + Mid(Str(nIndex), 2) + ".bmp"
        Else
            SavePicture myimagelist.ListImages(nIndex).Picture, listname + Mid(Str(nIndex), 2) + ".bmp"
        End If

    Next

End Function
于 2012-01-31T19:39:56.947 に答える