I'm considering developing a WPF application, to be hosted by a legacy Windows app (C++), and I'm trying to get a better sense of how feasible it'll be to do so, given the broad user base I'm targeting. Knowing WPF targets .NET 3.5, I'm looking for some insight as to what the field looks like right now -- who's already got the runtime, ...
How do I initiate a Windows XP user Log Off from a C# app? The action of my app should produce the same result as clicking "Log Off" in XP start menu -- it's fine if the system asks for a confirmation.
Is there a .Net or an unmanaged API for this?
...
Let's say I've got a control and I want to prevent it from being edited.
Setting the Enabled property of the control to False will work but the control appearance will change accordingly, usually to a difficult to read black over gray font. When readability is still important, this is a real problem.
For a TextBox, there are a few obvi...
If I paste something like
<asp:DropDownList ID="DropDownListExpirationDate" runat="server" />
onto an ASPX file that already has a DropDownListExpirationDate control, it will rename the newly-pasted control as DropDownList1.
<asp:DropDownList ID="DropDownList1" runat="server" />
I'd rather it didn't. I'd rather is just paste exact...
I want to know which *.config file the ConfigurationManager is using. How can I figure that out?
For instance, you could be changing working directories and execute libraries from various paths. I'd love to have a way to display something like "Reading AppSettings from c:\MyApp\app.config" in my Trace.
...
Using the .NET framework, I'm trying to replace double slash characters in a string with a single slash, but it seems to be removing an extra character and I don't know why.
I have a string:
http://localhost:4170/RCRSelfRegistration//Default.aspx
My regex is:
[^(://|:\\\\)](\\\\|//|\\/|/\\)
And the return value is:
http://localho...
Say I have a .NET class like so:
public class Person {
public string Name { get; set; }
public int Id { get; set; }
}
Visual Studio has a nifty refactoring tool called Extract Interface that will extract an IPerson interface, and have Person implement it. Is there a way to do that programmatically from outside of Visual Studio...
I am trying to create a "save webpage as bitmap"-function on a website and i have some problems rendering the text in the correct size on the server side.
The fontsize settings for the text on the client is:
.textDiv
{
font-family: Verdana;
font-size:16px;
}
If i try to render this on the server with
float emSize = 16;
g.Dra...
I have a method that uses a connection (e.g. a method that downloads a page).
I have to execute this method multiple times (e.g. download 1000 pages).
Doing it the synchronous and sequential way takes a long time.
I have limited resources ( 8 max threads and/or 50 max simultaneous connections )
I want to use all resources to accelerate ...
I'm using the asp.net CreateUserWizard control. I've added a WizardStep and need it to verify 3 datapoints against our internal database before allowing the user to create an account. However, when I try to wire the next button click to a codebehind method to check the data, the event never fires in the codebehind.
Below is the code on...
I'm just starting to play with MVC, and something isn't clicking with me. I understand how to make a simple input form, and use a submit button to post the form set up like this:
<form runat="server" method="post" action="/Home/CreateNew" >
But what happens if you're whole app is inside one form tag, and you want to have multiple inpu...
One of my chief annoyances with Linq to SQL in WinForms (and I daresay WPF) is the lack of support for long running datacontexts see here.
The problem is that you can't get updates from the database, you only ever get the same old records until you throw the datacontext away. This is fine for a web app when the page is only alive for m...
Goal
I would like to be able to both host and connect to a vanilla sockets server via WCF, within the hosting framework I am devising. I want to be able to use WCF to codify the transport and protocol communications that have to be manually managed by sockets programmers today. This would allow me the ultimate interoperability with Li...
I am trying to use entity definitions in a config file to simplify the differences between the development, QA, UAT and production versions. Here is a sample of the beginning of my config file:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE configuration [
<!ENTITY MyStorageLocation "\\MyServer\MyStorageFolder">
<!ENTITY MyDa...
I'm currently trying to run MSTest.exe from NCover, but I believe the question could apply generally to running MSTest.exe from the command line.
If I have the "/noisolation" argument, then MSTest.exe appears to find and use the app.config as expected. Without it, NCover doesn't capture any coverage information. From my research so fa...
Does anyone know (or know where to find, couldn't myself) what variables I can use on a TFSBuild.proj file for my automated builds?
For example, $(SolutionRoot) gives me the path to all my source files, but I want to copy the built solution from the release directory (ie: \Nightly Build20090127.7\Release\_PublishedWebsites) and I can't ...
Does anyone know any good Ruby, Rails or .Net specific libraries for working with barcodes?
...
Hi, have you ever noticed how in gmail, as the emails are updated in your inbox, you get a hyperlink to it like so:
http://mail.google.com/mail/#inbox/23e0377656b24123
and if you click on that link it doesnt reload the page?
Can you do that with jquery and a datagrid?
So that you get links to items in your grid, which is populated as...
I have a serviced component installed in a COM+ server application. I want to create an instance from a remote client. The client needs to be able to specify the server machine's name dynamically. How do I do this?
I tried using Activator:
(XSLTransComponent.XSLTransformer)Activator.GetObject(
typeof...
When starting out with a new application, would you rather just use an existing dependency framework and risk the possible shortcomings, or would you opt to write your own which is completely adaptable and why?
...