473,395 Members | 1,616 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,395 software developers and data experts.

Dll files

MAK
Hello everyone,
I know how to add images and icons etc to dll file.
What I would like to know is there is a way to add those icons on the forms
during the run time from the dll or to reference it to the dll during the
design time, then when I compile the project and install it, then all the
images still inside the dll file. not to be installed into winnet, or system
or system32 or any directory,
1) is it possible ? and how ? link or examples
2)do I need to open the dll file and save it as a resource then add it to my
project ?
3)add it as *.res file or what?

Any help will be appreciated , I'm using VB5 or VB6 o/s XP.

MAK
Jul 17 '05 #1
7 5621
Are you looking for a way to insert your own icons into a created .dll file
-OR-
are you trying to have several images/icons available to your program during
execution
-OR-
are you just trying to have a nice little icon in the top left of each form
(on the title bar)
?

The second and third are easy, the first one I don't have clue about.
Please elaborate.

Tom

"MAK" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
Hello everyone,
I know how to add images and icons etc to dll file.
What I would like to know is there is a way to add those icons on the forms during the run time from the dll or to reference it to the dll during the
design time, then when I compile the project and install it, then all the
images still inside the dll file. not to be installed into winnet, or system or system32 or any directory,
1) is it possible ? and how ? link or examples
2)do I need to open the dll file and save it as a resource then add it to my project ?
3)add it as *.res file or what?

Any help will be appreciated , I'm using VB5 or VB6 o/s XP.

MAK

Jul 17 '05 #2
MAK
Thanks Kiteman,
The second option what I'm looking for the first and last I can mange them.
Would you have an example or code or link to explore such methodology?

Thanks

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:odayb.526777$9l5.77702@pd7tw2no...
Are you looking for a way to insert your own icons into a created .dll file -OR-
are you trying to have several images/icons available to your program during execution
-OR-
are you just trying to have a nice little icon in the top left of each form (on the title bar)
?

The second and third are easy, the first one I don't have clue about.
Please elaborate.

Tom

"MAK" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
Hello everyone,
I know how to add images and icons etc to dll file.
What I would like to know is there is a way to add those icons on the forms
during the run time from the dll or to reference it to the dll during the design time, then when I compile the project and install it, then all the images still inside the dll file. not to be installed into winnet, or

system
or system32 or any directory,
1) is it possible ? and how ? link or examples
2)do I need to open the dll file and save it as a resource then add it

to my
project ?
3)add it as *.res file or what?

Any help will be appreciated , I'm using VB5 or VB6 o/s XP.

MAK


Jul 17 '05 #3
Hello Mak.

If you create a number of image controls at design time and place the
graphics in them, the images are saved within the executable. You can set
the Visible property to False at design time and have them appear by
changing this property during run time. You can hold bmp, jpg, gif, ico,
and wmf files within the Image control.

You could alternately create a big non-displaying form as a placeholder for
all your graphics and just have the required picture copy to your displayed
form upon code request.

eg.
frmMain.Image1.Picture = frmPlaceHolder.Image7.Picture

would have your Image1 control on your frmMain now contain the contents of
the Image7 control on your non-displaying frmPlaceHolder form. Remember
that you can add code to adjust Stretch, Placement and Size.

Is this as much detail as you require?

Tom

"MAK" <Ma********@comcast.net> wrote in message
news:X7********************@comcast.com...
Thanks Kiteman,
The second option what I'm looking for the first and last I can mange them. Would you have an example or code or link to explore such methodology?

Thanks

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:odayb.526777$9l5.77702@pd7tw2no...
Are you looking for a way to insert your own icons into a created .dll

file
-OR-
are you trying to have several images/icons available to your program

during
execution
-OR-
are you just trying to have a nice little icon in the top left of each

form
(on the title bar)
?

The second and third are easy, the first one I don't have clue about.
Please elaborate.

Tom

"MAK" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
Hello everyone,
I know how to add images and icons etc to dll file.
What I would like to know is there is a way to add those icons on the

forms
during the run time from the dll or to reference it to the dll during the design time, then when I compile the project and install it, then all the images still inside the dll file. not to be installed into winnet, or

system
or system32 or any directory,
1) is it possible ? and how ? link or examples
2)do I need to open the dll file and save it as a resource then add it

to

Jul 17 '05 #4
MAK
Hello Tom,
First Thanks a lot for your quick answers, and help , I deeply appreciated.
Second, I failed to say in my first post "any images", animated or not
animated and icons.

During the development of such project, forms some images which I used are
imbedded by ocx to place them on the form. Once project completed. and,
During packaging and create the installation setup.exe it will gather all
the images, and as you know I have the choice to change the insulation
directory during creating such package, and cab file.

As you know, during the installation on another machine such images must be
added back to the same exact reference directory which were chosen during
the packaging, if I delete them or move them from the referenced directory
the project still working but without the animation on such form.

This is the reason why I'm asking about using "a dynamic link library(Dll)
along with my setup.exe to be used for my images to avoid user from deleting
such images. I used this methodology with AutoCAD and successfully used the
dll with the AutoCAD tool bar menu, it was easy for me because I writ lisp/
dcl routine for AutoCAD. But not easy in this stage as implementation to do
it in VB for this portion I'm looking for help.

Sorry for my bad second language, I did not mean mislead you, but my be you
will find a link or tutorial which may lead to a resolution. I'm sure it is
there I'm still looking. Also if you come across any thing to allow encrypt
*.mdb file and decrypt, will be great... appreciated.

MAK

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:otfyb.523306$6C4.323108@pd7tw1no...
Hello Mak.

If you create a number of image controls at design time and place the
graphics in them, the images are saved within the executable. You can set the Visible property to False at design time and have them appear by
changing this property during run time. You can hold bmp, jpg, gif, ico,
and wmf files within the Image control.

You could alternately create a big non-displaying form as a placeholder for all your graphics and just have the required picture copy to your displayed form upon code request.

eg.
frmMain.Image1.Picture = frmPlaceHolder.Image7.Picture

would have your Image1 control on your frmMain now contain the contents of
the Image7 control on your non-displaying frmPlaceHolder form. Remember
that you can add code to adjust Stretch, Placement and Size.

Is this as much detail as you require?

Tom

"MAK" <Ma********@comcast.net> wrote in message
news:X7********************@comcast.com...
Thanks Kiteman,
The second option what I'm looking for the first and last I can mange

them.
Would you have an example or code or link to explore such methodology?

Thanks

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:odayb.526777$9l5.77702@pd7tw2no...
Are you looking for a way to insert your own icons into a created .dll

file
-OR-
are you trying to have several images/icons available to your program

during
execution
-OR-
are you just trying to have a nice little icon in the top left of each

form
(on the title bar)
?

The second and third are easy, the first one I don't have clue about.
Please elaborate.

Tom

"MAK" <Ma********@comcast.net> wrote in message
news:7p********************@comcast.com...
> Hello everyone,
> I know how to add images and icons etc to dll file.
> What I would like to know is there is a way to add those icons on the forms
> during the run time from the dll or to reference it to the dll during
the
> design time, then when I compile the project and install it, then
all the
> images still inside the dll file. not to be installed into winnet,
or system
> or system32 or any directory,
> 1) is it possible ? and how ? link or examples
> 2)do I need to open the dll file and save it as a resource then add

it to


Jul 17 '05 #5
My experience with Image controls is that if I place a picture within one,
the control AND its contents are saved within the executable. I have
written a program that has 22 separate forms and any graphic elements
(mostly just .jpg and .wmf files) are fully containted within the single
..exe file. I have also placed .wmf files within the Picture property of a
form (not inside an Image control) and it is also saved within the
executable.

My program in question can be found at
http://members.shaw.ca/kiteman/Downloads.htm
It is the NPW9b Vulture Calculator program. It gives all the steps in
making a (size of your choice) traction kite.

I have never used animated gifs or .avi files so I don't know how they are
handled. If you need to supply your graphics as separate files then you
can place them within the same folder as your .exe and load them with the
App.Path & filename string. I used to require that my end user keep
database files in a specified directory, but since learning about App.Path I
just put everything within the same folder as the .exe and everthing gets
found just nicely.

For Example:

intFileNo = FreeFile
Open App.Path & "\NPW9bStartup.ini" For Input As #intFileNo
' Read in the .ini file contents etc.
Close #intFileNo

This is about as far as I can help with my limited knowledge of VB.

Tom
Hello Tom,
First Thanks a lot for your quick answers, and help , I deeply appreciated. Second, I failed to say in my first post "any images", animated or not
animated and icons.

During the development of such project, forms some images which I used are imbedded by ocx to place them on the form. Once project completed. and,
During packaging and create the installation setup.exe it will gather all
the images, and as you know I have the choice to change the insulation
directory during creating such package, and cab file.

As you know, during the installation on another machine such images must be added back to the same exact reference directory which were chosen during
the packaging, if I delete them or move them from the referenced directory
the project still working but without the animation on such form.
Sorry for my bad second language, I did not mean mislead you, but my be you will find a link or tutorial which may lead to a resolution. I'm sure it is there I'm still looking. Also if you come across any thing to allow encrypt *.mdb file and decrypt, will be great... appreciated.

MAK

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:otfyb.523306$6C4.323108@pd7tw1no...
Hello Mak.

If you create a number of image controls at design time and place the
graphics in them, the images are saved within the executable. You can

set
the Visible property to False at design time and have them appear by
changing this property during run time. You can hold bmp, jpg, gif, ico, and wmf files within the Image control.

You could alternately create a big non-displaying form as a placeholder

for
all your graphics and just have the required picture copy to your

displayed
form upon code request.

eg.
frmMain.Image1.Picture = frmPlaceHolder.Image7.Picture

would have your Image1 control on your frmMain now contain the contents of the Image7 control on your non-displaying frmPlaceHolder form. Remember that you can add code to adjust Stretch, Placement and Size.

Is this as much detail as you require?

Tom

Jul 17 '05 #6
MAK
Tom, nice site can I down load and use the calculator ?

Your information and experience is 100% correct, however based on the two
controls I have for animation, I have to have the path name, directory name,
and file name correct as well as the animated images reside into the
directory if I remove such images I will get blank form with other static
images such icons Jpg, gif , or any control,etc as non animated files. I saw
early your email while I was at work, and I tested my project on three
different computer with the same results No No.

Beside the above, and if I'm not mistaken that The advantage of DLL files is
that, because they don't get loaded into random access memory (RAM) together
with the main program, space is saved in RAM. When and if a DLL file is
needed, then it is loaded and run.
For example, as long as a user of Microsoft Word is editing a document, the
printer DLL file does not need to be loaded into RAM. If the user decides to
print the document, then the Word application causes the printer DLL file to
be loaded and run. When I used this method in AutoCAD I did not have any
smiley faces on my icons any more because I have them all in *.Dll

So , I want to take advantage of such technology for my application, if I
find a way out and how to declare it.

Again thanks for your post. in return if you need a flash or animation logo
to your site I will be happy to help you at no cost.

MAK

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:X0qyb.529310$pl3.472335@pd7tw3no...
My experience with Image controls is that if I place a picture within one,
the control AND its contents are saved within the executable. I have
written a program that has 22 separate forms and any graphic elements
(mostly just .jpg and .wmf files) are fully containted within the single
.exe file. I have also placed .wmf files within the Picture property of a form (not inside an Image control) and it is also saved within the
executable.

My program in question can be found at
http://members.shaw.ca/kiteman/Downloads.htm
It is the NPW9b Vulture Calculator program. It gives all the steps in
making a (size of your choice) traction kite.

I have never used animated gifs or .avi files so I don't know how they are
handled. If you need to supply your graphics as separate files then you
can place them within the same folder as your .exe and load them with the
App.Path & filename string. I used to require that my end user keep
database files in a specified directory, but since learning about App.Path I just put everything within the same folder as the .exe and everthing gets
found just nicely.

For Example:

intFileNo = FreeFile
Open App.Path & "\NPW9bStartup.ini" For Input As #intFileNo
' Read in the .ini file contents etc.
Close #intFileNo

This is about as far as I can help with my limited knowledge of VB.

Tom
Hello Tom,
First Thanks a lot for your quick answers, and help , I deeply appreciated.
Second, I failed to say in my first post "any images", animated or not
animated and icons.

During the development of such project, forms some images which I used

are
imbedded by ocx to place them on the form. Once project completed. and,
During packaging and create the installation setup.exe it will gather all
the images, and as you know I have the choice to change the insulation
directory during creating such package, and cab file.

As you know, during the installation on another machine such images must

be
added back to the same exact reference directory which were chosen during the packaging, if I delete them or move them from the referenced directory the project still working but without the animation on such form.
Sorry for my bad second language, I did not mean mislead you, but my be

you
will find a link or tutorial which may lead to a resolution. I'm sure it

is
there I'm still looking. Also if you come across any thing to allow

encrypt
*.mdb file and decrypt, will be great... appreciated.

MAK

"Kiteman (Canada)" <NO************@shaw.ca> wrote in message
news:otfyb.523306$6C4.323108@pd7tw1no...
Hello Mak.

If you create a number of image controls at design time and place the
graphics in them, the images are saved within the executable. You
can set
the Visible property to False at design time and have them appear by
changing this property during run time. You can hold bmp, jpg, gif, ico, and wmf files within the Image control.

You could alternately create a big non-displaying form as a
placeholder for
all your graphics and just have the required picture copy to your

displayed
form upon code request.

eg.
frmMain.Image1.Picture = frmPlaceHolder.Image7.Picture

would have your Image1 control on your frmMain now contain the

contents of the Image7 control on your non-displaying frmPlaceHolder form. Remember that you can add code to adjust Stretch, Placement and Size.

Is this as much detail as you require?

Tom


Jul 17 '05 #7
Hello MAK.
Tom, nice site can I down load and use the calculator ?
It says free, so, ummm, I guess you can :-)
It's free for anyone. I hate going to sites that say it is a free download
but then they ask for money when you try to install or use the program.
Sure, the download was free, but the program isn't. In my case, it is
free, free, free. If you use the program to build a kite you are only
asked to send me a picture of the finished kite in flight.
Your information and experience is 100% correct, however based on the two
controls I have for animation, I have to have the path name, directory name, and file name correct as well as the animated images reside into the
directory if I remove such images I will get blank form with other static
images such icons Jpg, gif , or any control,etc as non animated files. I saw early your email while I was at work, and I tested my project on three
different computer with the same results No No.
Beside the above, and if I'm not mistaken that The advantage of DLL files is that, because they don't get loaded into random access memory (RAM) together with the main program, space is saved in RAM. When and if a DLL file is
needed, then it is loaded and run.
For example, as long as a user of Microsoft Word is editing a document, the printer DLL file does not need to be loaded into RAM. If the user decides to print the document, then the Word application causes the printer DLL file to be loaded and run. When I used this method in AutoCAD I did not have any
smiley faces on my icons any more because I have them all in *.Dll
I will have to defer to the great minds that contribute here. I am out of
my league now.

"Kiteman (Canada)"wrote in message..
My program in question can be found at
http://members.shaw.ca/kiteman/Downloads.htm
It is the NPW9b Vulture Calculator program. It gives all the steps in
making a (size of your choice) traction kite.

I have never used animated gifs or .avi files so I don't know how they are handled. If you need to supply your graphics as separate files then you can place them within the same folder as your .exe and load them with the App.Path & filename string. I used to require that my end user keep
database files in a specified directory, but since learning about App.Path
I
just put everything within the same folder as the .exe and everthing

gets found just nicely.

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
11
by: ambika | last post by:
Iam just trying to know "c". And I have a small doubt about these header files. The header files just contain the declaration part...Where is the definition for these declarations written??And how...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
0
by: wal | last post by:
How does one attach files to emails using libgmail? The following code http://pramode.net/articles/lfy/fuse/4.txt works fine when said files are simple text files, but it failes as soon as the...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.