|
Hi, I have a main form and I open a child form containing an axwindowsmediaplayer, a picturebox and some user controls that are in a dll. I want to make this child form an EXE file with all the music files, images or dlls embedded in the exe. Is this possible? In a quick way or it will take some time to do? if there were some libraries that do this quick please give me a help with this? |
| celobateira Monday, October 12, 2009 3:31 PM |
Hi, To create exe file at run time , you might need to use CodeDom. The source code of the childform is required, for more information about codeDom , please take a look at the documentation: http://msdn.microsoft.com/en-us/library/y2k85ax6.aspxHarry
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - Marked As Answer bycelobateira Monday, October 19, 2009 12:19 PM
-
|
| Harry Zhu Monday, October 19, 2009 8:10 AM |
Sounds like you need resource files. They allow you to embed other files into your application. Here is a link for more information; http://msdn.microsoft.com/en-us/library/7k989cfy(VS.80).aspxHope this helps. www.insteptech.com ;
msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS! |
| DeborahK Monday, October 12, 2009 9:31 PM |
Thanx for the help DeborahK, I'll try to make this one step at a time 1st - the axwindowsmediaplayer as an URL property like "c:\documents\something.avi". How do I put it as a resource? Then I must solve the picturebox problem 2nd- how I put the usercontrols as a resource...they are in dll files 3rd - How can I generate the all form into an exe, and how the new exe will access the resource files? Sorry but this is a bit complicated to me now. If you could give me examples I'd be apreciated
|
| celobateira Monday, October 12, 2009 10:01 PM |
I don't think that you can put user controls into a resource file. If you are building a WinForms application, it will compile into an EXE. If you embed the resources as per the link I provided, those will be included in the EXE. You will still have external DLLs for your user controls. Did you read through and try out the information from the link I provided? www.insteptech.com ;
msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS! |
| DeborahK Monday, October 12, 2009 10:10 PM |
I read and I don't think I can manage to achive what I'm trying to do... At runtime, I have a mainform and a childform that is shown when I select some option. I'm trying to export that childform into an exe file so I can execute outside my application.. so at runtime I want to create an exe file |
| celobateira Monday, October 12, 2009 11:37 PM |
Hi, To create exe file at run time , you might need to use CodeDom. The source code of the childform is required, for more information about codeDom , please take a look at the documentation: http://msdn.microsoft.com/en-us/library/y2k85ax6.aspxHarry
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - Marked As Answer bycelobateira Monday, October 19, 2009 12:19 PM
-
|
| Harry Zhu Monday, October 19, 2009 8:10 AM |
Thanx for the reply Harry, I've search a while and I found the best way to do it is by CodeDom indeed |
| celobateira Monday, October 19, 2009 12:19 PM |