|
Hi all,
I needed a little help with running a embedded resource i have a embedded .exe file that i want to execute during the form1_load but i looked everywhere on how to run a embedded resource but all i found was info on loading pictures that are embedded resources. Could anyone help me out please all info is appreciated.
|
|
|
|
|
The last post from Steve Hansen at the bottom of this article[^] shows how to extract and run an embedded exe.
josh
|
|
|
|
|
Thanks for the info i was reading that and it said that it only worked for other .net applications. Is there any other methods i can use to execute a app that is not .net??
|
|
|
|
|
Hi all,
I have a form (we'll call form A) which I need to hide because it takes 4 seconds to load. I have created another splash screen form (Form B) to cover form A and hide it while it is taking it's sweet time being created. I have to create Form B modeless so Form A can continue to initialize. Once Form A is finished I cannot figure out a way to return focus back to Form B which is covering Form A.
Any suggestions???
BTW: This is a continuation of the OPACITY nightmare from yesterday!
|
|
|
|
|
Try to clarify a couple of things:
Cubzfan wrote: I have to create Form B modeless so Form A can continue to initialize.
Have you checked if Form B modeless is necessary for Form A to continue?
Cubzfan wrote: Once Form A is finished I cannot figure out a way to return focus back to Form B which is covering Form A.
Do you mean "Once Form A is finished I cannot figure out a way to return focus back to Form A which is covered by Form B"?
Best,
Jun
|
|
|
|
|
Jun,
Thanks for the reply. Answer to the first question is yes. As I stated, if form B is Modal form A will not be created. Answer to question 2... what I wrote is correct. Form B covers Form A, I've set Form B to "Topmost" so it will reamin on top of form A.
Form B splash is only there to cover Form A while it is being created.
1. Form B comes up first (modeless to allow Form A to continue being created)
2. Form A is initialized and starts to appear behind Form B.
3. Form B has a "Next" button when clicked causes Form B to be destroyed.
4. Form A is the only thing left looking good and ready to go.
Problem is since Form A is created after Form B it has focus and will not give up focus so user can click "Next" button on Form B.
Who's on first???
|
|
|
|
|
It looks good, but I think the Next button is something that causes unnecessary complexity. For example, if Form A is not done initialization, the button has to be disabled. I would just get rid of the button and do the following:
When Form A is created (by Form B or any third party), pass the instance of Form B to Form A. When Form A is done initialization, it closes Form B using its instance.
A slightly different approach is starting Form A first. Let Form A create Form B to cover itself. Then Form A can close Form B whenever it needs to. This would further simplify your design.
This way, there is on focus transfer issue.
Best,
Jun
|
|
|
|
|
Search the articles for "splash screen" and you'll find a bunch of examples of this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
try this:
void InitMethod()
{
Form B = new FormB();
A.Hide();
B.Show();
//Initialization code...
B.Close();
//Carry on with FormA
}
|
|
|
|
|
i have made a program that works as follows
1->i browse some csharp project and open the main .cs file
2->the program compiles that project and reports errors as we compile in .net compiler
i want to make my program work in this order
1)select a project of csharp
2)the program should divide the project into independently compileable parts
3)then it should display a list of those parts
4)on selecting one part it should compile that part
5)then after compiling all parts on selecting one by one it should link all the seperately compiled parts to generate exe and show the output
jadoo
|
|
|
|
|
Why not wait for a reply to your original posting before asking again!!
|
|
|
|
|
Hi:
I am programming in C# and wondering if there is a simple way to have direct communications between 2 programs on the same PC.
Here's the scenario I am thinking of:
1. Program a and program b are installed in a machine
2. progA is launched
3. progA needs some information and launches progB if needed. If progB is already launched, progA does not relaunch progB, but uses the active instance of it.
4. progB provides the information to progA.
5. progB is available for any other program progC etc. that want to call it for information
6. progB terminates only when the machine is rebooted.
I hope my weak terminology is still comprehensible. Please could you give me tips on how to launch progB from other programs and how to leave it on (not be a child of the lauuncher), and how to initate communication with progB if an instance is already running.
Regards, smurfy
|
|
|
|
|
This seems to be a typical multi-process application. I prefer to implement them as server/client.
1) Build Program B as a service on Windows. Program A(or C) can easily check if the service is running. Launch the service if it's not running.
2) Implement an IPC channel between Program B and Program A(or C).
smurfy34 wrote: Please could you give me tips on how to launch progB from other programs and how to leave it on (not be a child of the lauuncher)
Launch Program B as a service or spawn it as a separate process. Either way, Program B will be on even when you close Program A.
smurfy34 wrote: how to initate communication with progB if an instance is already running.
Through IPC, like socket or shared memory.
Best,
Jun
|
|
|
|
|
is it possible to divide a large csharp project into smaller parts (at runtime)that can be compiled independently..........if possible then how to make parts and how to link those compiled parts to generate an exe of the project
jadoo
|
|
|
|
|
I'm not positive, but I think afte the 1st compile, only the changed parts are recompiled on build unless you specifically request a complete rebuild.
|
|
|
|
|
|
i am not using command line i am using the compiler class
|
|
|
|
|
Sorry, I would have replied sooner but I was waiting for you to ask the question again in another post.
Unless you are writing a compiler, ie. re-inventing the wheel, then use what is available. You can invoke the csc.exe program from within your code.
|
|
|
|
|
i am going to implement distributed compilation of csharp project and i cant manage to divide huge project into smaller compileable parts..........i need some help on it...........i have posted it again in detail which is
i have made a program that works as follows
1->i browse some csharp project and open the main .cs file
2->the program compiles that project and reports errors as we compile in .net compiler
i want to make my program work in this order
1)select a project of csharp
2)the program should divide the project into independently compileable parts
3)then it should display a list of those parts
4)on selecting one part it should compile that part
5)then after compiling all parts on selecting one by one it should link all the seperately compiled parts to generate exe and show the output
jaadoo
|
|
|
|
|
Hi guys! Help please I am a newbie in C#, I have been working on an application and was working fine on MS Visual C# .Net and then yesterday I downloaded and started converted the application to MS Visual C# 2005. Now on one of the forms I am getting an error when I try to open the form. i.e. form.showDialog(); the error says Invalid OperationException was unhandled and that DragDrop registration did not succeed. Please help! what does this error mean?
sasa
|
|
|
|
|
I Posted a lot of times asking for this, and searched in many ways and I could finally find this article!!
With this you can read a ListView and a Treeview from another process.
<a href="http://dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05/31/14828.aspx" rel="nofollow">http://dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05/31/14828.aspx</a>[<a href="http://dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05/31/14828.aspx" target="_blank" rel="nofollow" title="New Window">^</a>]
All Credits to Chris Taylor
Thanks very much!
And I hope it helps a lot of people!
Best Regards
|
|
|
|
|
Hi everyone, I need to print the content of a RichTextBox, I know how do it, but when I assign the backcolor, when I print him, the backcolor isn't draw.
How I can do this?
Greetings and thanks
|
|
|
|
|
|
I like the enterprise library model. You decide whether to catch the exception or rethrow based on configuration.
Logifusion[^]
|
|
|
|
|
Colin Angus Mackay wrote: Unusually for me I'm asking a question...
There's nothing wrong with that! That's what these forums are for, after all.
I will catch exceptions if there is something I can or should do in response to that exception. Sometimes I'll just catch an exception, log the exception details somewhere, and then throw it back up the call stack so that other call sites can do what they need to do with it.
Enjoy the weekend,
Josh
|
|
|
|