|
You could load the dll into another appdomain, extract the image, then unload the appdomain.
only two letters away from being an asset
|
|
|
|
|
Yeah, I was thinking along those lines, but one of my issues is *speed*. I'm starting to think there's no way of doing it fast, if the images live in the one dll.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I've used the technique before and seemed to be fine, no excess speed issues. Though I wasn't loading large images either. The only hang up was marshalling some data across the appdomains.
only two letters away from being an asset
|
|
|
|
|
OK - thanks. I will give that a try.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Do you have the option of using a resource editor to export the images you need to build into another .DLL?
|
|
|
|
|
Right now, the images are in a seperate dll, I can reorganise them however I like. Making the images secure is a concern, however, so I can't just have a folder full of jpgs and load from the HDD.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian,
if you only need a small fraction of the available images at any point in time,
I would avoid putting them all together in one big file (such as a DLL);
I would go for a kind of index file, and a number of smaller files.
if security and performance are a concern, how about putting all (or a number of)
images as separate files into a password protected ZIP file ?
Hope this helps.
|
|
|
|
|
Don't I need a third party library to open a password protected zip ?
Yeah, I am starting to think about having lots of resource files, and zips had crossed my mind, as a possible solution.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Don't I need a third party library to open a password protected zip ?
The most recent discussion thread of Valen's article[^] confirms and discusses that;
CodeProject seems to hold solutions like this one.[^]
|
|
|
|
|
Christian Graus wrote: Yeah, I am starting to think about having lots of resource files,
That's what I was thinking about. Not really ZIP's because the images are probably already compressed. Encrypting them will only make it harder to compress further. But encrypting the images in a library of resource DLL's would probably work for you. Encryption would add a bit of an overhead to retrieving an image, but I guess that could be solved by an internal caching scheme in a custom resource manager.
|
|
|
|
|
Hello, I want to run some Installers from my App, but I´m getting some trouble when I use WaitForExit(); cause I want to finish each task before the next one is executed, actually it executes all the process at the same time. here is the example:
System.Diagnostics.Process p1 = new System.Diagnostics.Process();
System.Diagnostics.Process p2 = new System.Diagnostics.Process();
System.Diagnostics.Process p3 = new System.Diagnostics.Process();
p1.StartInfo.FileName = path2;
p1.Start();
p1.WaitForExit();
p1.Close();
p2.StartInfo.FileName = path3;
p2.Start();
p2.WaitForExit();
p2.Close();
p3.StartInfo.FileName = path4;
p3.Start();
p3.WaitForExit();
p3.Close();
Thank you in advance!!!
Ing. José Guzmán
|
|
|
|
|
I have no experience with installer, but I often use the Process class and
your code seems OK.
So my best guess is the "installer" you launch is just an empty process
(maybe a batch file?) that on its turn launches the real installer and does
NOT wait for it...
You might check this by comparing the path you start, and the process path
that gets shown by the task manager while the installer is actually working.
Hope this helps.
|
|
|
|
|
The problem is that MSIEXEC (.MSI installations) can launch multiple instances of MSIEXEC, with the original instance quitting some time after it starts. I think you might want to watch your installations and examine the Process tab in Task Manager to watch what happens during the install. You may be able to get away with watching for all instances of msiexec to quit before you go to the next installer.
|
|
|
|
|
HI
another Q
when i run the app(it only has a web browser)
i get an dialog of open save cancel
can i get ride of him
and auto present the ppt
TNKS
kobkob
|
|
|
|
|
I strongly suggest you read some of the WebBrowser documentation; your question
is on navigation. There are both methods and properties for that.
|
|
|
|
|
THNKS
;P;P
kobkob
|
|
|
|
|
HI
i have a web browser
can i hide the scroll bar of the web browser control???
does it has a property???
kobkob
|
|
|
|
|
If that is a WebBrowser object, look at the public properties of that class.
MSDN is the prime source of information once you know what class to use.
|
|
|
|
|
ye
i did it already
and found out there is a Scrollbar ON/OFF property
but even when i set the value to false
it's still show me the scrool bar!!!!(runtime only)
i have opend a one slide only PPT to the web browser(could that be the problem.
kobkob
|
|
|
|
|
Sorry I cant tell, I never used the WebBrowser class, and I used the shdocvw stuff
for many things (including Word) but not PowerPoint. Anyhow, in my application
I do want scroll bars...
|
|
|
|
|
Hello,
My program creates several notifyicons and displays them in system tray. If the application exists without disposing those icons then you need to hover by mouse to make them disappear. I tried to refresh system tray by sending WM_PAINT message to system tray just before exiting but it only works if there is one icon. What can I do to solve this problem? Are there any other ways?
|
|
|
|
|
Hi Giorgi,
I know the phenomenon, and I havent found any cure yet. My best guess is you would
have to send some message to each individual icon in the notification area.
You can aleviate the problem by increasing the chance the icons get disposed of
(e.g. in a finally block in Main) but you cant stop them piling up while debugging
and aborting in Visual Studio !
|
|
|
|
|
|
Thanks for the reply. Actually I have found an article about it here: http://www.codeproject.com/tools/ShellTrayInfo.asp but it will take quite some time and effort to convert it to c# so I'd like to find either easier way or another kind of workaround.
As for visual studio, if visual studio can't do it will we be able to do that then?
|
|
|
|
|
Thanks for the link, it will certainly allow me to create clean-up code; the
main problem remaining is when to run such code. Here are current ideas:
1. periodically, as a service; disadvantage is icon area changes independent of
user actions
2. a .NET app that is going to use a notifyicon could first try and remove
same icon(s); that solves the Visual Studio debug pile up.
I guess I'll go for 2; if it looks OK I'll probably write an article...
Giorgi Dalakishvili wrote: As for visual studio, if visual studio can't do it will we be able to do that then?
I dont think they are interested in such details, it wont make them sell
more software ...
|
|
|
|