.net

UserControl opacity 0 but still clickable

I've got a UserControl which has an opacity of 0. At that state it shouldn't be clickable. How to disable/re-enable it? ...

Visual Studio 2008 - Why does the vshost.exe have a full path limit of 126 characters?

Based on a previous question I posed (see here) and the following msdn threads, why does debugging fail when the full path of the vshost.exe is >= 127 characters? To reproduce the issue create a project with a full path (directory + assembly name + vshost.exe) that is >= 127 characters. Then press F5 to start debugging and the program ...

FlowDocument replace Section?

I have a FlowDocument with two Sections. One is named 'Inhalt'. Trying to replace it with another Section doesn't seem to work: InfoBoxAuditorium.Inhalt = InfoBoxAuditorium.Resources["DokumentWohnzimmer"] as Section; What am I doing wrong? ...

WPF: Determine/Set position of vertical Scrollbar

I've got a FlowDocumentScrollViewer with a vertical scrollbar. Now I want to know its position and also be able to change it. ...

.NET 'Private' Application

I create a .NET (WPF) Application, and compile it to .EXE. Then I create a second project, and add a reference to the compiled .exe, I can see all the classes and forms, and can use them for automation, etc. I want to prevent other people from using my compiled .exe as a .dll, so I changed all my classes to 'Friend' instead of 'Public',...

How to allow user to move a control on the form

I have a winform on which i want to allow the user to move a control. The control is (for now) a vertical line : label with border and a width of 1. The context is not very important but i'll give it to you anyways. I have a background with some graphics and i'd like the user to be able to slide a guideline above the graphics. The gr...

GrideView Column

I have a GrideView bound with table, I added one hyperlinkfield as you can see the code below: <asp:HyperLinkField NavigateUrl="~/Logout.aspx?category=Mobile&&ID=" Text ="logout"/> As you can see that I am sending 2 QueryString with URL. I am getting both correctly as long as I am sending static data. The problem is that I want to sen...

Are there any good PGP libraries for .NET?

I'm looking for something that is non-beta and can decrypt a file with a couple lines of code. I tried looking at BouncyCastle, but its so complicated I can't figure it out and every forum I check has people likewise perplexed. I also looked at SharpPGP, but that never got past version 0.1 and the author himself recommends against usi...

Strong name validation failure on Import-Module

I'm unable to import an assembly, supposedly because strong name validation is failing, though this occurs even when I register the assembly to not be checked. Can somebody spot what I'm doing wrong here? Below is a transcript. For reference, the switches to sn.exe are: -v: Verify signature. -Vr: Register assembly for verification sk...

Is it Possible to Dynamically Configure XML Serialization?

I have several classes that I serialize/deserialize, each with a number of properties, some of which I'd like dynamically use the "Xml.Serialization.XmlIgnore" attribute on. The idea being if I want to save specific property info, I manage it by setting/clearing a flag. Is that even possible? ...

how to copy files to C:\temp in VS 2008 setup project?

I am learning use VS 2008 setup project to create MSI installer for our C# application. The target system is Windows 7 embedded. Did some research online and couldn't find answers. Because the application will be installed on Win7 machine. We need to put some files in C:\temp folder for read and write. how can I copy those files into C:...

Is there a better way to sort my IList-bound GridView?

I have an asp.net web application that has a page with a GridView. The GridView is bound to an IList object. As you may know, the .net framework does not provide for sorting of such a GridView; the sorting must be handled in code. Here's the code I was able to draft. As you can see, the issue is that the name of the field to sort by ...

Passing a lambda to a method with diferent parameters

Is it possible to call a method passing a lambda with variable number of parameters? For example: public void Go(Action x) { } I need to call it passing parameters, such as: Go(() => {}); Go((x, y) => {}); Go((x) => {}); Is it possible? How? ...

2nd BeginInvoke call claims already completed. Why?

I'm repeatedly calling a method with BeginInvoke. After each call, I call EndInvoke. The problem is that for the second call, the IsCompleted member in the returned IAsyncResult is set to true IMMEDIATELY after the BeginInvoke call. This causes a malfunction, because the program then thinks the second call is done. Why does it do thi...

how to validate a safe filename with double (.) (.) "fileName ..pdf"

Im sarching how to create a safe filename in my webapplication I had read a lot of post around here last one http://stackoverflow.com/questions/62771/how-check-if-given-string-is-legal-allowed-file-name-under-windows but I can't find the solution for this example when the filename comes in the way "fileName ..pdf" (double dot), the brows...

Simple way to read and write name value text file

Hi I have some class with lots of fields; public class CrowdedHouse { public int value1; public float value2; public Guid value3; public string Value4; // some more fields below } My classmust be (de)serialized into simple Windows text file in the following format NAME1=VALUE1 NAME2=VALUE2 What is the most co...

finger print reader for .net windows forms / WPF or silverlight client

We are designing a solution that will be used on an internal network. One of the requirements is to have an extra level of security beyond a simple user name and password. Does anyone have information about how to implement a finger print reader in a .net application? We have Thinkpads with a finger print reader. ...

What does .net source (C#, VB.net) look like in other (non-english) languages?

As the title says, I am just a little curious...I have seen some European open-source projects post the source, but it was all syntactically identical. What about Chinese or Japanese or other more complex character-based languages? UPDATE: This was a little misleading I guess. I was asking about the "traditional" .Net languages like...

how to check if window is on top through "usercontrol"

how to check if window is on top through usercontrol i would like to set focus on a button, when window in on top of all on the desktop. ...

Activator.CreateInstance my instance?

I have a piece of code to open an instance of a COM object and perform different tasks. My problem is that if the application that I open with COM is already running then I reuse that instance. I would always like to have new instance and work with that and finally close. Anyway to do that? Type t = System.Type.GetTypeFromProgID("QlikTe...