기타 [vb.net] 리소스(Resources) 파일로 저장하기
페이지 정보
본문
Dim resSet As Resources.ResourceSet = My.Resources.ResourceManager.GetResourceSet(Globalization.CultureInfo.InvariantCulture, True, False)
For Each de As DictionaryEntry In resSet
Dim key As String = de.Key
If key.IndexOf("_") = 0 Then key = key.Substring(1)
Dim fPath As String = String.Concat(MyDocuments, Application.ProductName, "\User Data\", key)
If Not System.IO.File.Exists(fPath) Then
Dim O As Object = My.Resources.ResourceManager.GetObject(de.Key)
Select Case My.Resources.ResourceManager.GetObject(de.Key).GetType
Case GetType(System.String)
Case GetType(System.Drawing.Icon)
Case Else
Dim B() As Byte = O '// System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(de.Key)
Dim ResourceFile As New System.IO.FileStream(String.Concat(MyDocuments, Application.ProductName, "\User Data\", key), IO.FileMode.Create)
ResourceFile.Write(B, 0, B.Length - 1)
ResourceFile.Flush()
ResourceFile.Close()
End Select
End If
Next
- 이전글[vb.net] 집(zip)파일 압축풀기/압축하기 20.05.06
- 다음글[vb.net] 클립보드(Clipboard)의 HTML 가져오기 및 HTML 쓰기 20.05.06
댓글목록
등록된 댓글이 없습니다.