I'm using process.info, process start(); to call an exe on button click in c#.net, but every time I click on the button it calls an exe and opens a duplicate file on the taskbar. I want to just maximize the exe that was already on the taskbar.
I'm facing the problem that it is again and again opening the same file on the button click.
...
what is the procedure to know that when Everytime the user starts the application it will check if an instance is already running. If its not running it will launch it otherwise it will focus to the current one.i have already tried the code for singleton application but its giving lots of errors. its not running properly. can u provide m...
I have a string from which I have to remove following char: '\r', '\n', and '\t'.
I have tried three different ways of removing these char and benchmarked them so I can get the fastest solution.
Following are the methods and there execution time when I ran them 1000000 times:
It should be fastest solution if I have 1 or 2 char to remov...
I'm trying to create a transfer mechanism where I can take a Class Object and convert it to a webservice object, with minimal amount of code.
I've had pretty good success with this approach but I need to refine the techinque for when I have custom Classes being returned as properties off my source object.
Private Sub Transfer(ByVal src...
I have an NLog target:
<target name="AspNetAsyncWrapperForMail" xsi:type="ASPNetBufferingWrapper">
<target name="mail" xsi:type="Mail"
subject="Error: ${callsite:includeSourcePath=False}"
smtpServer="MySMTP"
from="[email protected]"
to="[email protected]"
smtpAuthentication="None"
body="${date}${file-contents:$...
Hi,
I'm looking for a PDF printer that doesn't ask the user to choose a filename and directory, but simply saves it to a predefined folder with a unique filename.
Thx.
...
By doing some google, i came to know that 'it is used to keep track of file system actions'. But i don't undrstand it's utility, the watcher can directly trigger the event(s) without storing it in some intermediate buffer!!
Is it there to convert asynchronous flow of events (copying/modifying files) into synchrounous event calls ? Also,...
Hello
Two questions, I want to give a thread a name and retrieve it to check whether it is alive how to do that?
I want to do that in asp.net application at BLL layer so I don't have a timeout exception. Is that a bad idea?
Thanks
...
Can anybody explain me the concept of virtual destructor ? and also how it is taken care in dotnet ?
...
I have a HttpModule that hooks on the EndRequest Event on a IIS6 with a wildcard handler registered and it works fine as long as the request ends on a .aspx page, but NOT if the url is missing (404).
I guess it's because of the staticfilehandler ends the request, but is there any good solution for this problem ?
I have tried the same s...
I am using 5 BackgroundWorker objects running at the same time for a certain purpose, and all of them have to change the same label. How do I do that ?
How do I modify the form from more than one thread then ? And how do i do it in case i want to change a public string ?
...
This is quite a basic question, that I'm sure many of you will be able to answer and applies not only to TableLayoutPanel, but to all other .NET controls too.
I have created a new class which derives from TableLayoutPanel and I want to use this derivation on the form instead of the .NET version. I am expecting to be able to use drag a...
for (do it a bunch of times)
{
while (backgroundWorker1.IsBusy && backgroundWorker2.IsBusy && backgroundWorker3.IsBusy && backgroundWorker4.IsBusy && backgroundWorker5.IsBusy)
{
System.Threading.Thread.Sleep(0001);
}
if (!backgroundWorker1.IsBusy)
{
ba...
I'm creating an interface based on an existing interface for WCF concerns, but I have the "DefineParameter" not setting the parameter names (method parameters of the created type have no name).
Can you see a reason why?
public static Type MakeWcfInterface(Type iService)
{
AssemblyName assemblyName = new AssemblyName(Stri...
This is extremely slow:
try
{
x = k / y;
}
catch (DivideByZeroException) { }
This is about 5x faster:
if (y > 0) x = k / y;
Can anybody tell me why?
...
Hi Guys,
Is it OK/possible to have a shared memory in a COM object which will be consumed by applications built using C# and/or C++?
Can C# access shared memory in COM object without crash?
Thanks,
Adi Barda
...
In my UI code I have a lot classes with the same basic skeleton:
derives from INotifyPropertyChanged
contains the following code:
void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
public event PropertyChangedEventHandler Propert...
Is there a way of creating a hash key that can be used by our different servers for decrypting connection strings in web.config, and how would I do that? Any pointers?
Thanks for the help!
// Peter
...
In Visual Studio > Build > Configuration Manager you can choose the target platform.
What does it change?
Is there any other way I can optimize my .NET app when targeting x64 platforms?
...
I would like to recreate a conical/circular gradient in WPF. I've looked into inheriting System.Windows.Media.GradientBrush - which can be inherited from - but uses a lot of internal plumbing to get the job done (inherited from System.Windows.Media.Brush)
Any ideas on how to achieve this would be appreciated (preferrably without resorti...