I have some code like so ( winforms app .NET 2.0 )
RegistryKey regKey=Registry.LocalMachine.OpenSubKey@"SOFTWARE\cPaperless\TTC\Settings", false);
This code is failing every once in a while on Win7 and Vista when UAC is on ( by failing i mean the key is null.) Note that the Key is definitely existing and I can see it in the registr...
I have a column in my datagridview that is a combobox column. I would like it sorted by it's display value (i.e. text) instead of it's value (in this case, a list of int's from the database).
How can I do this?
...
I created a New Web Site in Visual Studio 2008, added a page with a control on it:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form runat="server">
<div>
<asp:Label runat="server" ID="...
I have a self-contained solution (non of the DLLs are used in any other project, so no worrying about Methods being used somewhere else).
I'm trying to figure out a way to determine every method/property that is not in use at all.
So I can't just look at private methods/properties, I need to also check Public methods and Properties.
I...
I suspect that lots of business related software is designed to manage a particular set of information; customers, orders, leads or products and/or a combination. This has been the case in most of my experience. All other tables are usually data supporting the major ones.
If this isn't the case, then assume it is for a moment :) because...
I'm working on a new language and while writting the grammar I'd like to be able to test the grammar for completeness, conflicts and similar. I'm not really concern about the underlaying parser generator (but one for .NET would be preferrable)
So feature list in short would be:
text editor build functionality
syntax/sematics error rep...
Hi!
I'm using VSTO to create an Excel Add-on. This add-on retrieves and display alot of data from a sql-server. This works great, but later on I plan to access some of the data inside excel and modify it in some ways. My problem is that I need a way of classify cells that I want to modify. Is there any way to add meta-data to a cell to ...
I have a small windows client application data bound to a single table backend.
I created a DataSet using the wizard in VS 2005, and it automatically create the underlying adapter and a GridView. I also have a RichText control and bound it to this DataSet. All well so far but, I need to replace certain characters(~) on the fly before the...
I'm reading an Excel document via the DocumentFormat.OpenXml library. Is there a good way to find out how many columns it has?
The current code, which I've just come across while investigating a bug, does this:
public string getMaxColumnName(SheetData aSheetData)
{
string lLastCellReference = aSheetData.Descendants<Cell>().Last()....
Is there any class or how to draw windows in console application using pseudo symbols like in far manager or turbo pascal?
I have found some symbols using conversion from Int to Char.
...
I'm opening an Excel worksheet into a DataTable using OleDb like this:
string select = string.Format("SELECT * FROM [{0}$]", worksheetName);
using (var con = new OleDbConnection(connectionString))
using (var adapter = new OleDbDataAdapter(select, con))
{
con.Open();
var dt = new DataTable();
adapter.Fill(dt);
con.Close()...
Currently looking at implementing an ebXML MSH using .NET.
Has anyone done this before, and/or know of any open source .NET examples out there?
Any comments/advice welcome ;-)
...
My application's About dialog consists of a couple labels, an image and a LinkLabel control (link to my website). My problem is the LinkLable, which is at the bottom of the form, receives focus, so the form scrolls down to it. Since the other controls on the form don't receieve focus, I can't scroll the form.
As a workaround, I tried us...
Hi,
I'm trying to get HTTP calls I'm making from C# .NET to a local address (localhost:3000) to use the proxy I set (so I can go through fiddler). Using the below WebProxy approach works if I point the target URL to a non-local address, however I need to point it to a local web-server I have (at localhost:3000), and when I do this the ...
When going through some of my applications in the past, I have noticed that compiled into the assembly is information such as where my project is, my username (which happened to be my full name, not my online handle) in Windows, and honestly I'm not sure what else.
Now I know the primary reason of this is when compiled under Debug, as t...
I'm trying to use InterIMAP to pull emails from a hosted email provider. I can get the message counts right, and yesterday my unit tests were pulling the full emails without issue. Today, however, I'm getting messages, and UIDs, but everything outside of that is NULL, even after calling RefreshData(true, true). Using InterIMAP-23995, the...
For various reasons, I need to implement a type caching mechanism in C#. Fortunately, the CLR provides Type.GUID to uniquely identify a type. Unfortunately, I can't find any way to look up a type based on this GUID. There's Type.GetTypeFromCLSID() but based on my understanding of the documentation (and experiments) that does something ve...
As we all know and love .NET does throw an IntegerOverflow exception every time an integer overflows. I think this is a very good thing.
But I wonder how they make this fast. x86 does not trap on integer overflows and I would be surprised if other architectures would allow one to do that. The best solution I have found for x86 is to put...
Didnt really consider this aspect till I started building my solution...
To simplify, my application exposes an API to be used by other applications. The API is conceptually comprised of two parts: "Action" classes, and data type objects. Each of these is in its own project.
(I'm not asking now about class design, thats a whole separ...
I have .NET 2.0 runtime installed, then I installed the .NET 4.0 runtime, so I have both. When I run a .NET app, is there a way to force which runtime will be used?
Edit/Clarification: I meant w/o regards to how the application was built. I am under the assumption that the .NET 4.0 runtime can run a .NET program compiled 5 years ago ...