.net

WinForm: Selection box flickers when dragging the mouse

Hi. I made a click-drag selection box in a picture box. In the picturebox Paint event hander I use e.Graphics.DrawRectangle(pen, rectangle); and update the rectangle and refreshe the picturebox in the mouse move event handler. The selection box looks smooth as long as the mouse remains at the bottom-right corner (i.e. drag to right/b...

Lambda's in VB.net?

In C# I would simply do this: myIEnumerable.Where(i=>i.ReturnsABool()).any(); How would I do that in VB.net? I'm stuck on how to formulate the lambda.. ...

jump into file line c#

how can i jump into some line in my file, e.g line 300 in c:\text.txt? ...

Is it a bad idea to use recordId as hashcode?

Suppose I have a simple DTO object right out of the database, and the Id is a recordId that is definitely unique, is it a good idea then to do the following ? public class DTO { public int Id { get; set; } public override bool Equals(object obj) { return (Id == ((DTO)obj).Id); } public override int GetH...

Executing CPU/GPU instructions from managed code

Taking into account the execute disable bit what is the recommended way of executing instructions against a native processor from a high level managed environment such as VB.NET 2008 or C#. In addition has anyone achieved similar in executing GPU instructions against a graphics processor? ...

.Net Method for converting String to HTML Escape Characters

I want to convert an e-mail address into HTML Escape Characters as a basic way to try and avoid being harvested by spam-bots. Like mentioned in this question: When placing email addresses on a webpage do you place them as text like this: [email protected] or use a clever trick to try and fool the email address ha...

Obtain DataTable names from Flex

I have a C# web service that returns a DataSet with multiple DataTables. It's easy enough to get at the data using this web service event handler in Flex: static public function getData_Handler(event:ResultEvent):void { for each(var table:Object in event.result.Tables) { // ... } } How can I access the name of ea...

Can I set to ScrollBar a floating Step?

Hello. I have a panel in witch I represent a timeline - 24 hours(24 x 60 min = 1 440 min). I need to set my scroll bar's step to a minute. It's evident that minimum size of such a panel should be 1440 pixels. Let's say the screen resolution on the client screen (width) is 1280, so say panel container max size is 1280. Now, if I want...

creating a dump file for a managed (.net) application using windbg (or mscordmp)

I'm looking into creating dump files for a managed process. I know that I can use windbg to create a dump file, but I'm wondering if their are any special flags that I should pass to the ".dump" command, given that it's a managed application instead of a native one. a related side question: I've heard of a tool called mscordmp.exe (if...

DataAnnotations vs IDataErrorInfo

DataAnnotations vs IDataErrorInfo Pros and Cons of both? Benefits of one over the other? (especially related to MVC) ...

Tools for Building an OCA (Occasionally Connected Application)

I will be building an in-house, Occasionally Connected App (OCA). What technologies would you suggest I employ. Here are my parameters: .NET Shop(3.5sp1) C# for code behind (winform,wpf,silverlight) SQL Server Backend (2005 or possibly 2008 pending approval) Solo Developer Solo SQL Administrator Low Tech end users Low bandwidth to 5 B...

what dlls do i need

i have a silverlight project it references other dlls in the bin folder it looks like this myproject.dll otherproject.dll otherdll.dll If I want to reference my project from another project what dlls do i need to copy over? Can i just copy over the myproject.dll or will it break? ...

Domain Driven Design: How to access child of aggregate root

If I have an Order class an as aggregate root and 1000 line items. How do I load just one of the 1000 line items? As far as I understand, a line item can only be accessed through the Order class and has a "local" identity. Would I still create a repository method at the OrderRepository like "GetLineItemById"? Edit to comment the answer...

ArcGis and GeoCortex

Hi, we are tying to set-up GeoCortex with our ArcGis server but can't seem to get it right. We do see some of the requests that have been made to the application, but we don't have a lot of details about it, only the number of image requested, I was wondering if you guys had any problem with this (if you ever tried it) and if I could ...

Problem with FIPS Validated Cryptographic Algorithms

Hello All, I am running Visual Studio 2008 Version 9.0.30729.1 SP with .NET 3.5 SP 1 under Windows XP Pro Version 2002 SP 3 with an Intel Core 2 Duo E8400 3 GHz processor. I am developing a C# WPF application that uses the Microsoft Patterns & Practices group's Composite Application Library (CAL). I am getting the following compliatio...

FTP code producing "secure connection required (code=530)"

I'm using the Secure FTP product from EnterpriseDT. The setup below worked for one of my projects, but it's failing with Rejected--secure connection required (code=530) on another that pointing to a different address. Dim ftp = New EnterpriseDT.Net.Ftp.SecureFTPConnection _ With {.LicenseOwner = "[REDACTED]", _ .LicenseKey...

SSIS: Oracle Multiple rows to one column output without STRAGG

Looking to generate a comma separated list of languages when the ID is the same. Table 1: ID | LangID 1 1 1 2 1 3 2 3 2 4 3 1 Table 2: ID | Language 1 English 2 Spanish 3 French 4 German Want to generate results that look like: ID | Languages 1 English, Spanish, French 2 French, German 3 Eng...

Force Windows Classic Theme for Application

Hey Guys, I've searched around for this question but couldn't come up with anything. The Problem: If a user changes the Color Scheme on their Windows Desktop, it tweaks some functionality in my .net application. Is there any way for me to FORCE my application to use the Windows Classic Theme, regardless of what the user's theme has be...

Updating an ObservableCollection in a separate thread

In a WPF application an ObservableCollection is filled and updated by LINQ to SQL queries. Then UI objects are updated using values from this ObservableCollection. Is it possible and reasonable that operations of updating this ObservableCollection by LINQ to SQL queries were executed in a separate thread? If yes, will, in this case, i...

C# Type-casting oddity - interface as the generic type

I've just run into what I think is an oddity in type-casting. I have code similar to the following: interface IMyClass { } class MyClass: IMyClass { } class Main { void DoSomething(ICollection<IMyClass> theParameter) { } HashSet<MyClass> FillMyClassSet() { //Do stuff } void Main() { HashSet<MyClass> classSet = Fi...