.net

Running Compact Framework 1.0 Application On Windows Mobile 6.1 And Windows Mobile 6.5

I have a application developed based on Compact Framework 1.0. I can run it, on Operating Systems that version number is smaller than Windows Mobile 6.1 But I can't use it on Windows Mobile 6.1 and 6.5. Before installing app, I install these cabs: 1 - netcf.all.wce4.ARMV4I 2 - sqlce20.ppc.wce5.armv4i 3 - sqlce20.dev.ppc.wce5.armv4i ...

How to convert hash data to original data?

I hashed data with ComputeHash how can I learn original data from hashed data? private void btn_Hash_Click(object sender, EventArgs e) { HashAlgorithm ha = HashAlgorithm.Create(); Stream file = new FileStream(@"C:\temp\simetrik.txt", FileMode.Open, FileAccess.Read); hashClass.hash = ha.ComputeHash(file); listBox1.Items....

Can't add a reference to System.Web to my Windows Service aplication

Hi I'm trying to create a Windows Service in VS2010 but can't seem to add System.Web as reference. When I browse for it and add it manually I get an exclamation mark over the reference. I've tried adding it for other projects and it works fine, just not for a windows service project. Is there a reason for this? I need it to call System....

How to add a new counter to an existing performance counter category without deleting the old counters?

I have a custom counter category, to which I need to add a new counter, without deleting or resetting any existing counters. How can I do this? I tried using CounterExists(), but even after I create the counter, how can I associate it to a CounterCreationDataCollection item and associate it to my existing counter category? ...

C# - Capturing Windows Messages from a specific application

I'm writing a C# application which needs to intercept Window Messages that another applications is sending out. The company who wrote the application I'm monitoring sent me some example code, however it's in C++ which I don't really know. In the C++ example code I've got they use the following code: UINT uMsg = RegisterWindowMessage(S...

Can C# socket.select return more than one sockets

Hi, I wonder if Socket.Select from .Net can return an IList of two or more elements. So far in my testing, they always return one element after the other (Socket.Select is inside a loop). May I know what kind of testing that you did to be able to return two or more elements? ...

Windows service startup causing a windows error

We have written a custom windows service (VB.NET, .NET Framework 2.0) that takes a while to start up, because it uploads sales. Protected Overrides Sub OnStart(ByVal args() As String) -- upload sales here End Sub That fact that it takes a long time to start up is fine, but that generates a time-out error in Windows and another progr...

Externally editable strings in .NET assemblies?

Is it possible to have strings in a .NET assembly that can be edited by some external tool? If it is, what tool? For instance for a single-file Windows Forms application that can be installed simply by copying the single file (no installer required), and where a build system (or a manual process) configures the application on a per-clie...

Using Entity Framework with MyIsam tables

Hi, Got a question about Entity Framework and MyIsam tables. My production database consists of MyIsam tables only. Often with a primary key like UserId and then a secondary KeyId that is auto incrementary. Since secondary auto incremantary keys are not allowed in InnoDb, and there will be ALOT of work to get rid of them before convert...

How to get the child directory and file names of the website

If we know the URL, can we access the names of the files inside the parent directory. Like we do in dos, when we enter a folder we can view the list of files inside that directory by giving command DIR For Eg., If we have URL like http://www.ahilam.com . I want to know what are the files and folders inside the ahilam.com such as htt...

.NET 4 side-by-side execution, what is loaded in which case?

I've been doing a bit of investigative work into .NET 4 side-by-side execution recently and, while I have found out a fair amount, there are still some open questions in my mind. My queries are really around in-process loading of libraries into client applications. If I have a client application that uses v4.0 of the CLR then my underst...

Implementing flick or smooth ( or kinetic ) scrolling in Silverlight?

I need something like ListBox scrolling in iPhone OS (iOS). How can you implement flick/smooth/kinetic scrolling in Silverlight? ...

Overloaded VB.NET extension method in class library

It seems that my library of extension methods that was written in VB.NET has problems. I have 2 overloaded extension methods Crop(). When i reference the lib from a VB.NET project i see them. If reference it from a C# project i can't see them. What the hell is going on? ...

Check or uncheck all TreeViewItem children

My project is WinForms, C#. I have a form with TreeView with CheckBoxes set to true. There are a few root nodes each having multiple children nodes. I'd like to have all children nodes to have the same checked/unchecked state as their parent. I wrote the following event handler: private void treeView1_AfterCheck(object sender, TreeVie...

Getting an Image object from a byte array

I've got a byte array for an image (stored in the database). I want to create an Image object, create several Images of different sizes and store them back in the database (save it back to a byte array). I'm not worried about the database part, or the resizing. But is there an easy way to load an Image object without saving the file t...

Generating LINQ to DB2?

I have an existing DB2 database at my job. (At least, I think it's DB2. They refer to it as "the iSeries" and it looks and feels like DB2 on some mainframe-ish hardware.) For years the .NET developers in my department have just manually written ADO commands and queries to get specific data from specific tables, etc. At the moment I'm...

Multi ORM solution

Hello, I would like to know what's the best way to develop an multi ORM solution. Until now all the projects I saw are strongly related with the choice of ORM and they stick with it until the end. Nhibernate, Castle ActiveRecord, Linq to SQL, WilsomORM, LLBLGen, SubSonic, Entity Framweork, others... I was thinking if I should or not, ...

Is it possible to setup a DataGrid (SWF) to resize to the optimal size?

Where "optimal size" is "all rows and columns are visible, but not more". (e.g. no dark gray background is visible) Edit: To clarify: I dont want to auto resize the columns. I have fixed width columns and rows. I want to have the whole control resized. e.g. reduce the width if there is dark gray space visible, increase the width if not ...

is it ok to use plinq ForAll for a bulk insert into database ?

I'm doing like this: entities.AsParallel().ForAll(o => repository.Insert(o)); is this good, am I going to have more performance with this ? ...

Exchange Management Powershell - How can I get the value of the Name property here?

How can I get the return value of only the Name Variable? RunspaceConfiguration rsConfig = RunspaceConfiguration.Create(); PSSnapInException snapInException = null; PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapInException); Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsCon...