.net

Run process in .NET and C++

I search for the function that run programm by path, and working of main programm is stopped until run second programm. Can i do that by using System.Diagnostics.Process class? ...

Auto Generate alphanumeric Unique Id with C#

Hi All, total string length is 5 chars I have a scenario, ID starts with A0001 and ends with A9999 then B0001 to B9999 until F0001 to f9999 after that FA001 to FA999 then FB001 to FB999 until ....FFFF9 Please suggest any idea on how to create this format Thanks in advance ...

Can I write my owm template in TextFormatter used in Logging Application Block in C#?

Can I write my owm template in TextFormatter used in Logging Application Block in C#? Basically I want to write my exception log in atext file and in specific format where I want to include database information and software version. ...

What are the differences between MSI and EXE installers, and which should I choose?

I am working on an installer for a new version of my project (C#). Previously, I've used Inno Setup to create .exe files for installing my projects on other computers in the workplace. While reading through some tutorials, though, I came across Windows Installer XML, which uses XML files to build a .msi installer. My project will be av...

Square boxes instead of letters - asp.net bug, how to resolve?

Hi, I have a asp.net page with .net controls. For a long time, many years, pages was run correctly. But lately some signs were change from their normal display mode to squares. Looks like some encoding issue, but changing it, dosen't help. How can I resolve this issue? Why do I see square boxes instead of some signs? ...

Why SelectedIndexChanged fires for a DropDownList when a button is clicked?

I have an ASP.NET DropDownList with AutoPostBack=true and EnableViewState=false. I have a button on the page that does nothing. If I change the selection in the ddl, it posts back , which is expected. If I click the button, the page posts back and the ddl's SelectedIndexChanged fires. Why does it get fired? ...

Design workflows for WF4 in Silverlight

Hi, Our system is based on flows and activities and we want to give the analysts users the opportunity to create dynamics flows (at runtime). The designer UI based on SL 4.0 . It looks like WorkflowFoundation is the most valuable solution but we didn`t find any WF version that fits to SL (to create the xaml in SL). Any ideas? any oth...

Build a Visual Studio Project without access to referenced dlls

I have a project which has a set of binary dependencies (assembly dlls for which I do no have the source code). At runtime those dependencies are required pre-installed on the machine and at compile time they are required in the source tree, e,g in a lib folder. As I'm also making source code available for this program I would like to e...

Mocking tools for c# on .NET

Im new to C#/.NET . But Ive been doing TDD for quite some time now. I wanted to what is the best framework that can be used for mocking objects while writing tests in c3 ...

How to do NHibernate queries with reference as criterion?

I'm trying to do a query through NHibernate where the criterion for the result depends on a referenced table. How do I do this? Let's look at a simple example: public class Foo { public int Id { get; set; } public string Name { get; set; } public Bar ReferencedBar { get; set; } } public class Bar { public int Id ...

Windows - put HDD stand-by and sleep mode

How can I put a hard disk drive in stand-by or sleep mode in Windows, in a programmatic manner. Does the Windows API or any .Net libraries provide any functions to achieve this? (I am aware that I should probably not interfere with Windows's power management mechanism, but this is not something I intend to use in a production environme...

Convert RGB Colour to OLE_Color

I have the unenviable task of maintaining an ActiveX control that expects OLE_Colors as the back/for colour of the control. Is there a tool or a .NET code sample that will convert from an RGB colour (or a hex colour) to an OLE_Color? ...

WPF Orthographic Camera. Region of view

Hello. I added Orthographic Camera to my project. I want to show my chart on screen proportional. For example height is 4 and width 4 (region from -2 to 2). I set width to 4 and it perfectly fit my square in widht. but i have problem with height. The chart top and bottom is always out of screen space. Why this happens and how to set to...

Capture and display console output at the same time

Hi, MSDN states that it is possible in .NET to capture the output of a process and display it in the console window at the same time. Normally when you set StartInfo.RedirectStandardOutput = true; the console window stays blank. As the MSDN site doesn't provide a sample for this I was wondering if anyone would have a sample or could po...

.NET command line argument bug?

Hello, I am trying to read command lien argument but it seems there is some kind of bug in .NET. The parameter which I pass to my console application /i "C:\Projects\PC\trunk\Simulator\PDF-Source\PDF-Source\bin\Debug\ConversionFiles\dummy.pdf" /o "result" CommandLine variable return three arguments, but I pass four and values of thes...

Visual Studio and .NET programming

Hi, I just want to ask whether I am right or not about .NET. So, .NET is new framework that enables you to easily implement new and old windows functions. It is similar to java in the way that its also compiled into "bytecode", but its name is Common Language Infrastructure, or CLI. This language is interpreted by .NET Framework, so code...

How to emit silverlight assembly using AssemblyBuilder

In desktop CLR using AssemblyBuilder, how do I emit a silverlight application? I want to dynamically create a new silverlight application within the desktop clr. Should I use ildasm to relink base assemblies as shown here? http://www.codeproject.com/KB/silverlight/SLAssemblies.aspx ...

WPF custom Button using Geometry from resource

Is there a way to use a collection of PathGeometry like these: Path 1 F1 M 170.255,178.837L 170.255,221.158C 170.255,228.917 164.174,230.777 156.745,225.286L 136.003,209.973C 128.572,204.488 128.572,195.512 136.003,190.023L 156.745,174.706C 164.174,169.217 170.255,171.079 170.255,178.837 Z Path 2 F1 M 152.29,174.464L 134.314,187.734C 1...

What version of WSDL is supported in dotNet 2.0?

What version of WSDL is supported in dotNet 2.0? ...

Is there a way to programmatically convert a SQL Server query plan to an image?

I'd like to be able to convert SQL Server query plans from XML to images. Ideally a vector format, but a bitmap would do. Is there an open source library to do this? Or can I use one of the SQL Server Management Studio DLLs? Thanks. ...