Click here to Skip to main content
15,909,898 members
Home / Discussions / C#
   

C#

 
AnswerRe: animated image Pin
Tarakeshwar Reddy9-May-07 5:46
professionalTarakeshwar Reddy9-May-07 5:46 
GeneralRe: animated image Pin
sujithkumarsl9-May-07 19:07
sujithkumarsl9-May-07 19:07 
QuestionActiveDirectory Entries and C# Pin
ccitt9-May-07 5:25
ccitt9-May-07 5:25 
QuestionRemoting Pin
Diego F.9-May-07 5:18
Diego F.9-May-07 5:18 
QuestionExplorer, "Open with..." multiple files Pin
AlexZieg719-May-07 5:06
AlexZieg719-May-07 5:06 
AnswerRe: Explorer, "Open with..." multiple files Pin
AlexZieg719-May-07 7:22
AlexZieg719-May-07 7:22 
AnswerRe: Explorer, "Open with..." multiple files Pin
Luc Pattyn9-May-07 7:50
sitebuilderLuc Pattyn9-May-07 7:50 
GeneralRe: Explorer, "Open with..." multiple files Pin
AlexZieg719-May-07 8:42
AlexZieg719-May-07 8:42 
Hm, thanks for this info, I already assumed that. I blocked opening multiple instances of my program the following way:

public static void Main(string[] args)
{
	Process[] processes = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
	if (processes.GetLength(0) > 1)
	{
	        IntPtr hwnd;
		if (processes[0].MainWindowHandle == Process.GetCurrentProcess().MainWindowHandle)
			hwnd = processes[1].MainWindowHandle;
		else
			hwnd = processes[0].MainWindowHandle;

		if (IsIconic(hwnd) == true)
			ShowWindow(hwnd, 9);
		else
			SetForegroundWindow(hwnd);
	}
	else
	{
		Application.Run(new myApp(args));
	}
}


Do you know a way to send the new args to the previous instance from which I have the handle? Or is there another common method to solve this problem?
GeneralRe: Explorer, "Open with..." multiple files Pin
Luc Pattyn9-May-07 8:55
sitebuilderLuc Pattyn9-May-07 8:55 
QuestionEvent Handlers :) Pin
Justin Perez9-May-07 4:50
Justin Perez9-May-07 4:50 
AnswerRe: Event Handlers :) Pin
Bijesh9-May-07 6:47
Bijesh9-May-07 6:47 
GeneralRe: Event Handlers :) Pin
Justin Perez9-May-07 8:20
Justin Perez9-May-07 8:20 
GeneralRe: Event Handlers :) Pin
Bijesh9-May-07 23:19
Bijesh9-May-07 23:19 
Questiontraversing treeView Pin
Maddie from Dartford9-May-07 3:49
Maddie from Dartford9-May-07 3:49 
AnswerRe: traversing treeView Pin
Tarakeshwar Reddy9-May-07 3:53
professionalTarakeshwar Reddy9-May-07 3:53 
Questionparse dat from html table Pin
samerh9-May-07 3:26
samerh9-May-07 3:26 
AnswerRe: parse dat from html table Pin
Elina Blank9-May-07 4:22
sitebuilderElina Blank9-May-07 4:22 
AnswerRe: parse dat from html table Pin
marky7779-May-07 4:36
marky7779-May-07 4:36 
QuestionData access layer code generator , Reccomendations ? Pin
Andrew Torrance9-May-07 3:22
Andrew Torrance9-May-07 3:22 
AnswerRe: Data access layer code generator , Reccomendations ? Pin
LongRange.Shooter9-May-07 10:29
LongRange.Shooter9-May-07 10:29 
QuestionDataTable to Excel Worksheet fst! Pin
swjam9-May-07 2:53
swjam9-May-07 2:53 
QuestionRecord desktop Pin
MHASSANF9-May-07 2:27
MHASSANF9-May-07 2:27 
AnswerRe: Record desktop Pin
Colin Angus Mackay9-May-07 3:02
Colin Angus Mackay9-May-07 3:02 
AnswerRe: Record desktop Pin
daphne579-Aug-11 17:48
daphne579-Aug-11 17:48 
QuestionHow to generate a shorter encrypted string? Pin
Affan Toor9-May-07 2:12
Affan Toor9-May-07 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.