I'm designing a multilingual application using .resx files.
I have a few files like GlobalStrings.resx, GlobalStrings.es.resx, GlobalStrings.en.resx, etc.
When I want to use this, I just need to set Thread.CurrentThread.CurrentCulture.
The problem:
I have a combobox with all the available languages, but I'm loading this manually:
comb...
How to embed a Jukebox or a media player in C# .NET?
Or rather create a playlist which can play WAV files.
...
I created a .NET class library in C# and exposed it to COM. It works fine as an in-proc COM server. However I want to use it as an out-proc COM server to have it in a separate process.
To do so I try to create a COM+ application. I created an empty COM+ application and added the classes implemented in the class library into it. When I c...
We have a composite application with a DockPanelWorkspace as its main user interface area. Above this sits a MenuStrip with a window menu set as its MdiWindowListItem. Unfortunately, as I feared, the window menu isn't populated with the open views.
Is there an equivalent in CAB that will populate a menu with a list of the open views i...
Hi, anyones knows how to do this?
Edit: I am trying to do >=. I correct the Title.
...
Is this pattern for mutual exclusion as safe as I think it is? If so, what do you call it?
lock (_lock) {
if (_flag) return;
else _flag = true;
}
try {
//critical code...
}
finally {
_flag = false;
}
I want to ensure the critical section, but without the other threads piling up waiting to acquire the lock. Obviously I ...
Coming from many years of asp.net development back to a winforms application.
Looking for advice and tips on how to "style" winforms similar to how I would do with CSS/Master Pages in asp.net.
I am interested on how to update font/colors for certain types of controls in one place. How to maintain consistency for layouts.
Any pointe...
I have a method that gets a nested array as parameter:
Number[][] data
where Number is my very simple class that inherits from INotifyPropertyChange.
And then i have a statement like this:
double[] max = (double[])data.Select(crArray => crArray.Select( cr => cr.ValueNorm ).Max());
When I'm trying to watch it in the debugger it jus...
I am building a class that represents a US State or Canadian Province. What should the class be called?
Some ideas:
Region: Problem with this is that .Net has a RegionInfo class that uses the term Region to represent a country (and not a State or Province).
State: Problem with this is that it could cause confusion with Application St...
Visual Studio seems to complain when I pass a string into an exception parameter.
if (str1 == null || str2 == null)
{
throw new ArgumentNullException("lmkl");
}
Visual Studio says that it cannot resolve symbol "lmkl".
If I have a string variable (eg above throw new... string s = "test";) and include this as the parameter for the ...
I've created a Word add-in component, and a visual studio setup project to install the component.
On a clean machine with Office 2003 installed, it does not seem to be possible to get the add-in component to load in Word.
Googling the issue suggests that this is because the assembly is not trusted. I gave the assembly full trust using ...
I'm encountering a problem while trying to serialize a multi-dimensioned array of integers via XmlSerializer for an XNA project I'm working on. I'm able to serialize all of my other data (booleans, strings, even Colors, etc) without a hitch. I've also seen plenty of people claim that XmlSerializer will natively handle (single-dimension...
I've built a winforms application which checks for CTR+ALT+S and CTRL+ALT+E keypresses, using by overriding the ProcessCmdKey method. This works great, but if the screensaver goes on and then goes off the form doesn't have focus and the keypresses aren't intercepted. How can I receive these even if the form does not have focus?
...
Hi everyone!
I'm new to developing web applications using the .NET framework.
I'm just wondering if .NET has any support for saving a custom int value for each (logged in) user?
Could I perhaps use the HttpContext.User property or something?
I'd be really grateful for some help on this!
/Ylva
...
EDIT: Web Services being called from a windows console application at present, using VB.Net and Visual Studio 2008
We are using the Interwoven Worksite Web Services and are having issues debugging them. The web service is returning the following error:
"Unable to access the object. It may have been deleted or you may not have
sec...
I'm trying EF out and I do a lot of filtering based on many to many relationships. For instance I have persons, locations and a personlocation table to link the two. I also have a role and personrole table.
EDIT: Tables:
Person (personid, name)
Personlocation (personid, locationid)
Location (locationid, description)
Personrole (per...
Hello:
I am writing an administrative script, and I need to calculate the size of files on disk.
These files are on a compressed NTFS volume.
I can't use FileInfo.Length, because that is file size and not size on disk. For example, if I have a 100MB file, but it is only using 25MB due to NTFS compression, I need my script to return...
I would like to use the .Net Regex.Split method to split this input string into an array. It must split on whitespace unless it is enclosed in a quote.
Input:
Here is "my string" it has "six matches"
Expected output:
Here
is
my string
it
has
six matches
What pattern do I need? Also do I need to specify any RegexOptions?
...
If I intercept a key press using win32 calls, I now have a key code. Is there a way to convert that to a System.Windows.Forms.Keys value?
...
Is it possible to access information about the text selection within an editable TreeNode of a WinForms TreeView?
I discovered methods such as BeginEdit() and EndEdit(bool cancel), but I need finer granularity of control -- something like TextBoxBase.SelectionStart and SelectionLength properties, but on the node itself.
Is this possibl...