.net

Problem debugging .NET code with MS's Symbol Server

Hi folks, when i debug my ASP.NET web site code using the Microsoft debug symbol's for .NET .. i keep getting this silly 'result' for most of the variables when i'm debugging .NET framework code (which of course is provided by the Microsoft Symbol Server, which i told VS2008 to grab the info, from) Cannot obtain value of local or argum...

How do you show animated gifs with .NET Compact Framework

Hello, I would like to display an animated gif on a .NET Compact Form. Currently I use a PictureBox control and toggle between .Visible = true and .Visible = false. After .Visible = true the gif is shown however it's not animated. How can I get the .NET Compact Framework to animate it? I already tried this but it doesn't work. ...

Problem matching Code128A Barcodes generated with iTextSharp vs. Barcode.4NET

First of all, I'm kinda new to the barcode formats and what I do know, I've learned from Wikipedia. We have some barcodes generated by an existing app that uses the Barcode.4NET library. The barcode is in Code 128A format. The code to generate them is pretty simple, looking something like this: // Create the barcode Code128ABarcode c12...

Window handle C#/.NET

When working with window handles, is it good enough to use the plain IntPtr or should I subclass SafeHandle? Are there any significant pros/cons? Thanks. ...

How do I use Read-Only properties defined in partial (Entity Framework) classes over ADO.Net Data Services

I have objects that are defined by the Entity Framework that I have then added additional methods and properties to via partial classes. I think I understand most of the limitations around doing this, but wanted to confirm something I am seeing (or hopefully learn what I need to do to make this work). I have a partial class that then h...

Why in .NET System.Boolean takes 4 byte?

Why System.Boolean takes 4 bytes even if it just stores one state TRUE or FALSE; which may be stored less than 4 bytes? ...

WPF TwoWay Bind to current source with Converter?

Is there an issue with databinding in WPF when you bind to the current source (Path=".") and using a converter? The two way binding doesn't seem to work in this situation. I know I could change the path, but I want to be able to pass the "Name" value to the converter. I can't get the following example to work: <Window x:Class="WpfTest...

dotnet: ListChangedType.ItemDeleted is useless?

The ListChanged event for an IBindingList fires a type ListChangedType.ItemDeleted when items are deleted, perhaps by a user deleting a row in a datagrid control bound to the list. The problem is that the NewIndex into the list is invalid in this event, it's been deleted, and the item that was deleted is not available. There should be an...

Using versioned .Net assemblies

In our processing software we are moving from one version of an external assembly to a newer version. While the overall task that the assembly performs are the same, the API is radically different and no backwards compatibility have been maintained. The API is responsible for extracting data from external stations which may be running wi...

How to avoid FileNotFoundException if .NET 3.5 is not installed?

If you try to launch a .NET 3.5 application on a Windows computer which does not have this version of the .NET framework installed, you get a FileNotFoundException for some system assemblies (for example System.Core 3.5.0.0). Is it possible to catch this exception and tell the user to upgrade their .NET framework or is it thrown too ear...

How can I play with databinding to a desktop application like in web-based application

Hello all, I've a form and I'm doing databinding of my datagridview in the event "form load", the problem is, that the form takes a little (or a lot depends on the size of information) to load, because my data has a lot of binary information (photos) to binding there. In some sites, we can see a picture saying "loading", which is cool ...

What are major differences between C# and Java?

I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it. I've been asked this question on my job interview and I thought it might be useful to learn a bit more. These are the ones I could come up with: Java is "platform independent". Well nowa...

How do I tell if my application is running in an RDP session

I have a .net winforms app which has a few animation effects, fade ins and scroll animations etc. These work fine however if I'm in a Remote Desktop Protocol session the animations start to grate. Can someone suggest a way of determining whether or not an app is running across an RDP session so I can turn the effects off in this case? ...

How to provide user name and password when connecting to a network share

When connecting to a network share for which the current user (in my case, a network enabled service user) has no rights, name and password have to be provided. I know how to do this with Win32 functions (the WNet* family from mpr.dll), but would like to do it with .Net (2.0) functionality. What options are available? Maybe some more ...

How can I specify the name of the element when a object will serialize

I have the following class [XmlRoot(ElementName= "webSites")] //No capital w at the beginning public class WebSites : List<WebSite> { } public class WebSite { [XmlAttribute("name")] public string Name { set; get; } [XmlAttribute("url")] public String Url { set; get; } } this is serialized to <?xml version="1.0"...

Troubleshooting system.io.fileloadexception

Hello, I have a .net 3.5 WinForms application that runs fine on my machine, but on another machine it immediately crashes with a system.io.fileloadexception. Unfortunately, there are absolutely no details on which file failed to load, so I do not know where the problem actually is. I believe I know which one it could be (SQL Server Com...

Inner select on one to many

Hi all, I have 2 tables event + event_artist event eventId | eventName 1 , gig1 2, gig2 event_artist eventId, artistName 1, Led Zip 1, The Beatles ie Led Zep and the Beatles are both playing @ Gig1 I need to create the SQl to bind to a gridview ( you necessarily need to know about gridviews to answers this ) The results that i ...

Input Values for Nativemethods.GetSystemMetrics Function in .Net

This function appears to be a way to access all sorts of system values. For example nativemethods.GetSystemMetrics(4096) returns whether a session is remote or local. All I can find on the web are specific examples--does anyone know where I could find a complete list of input parameter values/what they return? Seems that it could be v...

File Security on Windows Vista with .NET Installer

I am trying to write an installer (by creating a .vdproj) that will work on both Windows Vista and XP. The only thing I am finding is that when I try to run it on Vista, the files that I include in the installer are installed with Read-only permissions for the Users groups. This is a problem because the application needs to read/write ...

How to include SQL Compact and .NET Framework in my Installer

I need to have my installer include the .NET Framework 3.5 SP1 as well as SQL Compact 3.5. I remember seeing a place somewhere in the Visual Studio IDE where these could be included in the install, but I can't find them. Does anyone know how to do this? Thanks! ...