473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

VB6 - Programing with Resources Editor.

4
If there is anyone with lots of experience in programming with the program you may be able to answer my question :P


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
  1. Private Sub Form_Load()
  2.     LoadDataIntoFile 101, App.Path & "\flash.swf"
  3.     swFlashl.Movie = App.Path & "\flash.swf"
  4. End Sub
  5.  
  6.  
  7. Public Sub LoadDataIntoFile(DataName As Integer, FileName As String)
  8.     Dim myArray() As Byte
  9.     Dim myFile As Long
  10.     If Dir(FileName) = "" Then
  11.         myArray = LoadResData(101, "FLASH")
  12.         myFile = FreeFile
  13.         Open FileName For Binary Access Write As #myFile
  14.         Put #myFile, , myArray
  15.         Close #myFile
  16.     End If
  17. End Sub
  18.  
This works perfectly.

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. :)
Mar 25 '06 #1
3 5883
Nmixer
4
daily bump
Mar 26 '06 #2
Banfa
9,065 Expert Mod 8TB
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.
To do this you would actually be modifying the executable file itself. This is impossible because while executing an executable is locked (which you can easily test for you self by running a program and while it is running trying to delete it, you wont be able to) and you can not write to the file.

Resourses are really for carrying data that is static and never going to change like splash screen bitmaps, dialogue box layouts, menu and button text, not the data files for a program.

If you are really worried about other people accessing the data files for your program and stealing the data then encrypt them.
Mar 26 '06 #3
Nmixer
4
That makes sence. Thank you, now i can move on :p


To do this you would actually be modifying the executable file itself. This is impossible because while executing an executable is locked (which you can easily test for you self by running a program and while it is running trying to delete it, you wont be able to) and you can not write to the file.

Resourses are really for carrying data that is static and never going to change like splash screen bitmaps, dialogue box layouts, menu and button text, not the data files for a program.

If you are really worried about other people accessing the data files for your program and stealing the data then encrypt them.
Mar 26 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Stephen Tyndall | last post by:
I'm not sure whether this counts as off-topic, but here's a huge list of books about C++ that I've found highly recommended (kind of slanted towards game programming because that's what I'm looking...
3
by: Saradhi | last post by:
How to get the names of all the Resources embedded in a Resource File? -SARADHI
13
by: Xah Lee | last post by:
there's this one i can't figure out. I'm trying to kick out image.google.com's top frame when it goes to my page. If you go to http://images.google.com/images?q=milk+tits click on the page...
12
by: Xah Lee | last post by:
Frameset Infinity! http://xahlee.org/js/frame2/frameset.html HTML Frame tutorial + Infinity! http://xahlee.org/js/frame/0.html Xah xah@xahlee.org ∑ http://xahlee.org/
0
by: Aleksey Tkachenko | last post by:
Hi All, How to compile the assembly dll to make the embedded resources ( icons ) accessible by ID number? I have one icon compiled with "embedded resource" option, but when I open the dll by VS...
4
by: David | last post by:
I am using My.Resources (VS2005) to build all messages that my application displays to the user. Often I like to embed a new line character in the middle of the string to make it more readable....
12
by: Xah Lee | last post by:
Of Interest: Introduction to 3D Graphics Programing http://xahlee.org/3d/index.html Currently, this introduction introduces you to the graphics format of Mathematica, and two Java Applet...
15
by: Xah Lee | last post by:
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs....
6
by: GAZ | last post by:
Hello all, I'd like to know is there a resource editor one could use to create another localised version of Resources.resx? Winres.exe does not work. It reports tons of errors when I try to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.