.net

Is there a way to migrate Delphi 2010 forms into Delphi Prism (.Net ) XE forms?

I know that since "native" delphi and delphi.net are different technologies it is unlikely to produce a tool that can migrate your old dfm forms to win forms for delphi prism. However is there a tool that facilitate such migration? Basically I have a "native" delphi project that I want to migrate to delphi .net, it is a desktop applicati...

how to create iDoc Fine using c# Asp.Net

can any one help me how to create iDoc File in C#? if there any general approach is there for generation iDoc File? ...

C# 4.0 PInvoke Issue (ATI AGS Library)

Hey guys, I downloaded the ATI AGS (ATI GPU Services) Libary, and am attempting to retrieve some basic driver information using this API, from C#. The ATI AGS library is available for download from here: http://developer.amd.com/gpu/ags/Pages/default.aspx I wrote a little bit of C# code to pull driver information from the GPU using th...

iterate thru SQL db by row

Hi, Not sure if phrasing this right, seems simple but not sure best way to do it. Basically, I've got a simple database identifying items of clothing. Just ItemID(PK), ItemName and ItemLink(just the name of the jpeg for that item, which I'll use in .net to construct the correct image url for that item). Client doesnt want anything fan...

How to make WPF App as OLE object which can embedded in MS Excel ?

I want to make my WPF app as an OLE object which can be inserted and launched from an MS-Excel . When I open an Excel-2003 and go to Insert->Object a list of OLE object are shown in Create New tab. I want to register my WPF app as an OLE object so that it is also shown in the list. User can able to insert and launch the appliction from ...

Hash code in Dictionary<TKey, TValue>

I was playing around with Dictionary and stumbled across the below scenario public class MyObject { public string I { get; set; } public string J { get; set; } public string K { get; set; } public override int GetHashCode() { int hashCode = (I+J+K).GetHashCode(); Debugger.Log(9, "INFO", hashCode.ToSt...

Reverse of Expression<Func<T,TResult>>.Compile()?

Since we can: Expression<Func<int, bool>> predicate = x => x > 5; var result = Enumerable.Range(0,10).Where(predicate.Compile()); How can I: Func<int,bool> predicate = x => x > 5; Expression<Func<int,bool>> exp = predicate.Decompile(); That is, I want to get the corresponding Expression of the Func. Is it possible? ...

performance issue regarding Open() and Add() methods in MS Word,VSTO

For Office 2007, we have the .NET component which invokes the word, it uses the Open() and Add() methods from the Word.Document. Dim wrdDoc, wrdrtf As Word.Document wrdrtf = wrdApp.Documents.Open(objRTFPath, objMissing, objMissing, False, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, o...

use vb6 dll in c#.net problem

i am using vb6 dll in c#.net. It is working properly but when i host it on iis then it shows an error S*ystem.Runtime.InteropServices.COMException: Unable to show modal form within this context* i am using vb6 dll in following way first register it, then add reference in my project and use it so tell me how can i solve that problem ...

Developing valid xhtml document from unformed html

I want to develope the valid xhtml doc the input doc is not well formatted i managed to correct some errors but stuck up in condition like <span>......<p></span>...</p> there can be any tags in place of span and p......but condition is as mentioned i want to handle this condition i m new in .net c# plz do the needful.... thanx. ...

.NET class for quickly find out Value based on Key and vice versa

Very often I use Dictionary<TKey, TValue> type to store ehh...dictionary type of values, e.g. Key = 1, Value ="Canada". But in many cases, values in the dictionary data is also unique, just like the Keys. And I find that for Dictionary<TKey, TValue> type, it is not very convenient to get key value based on value. My question is, which ...

SqlConnection.ClearAllPools, what is cleared?

I have an application which uses SqlConnection.ClearAllPools to close all connections before dropping a database. There is a case where a connection is still there. This connection had been created in another application domain. So I wonder which connections are closed by SqlConnection.ClearAllPools? Only the connections opened by t...

Create SQL Server database programmatically with C#

I'm trying to follow this example but I get an Exception related to the connection string telling me that the server was not found or was not accessible. The tutorial itself tells me on step 5 to "Change the connection string to point to your computer running SQL Server". I don't know if my SQL Server is running or not and if it is I don...

sql server vs postgres in .net SqlConnection vs NpgsqlConnection

I'm experimenting with postgres and sql server the same query in sql server gives me: CPU time = 31 ms, elapsed time = 800 ms. and in postgres: 38 ms but when I do the same query via .net using SqlConnection,SqlCommand and NpgsqlConnection,NpgsqlCommand the sqlserver is 30% faster can anyone explain this ? ...

Convert MP3 to WAV in Memorystream for Playback with System.Media.Soundplayer

I'm trying to use the NAudio library to do some InLine conversion of some soundeffects for Playback with my application using the Media Soundplayer for the actual playback. (I find NAudio playback is a bit jittery for direct playback, hence the Conversion) I really don't want to be extracting the files to disk to playback instead i'd li...

Creating component to access multiple databases

Hi, I need to create a data access library to access data from multiple databases like SQL, Oracle. The Library should work equally with all databases. In .NET i guess ODBC will help me in doing this. But do I need to think about any other alternatives? And if I finalize ODBC what special precautions I need to take ? ...

Tag cloud control for WPF

Could anyone provide me an implementation of a tag cloud control for WPF, o point me to a site that shares one? I am developing a WPF aplication with Visual Studio 2010, and I am using .NET Framework 4.0. ...

WF: Check if the workflow application was cancelled from a custom activity

Hi, How can i check from my NativeActivity if the 'Cancel' method of the workflow application was invoked? I tried to use the 'IsCancellationRequested' property of the context but it doesn`t much. Here is my sample: public class Program { static void Main(string[] args) { ManualResetEventSlim mre = new ManualResetEve...

Multiple hops impersonation in .NET and web services

I have old school web service and it is configured to impersonate the caller. Works with no problem. Now I am thinking about adding another more higher level ASP.NET (non-wcf) web service which would be calling the original web service. The question is - will the client identity flow across two hops as in client (1)-> new web service (2...

Folder permission on server while uploading?

I want to upload files in my Asp.net application on server but I have to grant it R/W access so that I or anyone can upload files in it. Is there any way that I write some code or configuration lines in Web.config which solve this permission problem? ...