.net

How to Add cursor files in resources of control Library project

Hi, I am creating a Control Library project. I have some Cursor files which i want to add on resources. Because on Resources.resx--->Add resources is only for String, Icon (.ico), Text file(.txt), Image (Png,bmp,jpeg,gif, tiff) files. So where i can add *.cur files. How can i do it? thanks ...

C# HTML editor to create forms

Hey all, I posted a similar topic for RoR, but didn't know how to edit my tags, so I'm making a new one for C#... I'm looking for a HTML editor which can be integrated in a C# app that has the possibility to create forms. Not forms per se, but I need the possibility to add radiobuttons, input fields, checkboxes and so on. There are many ...

Check if server exists

Here is the problem. User can enter server name and connection string for database. If server is not accessible (wrong address, firewalls or any other issue), I want to be aware of this as quickly as possible. If I'm using sqlConnection and try to connect to a non-accessible server this takes very long (I think more than 1 minute!). Thi...

How to unregister a Control from HelpProvider?

I'm having a user control (referred to as 'parent') which dynamically adds or removes other controls ('child'). The parent maintains a HelpProvider object that is supposed to be queried for help strings associated which controls contained in child ('subchild'). The subchild controls are not accessible directly, so I am planning to provi...

Can you mix .NET framework Versions in a solution?

Our codebase where I work is .NET 2.0. For our new assembly/DLLs/web applications I would love to take advantage of what 3.5 has to offer. Can one mix .NET frameworks(per assembly) in a solution? Are there any IIS related caveats to this? I would love to hear any positive/negative/howto feedback. Let me know! Thanks! ...

Why can't I use interface with explicit operator?

Hi, I'm just wondering if anyone knows the reason why you are not allowed to use interfaces with the implicit or explicit operators? E.g. this raises compile time error: public static explicit operator MyPlayer(IPlayer player) { ... } "user-defined conversions to or from an interface are not allowed" Thanks, ...

Can I get a WPF ListBox to inherit brushes from parent element?

My WPF window has its foreground brush set to a brush from a resource dictionary, and I want all text in the window to have this color, so I don't touch the foreground brush in anything else. Textboxes get the color Textblocks get the color Buttons get the color Listboxes do not get the color, and so neither do their contents. Is ther...

how do i cast a .net single to equivalent byte array that can be stored on the heap?

how do i cast a .net single to equivalent byte array that can be stored on the heap? this is to be used as a glfloat ...

Windows Explorer argument not being interpreted?

I'm currently using: Process.Start("explorer.exe", "/Select, " + fullPath); //with file name.extension That basically tells windows explorer to open the folder where the file is in, with the given file selected. But, by the forces of evil, sometimes it works and sometimes it just opens the file ("/select" is... ignored) Has anyone e...

[C#] Implementing different windows/forms in a Windows Mobile application?

I am a bit new to Windows Mobile (with C# and the compact framework) development, so I am kind of unsure how to do this. The user has to go through several pages of information in a wizard-like manner. At the start there is a login window. How would I go about and implement this? Would I just have different User Controls for each page a...

Downloading files from the database in Asp.Net Mvc

I'm storing my files in the database and need to download a file when button clicked. i can get the File content (Binary) in the action method. But how to return it as a file to the user? ...

SharpSSH gets stuck in an infinite stream read in C# SSH app

Afternoon all, I'm having a small problem with the SharpSSH library for .Net (see http://www.tamirgal.com/blog/page/SharpSSH.aspx) SshStream ssh = new SshStream("some ip address", "some username", "some password"); ssh.Prompt = "\n"; ssh.RemoveTerminalEmulationCharacters = true; ssh.Write("s...

ASP.NET Server Controls and <%$ %> params like ConnectionStrings

Is there a complete list of the objects you can tap into with <%$ %> tags in ASP.NET I know you can do things like <%$ ConnectionStrings:northwind %> in the ConnectionString attribute of the <asp:SqlDataSource> tag. Can you also do this with Cookies and Session? Is there a <%$ %> reference page out there? ...

Suggest encoding which removes slashes which I can use as the format for REST-style URL-paramteters

Given a path to a REST style URL: http://site.com/rest/customer/foo/robot/bar/1 When you GET it, it returns a PDF to the foo-customer containing page 1 of the bar-URL. While foo is the name of the customer bar is an URL. The URL usually contains slashes and might look something like this: http://anothersite.com/interestingarticle.ht...

What is the simplest way to extend Castle windsor to support private constructors for every service

Hi there, We want to be able to Resolve services using Castle for implementation with private constructors. This is a fictive "use case" for that: public class SingletonClass : ISingletonClass { private SingletonClass() {...} // Class users cannot create an instance public ISingletonClass Instance { get { ...

System.StringComparer that supports wildcard (*)

Hi, I'm looking for a fast .NET class/library that has a StringComparer that supports wildcard (*) AND incase-sensitivity. Any Ideas? ...

Is there a way to programmatically extract the sound portion of a Flash SWF file with .NET?

Do any libraries exist with this functionality? Any recommendations would be useful. Thanks. ...

Using assembler x86 to write to .net

I'm a total beginner when it comes to computer languages, and was asked for a code to write .NET with assembler x86, and i'm stuck here at the moment. Any basic code lines would work, still couldn't find any on the web. ...

WIX debug version "insufficient privileges to start service"

Hi to all, I have built a WIX project which installs and starts services. For the release version it all seems to work fine but for the debug version I get "insufficient privileges to start service". Any clues why this is happening? Using .net/Visual studio. JD. ...

Problems with Unity BuildUp Method

Hi everybody) I'm using Unity App Block for my project (version 1.2.0.0). I have a problem with Unity Container BuildUp method which I'm using for my ascx controls. Here is some code (that's pretty simple) public class BaseUserControl<T>:UserControl where T:class { protected override void OnInit(EventArgs e) { I...