all about using resources in your program
all about using resources in your program
Rate all about using resources in your program
(2(2 Vote))
'To load Bitmap Resource
LoadResPicture(101, vbResBitmap)
'To Load Cursor Resource
LoadResPicture(101, vbResCursor)
'To Load Icon Resource
LoadResPicture(101, vbResIcon)
'Example add a CommandButton to you form add an image to your Resource.
Private Sub Command1_Click()
Command1.Picture = LoadResPicture(101, vbResBitmap)
End Sub
'Using the String Table Resource
'Enter your string and to load it
Text1.Text = LoadResString(101)
'A CUSTOM text resource
'You Need A textbox and a text file for a CUSTOM Resource
'to print all the text to textbox
Dim txt As String
txt = LoadResData(101, "CUSTOM")
txt = StrConv(txt, vbUnicode)
Text1.Text = txt
'To display a certain line and not all
Dim txt As String
txt = LoadResData(101, "CUSTOM")
txt = StrConv(txt, vbUnicode)
lines = Split(txt, vbCrLf)
Text1.Text = lines(1) 'This displays the second line
'To extract a Resource
Dim File As Integer
Dim Data() As Byte
Data = LoadResData(101, "CUSTOM")
File = FreeFile
Open "C:\FileName.ext" For Binary As #File 'example FileName.exe,txt,ico or what ever type of file it is.
Put #File, 1, Data()
Close #File
Erase Data
all about using resources in your program Comments
No comments yet — be the first to post one!
Post a Comment