|
Named pipes in .NET
Hi all;
Ok, for simple IPC between 2 .NET apps I wrote a simple named pipes
set of classes. If anyone needs them -
http://www.davidthielen.info/programming/2008/12/named-pipes-in-net.html
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm...
|
1 |
12/16/2008 9:14:17 PM |
|
How do I make a Form WS_SHOWNORMAL & foreground?
This is a C# Form that is in the taskbar and therefore set to hidden.
What works sometimes, but not always is:
Process procOn = GetMyAppsProcess();
NativeMethods.SetWindowState(procOn.MainWindowHandle);
NativeMethods.SetWindowAsForeground(procOn.MainWindowHandle);
....
public static void SetWindowAsForeground(IntPtr hWnd)
{
SetForegroundWindow(hWnd);
}
public static void SetWind...
|
9 |
12/15/2008 9:01:52 AM |
|
what is better for replacements on big Strings?
So, I parse some html, and I would like to remove some of strings (about 6
of them), and currently I'm using StringBuilder for that
but, I'm wondering is it better (from performance view) to use something
different? regex? is it faster?
is regex is better/faster, how to make replacements with regex? (I never
used it)
tnx
...
|
1 |
12/11/2008 3:37:36 PM |
|
dexplore.exe is missing
Hello,
I installed the Windows SDK for Windows Server 2008 and .NET Framework
3.5 on Windows Vista. I just needed an offline version of the .NET
runtime library documentation, so I only selected the respective option
in the custom setup options.
The installer apparently installed the desired files and added an icon
labeled "Windows SDK Documentation" to the start menu. However, when I
click...
|
1 |
12/6/2008 3:09:43 PM |
|
exe can't find dll in the same directory
Hi;
When I install our program and we go to run it, it gives the Windows
program hit an error message. When we click Debug it says it can't
find a dll it needs.
The dll is strongly named (and matches the version & SN signature
shown in the debugger). It is not in the GAC - it is in the same
directory as the .exe program.
What is going on?
thanks - dave
david@at-at-at@windward.do...
|
8 |
12/3/2008 6:30:50 PM |
|
Installing language DLLs
Hi;
Ok, with our AddIn, which we do NOT put in the GAC, we have 2 resource
DLLs per language - AutoTag2007.resources.dll &
AutoTagCore.resources.dll
How should we install these? Can we create a de (German example)
sub-directory and put them in there? And will Windows find them? Or
should we rename them AutoTag2007.resources.de.dll and put it in the
same directory? Or?
I would like to...
|
5 |
12/1/2008 12:18:38 AM |
|
Good localization editor?
Hi;
Does anyone have a recomendation for a good localization editor for
making it easy for a translator to translate the text in the
resources? So far the best I have come up with is an XLST transform to
create an XML file with the english and a place for the translation
and have them use an XML editor. Then I use XLST again to create the
language resx file.
thanks - dave
david@at-at...
|
3 |
11/27/2008 5:37:22 PM |
|
signing our code suddenly failing.
Hi;
This has worked for years - and is now suddenly failing. From the
command line we run:
signcode.exe -spc WindwardKeys.spc -v WindwardPrivateKey.pvk -t
http://timestamp.verisign.com/scripts/timstamp.dll
InstallWindwardReportsDotNet.exe
and we get:
Error: One or more input parameters are invalid.
Error: Signing Failed. Result = 80070002, (-2147024894)
When we run through the GU...
|
3 |
11/25/2008 8:35:54 PM |
|
localized resources - do we have to install them
I just noticed that we now have a bin\release\de and in that dir we
have Lib1.resources.dll and Lib2.resources.dll.
Do we need to install these files with our program, and do we do so in
a de directory under it? And when we install a dll to the GAC, how do
we get those resources to go with it?
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardRep...
|
3 |
11/24/2008 7:54:08 PM |
|
Why Name, Parent, Type, & ZOrder in the resx file?
Why is it when we localize the text to a control in a form, in the
(Default) resx it adds the Name, Parent, Type, & ZOrder property for
each control.
Why? And should we delete those settings or will VS 2008 need them.
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardr...
|
3 |
11/24/2008 7:49:38 PM |
|
Play a midi file from C#
What's the easiest way to do this? I treid the following but it didn't
work:
midiFile = Path.GetFullPath(midiFile);
midiFile = GetShortPathName(midiFile); // gets the 8.3
filename
mciSendString("stop midi", "", 0, 0);
mciSendString("close midi", "", 0, 0);
mciSendString("open sequencer!" + midiFile + " type mpegvideo
alias midi", "", 0, 0);
int rtn = mciSendString("play midi", "",...
|
5 |
11/22/2008 12:08:00 PM |
|
usage of AutoResetEvent
So, I have an AutoResetEvent wich should block all methods/procs if db conn.
is down...
when I check for current status of AutoResetEvent, I use code as:
connOpenEvent.WaitAny(-1, true)
but, next time when I pass the same check, my code just stops at that line..
why?
do I need to exit/unmark this AutoResetEvent or what?
I wouldn't like to need to 'unlock' it
tnx in advance
...
|
1 |
11/21/2008 10:05:50 PM |
|
Validation of grid row
Hi,
Well I have grid and it contains various kinds of columns,I validate it
forthe entire row and mark the row with a red * if row does not get
validated properly.
I have a save button which I am able to click .I would like that I
should be able to test validation over ther, If validation is done then
move ahead else if error is there then return back to the same window.
I think I need t...
|
1 |
11/21/2008 7:55:49 AM |
|
security issue writing to the event logs
When I call EventLog.SourceExists("Report Scheduler") I get:
Exception: System.Security.SecurityException
Message: The source was not found, but some or all event logs could
not be searched. Inaccessible logs: Security.
Stack: at
System.Diagnostics.EventLog.FindSourceRegistration(String source,
String machineName, Boolean readOnly)
at System.Diagnostics.EventLog.SourceExist...
|
3 |
11/10/2008 10:30:59 PM |
|
Need help on regular expression
Hi there,
Can any Regular Expression expert explain the meaning of the following for me:
(\p{L}{2}[0-9]{7})
Thanks very much!
Mike...
|
3 |
11/10/2008 6:03:02 PM |
|
What is the best way to handle localization?
Hi;
Ok, we now need to localize our Form app. We have the text in all the
controls as well as text we set inside our code.
What's the best approach? I just need big picture of which of the
various ways we should do this. I've done it before but don't remember
the trade-offs of the various approaches.
The UI will keep evolving so we want an approach that easily handles
new controls in ...
|
5 |
10/30/2008 9:39:24 AM |
|
Auto-entering password in sn.exe
I want to use sn.exe in a batch file to sign multiple assemblies (resources
that have been translated into a foreign language). Is there a way to avoid
having to manually type in the password for the .pfx file each time for every
assembly? Wild cards don't work, and command redirection from a file
containing the password gives an error, 'handle is invalid':
sn.exe -R test.resources.dll ...
|
2 |
10/28/2008 5:50:01 AM |
|
ildasm.exe - error 0xc0150004
Hi;
When running dorfuscator it calls ildasm. When it does the following
message box pops up.
ildasm.exe - Application Error
The application failed to initialize properly (0xc015004). Click on OK
to terminate the application.
What's wrong and how do I fix this?
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://da...
|
6 |
10/28/2008 2:30:18 AM |
|
DNS resolution
I need to lookup TXT records in my application but it appears that the
System.Net.DNS class is not capable of doing so. GetHostEntry() seems to
be the closest match, but the IPHostEntry that it returns seems to support
only addresses and aliases.
Is there a way to lookup DNS records of arbitrary type in .NET?...
|
1 |
10/23/2008 12:58:32 PM |
|
How can I set the class of a Form window?
I need to do FindWindow() to find the main window of an app of mine
(to pos a message from another app). I can't use the title because it
is localized and can have status info in it.
So I need to do the find using the class or something else other than
the caption.
??? - thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://...
|
2 |
10/22/2008 2:46:00 AM |
|
What NG for VirtualServer questions?
Hi;
What's the nest news group for programming questions in Virtual
Server?
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm...
|
2 |
10/22/2008 2:31:40 AM |
|
Is this the best way to do an app that is in the tray?
Hi;
Hitting google the best I found was to have a windo in the tray area
is to call Hide() when it is minimized. This strikes me as a hack - is
there a better way to do this - such as assign the window a property
that tells Windows this is where it goes when it is minimized?
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- htt...
|
3 |
10/20/2008 5:44:14 PM |
|
Only 1 instance of an app running
Hi;
If a user tries to start an app of mine, and that app is already
running, I want to make the already running app normalized (it's
usually in the tray) and give it the focus - and then exit the second
instance.
How can I do this? And if it means using the Class of the main window
of my app - how do I set the class of a .NET From window?
thanks - dave
david@at-at-at@windward.dot....
|
3 |
10/20/2008 5:43:02 PM |
|
How to Manage Multi Monitor IDs and change them programatically
Iam Developing a Multi monitor Application in C++ MFC VC 6.0 in which i need
to manage the diffrent monitor IDs for eg if 6 monitors are connected windows
will assign IDs as 1,2,3......6 to the monitors and it can be verified->with
the help of Desktop->Properties->Settings->Right Click on Monitor which u
want to Identify and click on identify it will display the assigned numbe...
|
1 |
10/14/2008 7:03:00 AM |
|
Creating my own log in the event viewer
Hi;
Is there a url that explains how in C# to create my own log in the
event viewer and then write to it? I am writing to Application fine
but would like to have my own.
thanks - dave
david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm...
|
4 |
10/7/2008 2:11:57 AM |