visual-studio-2008

using unicode character set in VS 2008 project settings

Hi, In a project i need to set "use unicode character set" for Configuration Properties>General>Character Set. On compiling the project, error c2664 is returned on this code: char Filename[25] = {0}; GetLocalTime(&st); sprintf(Filename,TEXT("C:\\CpmMicr%02d%02d%04d.log"), st.wDay,st.wMonth,st.wYear); When I change the character se...

Why is registry value not installing?

I am using the Visual Studio 2008 Installer. I am trying to set a registry value and it is included in the Setup project. After I install the application using the setup that I created, the registry value doesn't show. I have followed all the steps listed here. Why could this be happening? ...

Any way to collapse value/function definitions (F#) in Visual Studio 2008?

Is there a way to "collapse" functions and values in VS2008, like one would do for objects in languages like C#? It's incredibly time-consuming and frustrating to wade through hundreds of lines of nested function definitions. ...

Redirect the output (stdout, stderr) of a child process to the Output window in Visual Studio

At the moment I am starting a batch file from my C# program with: System.Diagnostics.Process.Start(@"DoSomeStuff.bat"); What I would like to be able to do is redirect the output (stdout and stderr) of that child process to the Output window in Visual Studio (specifically Visual C# Express 2008). Is there a way to do that? (Additiona...

Create db from sql script in VS 2008

Hi, I have worked on Visual studio 2008 before, but do not have a lot of experience in working with databases. I have a Sql Script file which contains the complete information about the datanase that i am supposed to replicate and use in my project(which is a web site). Could someone guide me as to how am i supposed to use the Sql script...

URL Rewriting in visual studio c#

Hi, I have a couple of questions with regards to implementing URL Rewriting in Visual Studio 2008 I am currently using Intelligencia.UrlRewriter to implement URL rewriting in CS 2008. However the rewrite rules are a little different as compared to the IIS7 rewrite rules.Is there a way we can use the same rules while debugging in VS200...

Cannot commit DataSet changes to database

I've written a small form that reads the data from a database table (SQL CE 3.5) and displays it in a DataGridView control. This works fine. I then modified it to make a change to the data before displaying it, which also seems to work fine with the exception that it doesn't seem to actually commit the changes to the database. The code i...

Visual Studio 2008 HTML auto-formatter

Visual Studio 2008 "auto-formats" any block line elements such as div, h1, etc. using a line break after the opening tag. This has always bothered me when it comes to h1, h2 etc. I pretty much always have them on a single line. Is there any way to configure Visual Studio to keep these on one line? I.e. this is what it does <h1> Th...

Not every dynamic MenuItem is processed, why?

Hi guys. On a masterpage I have ASP Menu control. It looks like this: <asp:Menu ID="mnuMainMenu" runat="server" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="Medium" ForeColor="#7C6F57" Orientation="Horizontal" StaticSubMenuIndent="10px" Font-Bold="True" F...

Audio Recording and playback VC++

Hi folks I am planning on recording audio, and later play it back, for on of my projects. The requirement is that it should be c++ ( Visual studio 2008 ) compatible. Rest of our application is mostly in silverlight/ VC++. I have worked with NAudio before in C#, but nothing on vc++. I would like to know what is best suited for my needs...

Saving Working Directory path when distributing a project

In Visual Studio you can specify the working directory of your executable by going to propject properties > debugging (this is needed to run Ogre projects for example from within Visual Studio). My working directory is usually in the form of $(SolutionDir)\bin\release\$(ProjectName).exe. When I distribute the project, the working direc...

Minimize on FormClose prevents computer shutdown

I have a simple Form-Based .NET application. In this I capture the FormClosing Event to prevent the closing of the application, instead I minimize it. The application should always be open. Here is the code I use: private void Browser_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; this.WindowStat...

How to make windows application for single system(machine)

I want to make .exe for desktop application which can only used once in whole life.Nobody can run it twice. ...

marshal_as, strings and fields vs. properties

Hello, #include "stdafx.h" #include <string> #include <msclr/marshal_cppstd.h> ref class Test { System::String^ text; void Method() { std::string f = msclr::interop::marshal_as<std::string>(text); // line 8 } }; This code when compiled with VS2008 gives: .\test.cpp(8) : error C2665: 'msclr::interop::marshal_as' :...

I'm trying to create a as400/Iseries Telnet Client, and can't find any documentation.

I am attempting to create a telnet client that I can use to transfer green screen RPGLE apps to fancier client applications. I am able to establish a sockets connection and I have sent in a default "enter" command to access the log in screen but I don't know where to began to interpret where the fields are, where the server id of the ses...

knowing if a site was published in release mode or debug mode

hi all! how can i tell the diffence between a website that has been published in release mode and the same website that was published in debug mode? thank you ...

issue with using MSBUILD with maxcpucount option

I am using MsBuild on a 4 core machine. I am giving the following command line to build 4 projects belonging to a big VC++ solution ( having more than 4 projects ALL with no mutual dependencies ). I am using Visual Studio 2008. To speed up the build time I am trying to take advantage of the maxcpucount options but it seems not working....

Creating a new user account during the installation process

Hi, I need to install a windows service running under a given user. It is working with an existing user (ServiceProcessInstaller = User) but when the user does not exist then it should be created before the service install happens. The user must be a mamber of administrators. How should I do it? (VS2008, C#) Thank You. -- Hudgi ...

Can't specify a file path prefix in program

In my program I am trying to construct a filename with a path to point to a particular folder where my data is stored. I have something that looks like this: string directoryPrefix = "C:\Input data\"; string baseFileName = "somefile.bin"; string fileName = directoryPrefix + index + " " + baseFileName; However the compiler keeps saying...

C++ time_t problem

Hi SO, I'm having trouble with dates management in C++ (VS 2008). According to MSDN specifications, time_t represents: The number of seconds since January 1, 1970, 0:00 UTC therefore, I've written this piece of code: #include <stdio.h> #include <time.h> time_t GetDate(int year, int month, int day, int hour, int min, int sec) { ...