|
Luc Pattyn wrote: all the schemes that have been mentioned to you do not prevent the app from launching a second or third time Even the one from Wayne G. using a Mutex ?
thanks, Bill
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
It still has to start to detect that there's another instance running. It's not that they don't stop the appearance of an app not being started again, but there will always be a finite period of time where the second instance has spun up - even if it then terminates.
|
|
|
|
|
CP has many articles on making a "Singleton" app:[^]
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
How to tell the OS to use the environment provided by the WinForm application instead from system environment.
Example : My WinForm application uses C++ runtime dll's(msvcm80.dll, msvcp80.dll and msvcr80.dll) and bundling them as part of the application. How to make sure that my application will use the C++ runtime dll's that bundled along with product even though the dll's present else where in the system(c:\Windows\Winsxs).
Regards,
Gopal Reddy
|
|
|
|
|
|
Posting this question in the C++ forum can help you get more answers.
|
|
|
|
|
Hi all,
I have created one windows application setup.Now i want to display mt application shortcut in the menu that is when i left click on the file it should display the application name in the menu.
How can i do it ?
Thanks in advance.
|
|
|
|
|
Are you asking how to create a file association, so that when you are on the Desktop, or in a Windows Explorer window, and you context-click on a file whose type is the type you have associated: then you want the Windows system context menu to appear with the name of your application under the "Open With" sub-menu ?
Have you set the left mouse button to be the context-click button ?
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
Hi,
I have a textbox, and i want to show the value of this textbox in another window form?
Any one can help me?
Thanks!
|
|
|
|
|
Is this other form open already? Do you want the value to be displayed when the user clicks a button, or is it to be updated as the user types? You need to provide more information before anyone can offer useful help.
|
|
|
|
|
Yes, this form is already open, I wants to link it with this. And i want to open the this by button click,
|
|
|
|
|
The common way to do this is to have an event in your code that looks something like this:
public event EventHandler<string> MyText;
protected void OnMyTextChanged()
{
EventHandler<string> handler = MyText;
if (handler == null)
{
return;
}
handler(this, new TextChangedEventArgs(textBox.Text));
} Then, all you need do is subscribe to the event in the second form, and it will automatically receive the string whenever you raise this event (which you would trigger from your button click event). Note that TextChangedEventArgs is a custom event args class defined like this:
public class TextChangedEventArgs : EventArgs
{
public TextChangedEventArgs(string text) : base()
{
MyText = text;
}
public string MyText { get; private set; }
}
|
|
|
|
|
Use the customeventhandler functionality of .net
Varun Sareen (Dot Net Developer)
|
|
|
|
|
hi
can someone help me about storage binding in string type?
I need a rich answer
thanks so much
|
|
|
|
|
What? I'm sorry, but your question makes no sense to me whatsoever. Could you clarify what it is that you are asking?
|
|
|
|
|
Could you define:
1. PLD
2. Storage binding
3. rich answer
thanks
My logic is impeccable; my arithmetic lets me down.
|
|
|
|
|
You are probably going to find your definitions (as well as examples) if you access MSDN.
|
|
|
|
|
namespace MyNamespace
{
abstract public class MyClass1
{
public abstract int f();
}
abstract public class MyClass2
{
public override int f()
{
return 0;
}
public static void Main()
{
}
}
}
After reducing errors to 1, I received the error (named in the Subject line) on line 14 of my project "No method to override". The problem is, Line 14 is blank.
When I went to MSDN, I found CS0115, but I don't know how to change it to work with my project. Should this be simple deduction and logical? Any help would be appreciated.
|
|
|
|
|
Perhaps you forgot to tell the compiler that MyClass2 is supposed to derive from MyClass1?
|
|
|
|
|
As I indicated to others who kindly tried to help, the given code is not mine, but rather the MSDN CS01150 to fix the error "no method to override". I just don't know how to change it, but will muddle through tomorrow. The error appears for a line which is blank...which threw me into a confused abyss.
This is the final error on many lines of code, so, of course,it will give me the most trouble in fixing.
I am just learning, so I truly appreciate the help.
|
|
|
|
|
So where is your code? We can't help you without it.
|
|
|
|
|
On this question: I think it would be helpful if you state your usage scenario here: what exactly are you trying to implement: how are the classes that implement these abstract classes going to use them ?
An abstract class that does not inherit from some other class is not going to have anything inside it that you can override.
If you changed your 'MyClass2' definition to this:
abstract public class MyClass2: MyClass1
{
public override int f()
{
return 0;
}
public static void Main()
{
}
} Now it will compile. But please note, that I am not sure this something you should do.
By the way, I find it very weird to see a 'Main entry point for execution inside an abstract class. I'm curious what your intent is in putting it there.
Override in "Abstract, Son of Abstract" ? I hope others on this forum, much more knowledgeable than I am regarding use of inheritance involving abstract classes, will comment on what it might mean for one abstract class to inherit from another abstract class: is this good (or common) practice ? The purpose of that is obscure ... to me.
"For no man lives in the external truth among salts and acids, but in the warm, phantasmagoric chamber of his brain, with the painted windows and the storied wall." Robert Louis Stevenson
|
|
|
|
|
Thank you for your response, but the code I listed was the sample from MSDN, not mine. MSDN provided it as a way to fix the error in the compiler (CS0115)but I wasn't sure what to change to make it "my own". I questioned the abstract class, (like I would know?)...but MSDN indicated that the patch would activate CS0115 and fix the code error of "no method to override". As for today, the "chamber of my brain" is cooked in code.
Thank you again for trying.
|
|
|
|
|
The concept may be shocking and new to you, however even Microsoft once in a while includes a little bug in their code, not all sample code snippets are correct. This has become a fact of life, you'll have to learn and live with it.
|
|
|
|
|
No the code correctly demonstrates how to generate the error.
|
|
|
|