|
Yar, stupid punctuation, ruined the english language.
I concede to your brilliance.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hi:
I am looking for a way to assure that only one instance of a WinForm application can be run on a local area network, how should I go about this?
I'm not up to speed with Sockets or UDP communications, so don't really know where to start.
---
Regards,
Martin.
|
|
|
|
|
i think the easyest way is to create a dummy file somewhere on the network (accessable to everybody)
when your app starts.
and delete when app closes.
in startup of your app, check for existens of that file (File.Exists)
Hope this helps
Kaine
|
|
|
|
|
Although of course, evil people could find an delete the file, then run the form when theyre not supposed to!
Depends on your circumstances though. This is definitely a good idea though.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hmm. I found this topic: http://www.thescripts.com/forum/thread253568.html[^]
Doesn't give much info, but from what i can see you can get remote processes by using:
Process.GetProcesses("remote pc name");
and that you need to have remote access enabled on the rmeote machine, and maybe some other stuff. You might not need to use sockets at all, although they are rather quite simple to use.
So, you'd have to check the processes of each machine individually, and then run your form if you don't find an instance of your form anywhere.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hmm, I was thinking more along the lines of a Broadcast or Multicast message and reply workaround.
The created file solution might be a quick & dirty solution though...
---
Regards,
Martin.
|
|
|
|
|
MartinHart wrote: The created file solution
Make sure you (a) create the file if it doesn't already exist and (b) keep it open for exclusive access as long as the app is running.
/ravi
|
|
|
|
|
Good Morning All,
First off, this forum has helped me a great deal with my endeavors of understanding C# better. I utilize the archives and searches extensively and have more times than not found the answer I needed right away.
This time however, I need some help directly. I am creating an application where by I am writing a config file in XML (thanks to a posting here), and one of the elements I need is a directory. I have found and am utilizing the OpenFileDialogue but this Dialogue Box will not allow me to select a directory only. Is there another object that will allow the user to select a directory.
I don't want the user to type in the directory, as you can imagine, just using the Dialogue Box would aleviate users anticipations.
Any help would be greatly appreciated.
|
|
|
|
|
There is another object that does exactly that: FolderBrowserDialog
Hooray!
|
|
|
|
|
HIP HIP HOORAY.
Thanks Undefeated. Made my day!
|
|
|
|
|
Hello
So here's what I'm trying to do: I have Visual Studio 2003 and I have a text (PDF format). I want to print the text. So, I managed to start acrobat reader in silent mode and print the document, but now I want to print multiple documents. How do I do this? Do I have to kill acrobat reader every time? Do I need to use a delay before I kill the process? How long should this delay be?
|
|
|
|
|
Have you tried Aspose.Pdf library? I think it can help you.
|
|
|
|
|
Well... no offense, but I'm looking for something less expensive (and I mean no money at all ). I just want some ideas on how to do this...
|
|
|
|
|
theheartcollector wrote: but I'm looking for something less expensive
Isn't the COM interface free?
|
|
|
|
|
Well... All I can see on their site are demo versions and shareware Can you please provide a link or smth?
|
|
|
|
|
|
Aham... Sorry I'm just starting to learn stuff...
|
|
|
|
|
Hello,
I dynamically add multiple controls to a form from Sourcecode and I want that the Events which are fired from these controls are handled in new Threads. How can I accomplish this?
One way would be I start an own Thread in each of the EventHandlers.
Is there another way to do this?
TIA,
Patrick
|
|
|
|
|
Easiest way to do this would probably have the events fire on the normal thread, but once you receive them, simply start a new thread that does the actual work. (edit: as you already mentioned )
Another possibility is call BeginInvoke on the event when you raise it.
|
|
|
|
|
Funny, i thought they already gave that example in their post XD
Still, i think that is probably the only way to do it. I mean sure, you could go some super long way round, but in the end, thats probably what you'd end up with.
|
|
|
|
|
Oops, either he edited his post or I somehow missed it.
|
|
|
|
|
Hi I m writing an add-in for MS office products (Outlook, Word, Powerpoint etc. )
Now, I figured it out for outlook and power point but MS WORD seems different. What I ve used for outlook and power point is: I tried it for WORD too but couldnt get it. If any of u know the application object / commandbar usage for word please let me know.
Or if theres a way to integrate it to all office products at once. Durind the project creation I already picked the office products that im gonna use.
public void OnStartupComplete(ref System.Array custom)
{
CommandBars commandBars = null;
try
{
//outlook
commandBars = ((Outlook.Application)applicationObject).ActiveExplorer().CommandBars;
}
catch{
// powerpoint
commandBars = ((PowerPoint.Application)applicationObject).CommandBars;
}
|
|
|
|
|
When I use;
commandBars = ((Word.Application)applicationObject).CommandBars;
and set the debugging mode for word i get an error even though all the word references and dll s are added to the project.
It works with outlook and powerpoint.
|
|
|
|
|
i want to change the postions of div scrolls so i made function in javascript. now i want to call tht function on "onscroll event" in div tag. i did
div id="div1" onscroll="setscrollpostions();" style="OVERFLOW: auto"
but it doesnt work
pls tell me the solution.
Thanks
Taran
|
|
|
|
|
Does any part of this have anything at all to do with C#? Huh. Does it?
You may have missed that honking great bit at the top that stated that this is a C# discussion board. If you did, let me point this out to you - this is the C# discussion board, not the Visual C++ forum, not the ASP.NET forum, not the SQL/ADO.NET forum - it's the C# forum. Now, given this information do you really think that this is the right place to post this question? Think before you answer, because I will be asking questions of you later on.
Now - you may want to move this over to the Web Development forum. You'll know it when you see it because it's got Web Development in the title. Not to be confused with the C# forum in any way, shape or form.
Deja View - the feeling that you've seen this post before.
|
|
|
|