Alright, I'm creating a program, and using Custom Resources to make my .exe file and not have all my source files (for example .swf, or image or courses) in the main folder. There actually in the .exe when it is created.
The program when it is run, well Create the file needed to run (for my its the .swf) inside the folder that the .exe is in.
With this code:
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- LoadDataIntoFile 101, App.Path & "\flash.swf"
- swFlashl.Movie = App.Path & "\flash.swf"
- End Sub
- Public Sub LoadDataIntoFile(DataName As Integer, FileName As String)
- Dim myArray() As Byte
- Dim myFile As Long
- If Dir(FileName) = "" Then
- myArray = LoadResData(101, "FLASH")
- myFile = FreeFile
- Open FileName For Binary Access Write As #myFile
- Put #myFile, , myArray
- Close #myFile
- End If
- End Sub
What Im trying to do is either make the file Hidden on Creation, And Put the File Back into the Resource so once the .exe is closed the file is inaccessible.
(If your wondering what Im talking about when Im saying Resources Editor, you can access it by doing the following: Go the Menu Item called Add-Ins > Add in Manager : Then look for this VB 6 Resource Editor and check Loaded/Unloaded and press ok.
(if you want more info PM me, and Ill help you out)
Anyways thats what Im looking for, how to reload data into the Resource area.
My reason is that the flash saves data in itself, and if I can reload the flash into the exe at the end of the exe then it makes for cleaner programming and the source files are always going to be hidden.
(Plus this could benefit if you do an options Form, you can save the values in a txt file and then have the txt file reloaded into your program when it is done (or you click ok))
Anyways any help is greatly appreciated. :)