James A. Gayhart's Q&A profile
Visual C++ cant check to see if a string contains certain data
erm got a slight problem with my program and i cant see the problem...any help please here is my code: private : Void NextQuestion( Void ){ // Seed random number generator with date and time DateTime moment = DateTime::Now; Random^ randNumGen = gcnew Random( moment.Millisecond ); // Create variable for random number Int32 intQuestNo = 0; // Get a number between 0 and the number of words in the array intQuestNo = randNumGen->Next( strQuestionsarray->Length ); // Use random number to select a question strQuestion = strQuestionsarray->GetValue(intQuestNo)->ToString(); // Check to see if question has already been added to the string. If not, add the number to the string so it cannot be ...Show All
Visual Studio Express Editions wide characters in program
#include "stdafx.h" #include <iostream> #include <string> int main() { std::cout << "Please enter your first name: "; std::string name; std::cin >> name; std::cout << "Hello, " << name << "!" << std::endl; return 0; } wchar_t where do i put this in for wide characters like japanese thanx Jonathan Caves - MSFT wrote: If you know that you'll never encounter any surrogates then it should work. There is currently a work-item progressing through the C++ Standards body that deals with real Unicode integration with the C++ Standard Library. I'm not sure where to go with this. Here's my sketchy impression of the state o ...Show All
Visual Basic Running a bat file
Hi Folks, I am trying to run a bat file from a VB.net app (VS2003). I have tried a number of things as shown below but none seem to work. Can someone please help shed some light. Dim Path = "C:\PConfiguration\Software\Ads.bat" ONE Dim xProcess As Process xProcess.StartInfo.FileName = "cmd.exe" xProcess.StartInfo.Arguments = " /c " & scriptName If you specify the following, the output of the script will be displayed in the current window. xProcess.StartInfo.UseShellExecute = False TWO Dim psInfo As New System.Diagnostics.ProcessStartInfo _ (Path) psInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal Dim myProcess As Process = System.Diagnostics.Process.St ...Show All
Visual Studio Can't install VS 2005 SP1 on Vista Ultimate
I can't install VS 2005 SP1 on a Vista Ultimate machine. When downloaded and "installed" via Windows Update, I get "Code 64C", and no further explination. If I download and try to install the fix directly (run as administrator) I eventually get an error telling me that the source code does not exist. All other Vista Ultimate updates have been applied successfully. I'm also running Office 2007 Ultimate. I can't un-install VS 2005 Pro from Add/Remove programs because it can't find c:\program files\microsoft\visual studio 8\vs_setup.msi during the VS 2005 maintenance mode program. I tried to copying vs_setup.msi from the install DVD to the aforementioned subdirectory, but I still got the same error message. I g ...Show All
Visual Studio Tools for Office Broke VSTO -- Now Outlook Add-ins won't run
I was debugging some code with a troublesome cast, and now my Outlook won't load addins at all. I tried a simple "hello world" addin, and it's completely dead. The addins show as unchecked on the COM Add ins configurator. Any idea what I've done Although I already reinstalled a bunch of stuff to fix this, next time I'll check the disabled items first. That sounds like what it might have been. Thanks! ...Show All
Visual Basic reading from an xls file (into VB) without using Excel
Hi everyone, I've written a program in VB which accesses data from an xls file. Right now I open excel, and then hide it (so it is invisable to the user) to read the data from the file. Then I have a close button on my program which the user can click and as the program exits, it also closes excel. I have removed the "x" from the taskbar on my program, but I still run into problems if the user uses ctrl+alt+del. I am sure this is probably the worst way to read from this file, but it does get the job done... although very buggy and error prone. I was wondering if someone could inform me of a way to read in this data in a more efficient manner. Possibly even if the user doesn't have excel installed on their computer I am no ...Show All
SQL Server What is the meaning of nchar(0xFEFF)?
When we send a message in service broker we send nchar(0xFEFF) in the start of the xml file. What is the meaning of nchar(0xFEFF) Thank you. Bishoy That's the Unicode BOM . ...Show All
Windows Live Developer Forums Available pushpin icons
Does anybody know if VE has a stock collection of pushpin icons available, similar to Google Maps, and if so what is the URL to retrieve them Regards, Gerry I need to add icon which allow showing sectors symbol. each of this sector point to different direction as specify. For example, I have three sector on the same lat/long. Each sector point to different direction such as 0 degree, 120 degree and 240 degree. I am not sure if that could be done. Thank you ...Show All
SQL Server composite stored procedure
Hi, I am trying to write a procedure in SQL which will composite values in a table. I have an increment list, which increments by 0.1, I need to average values so I produce composites for 0-1, 1-2 etc grouping by id. The script below produces a table then a procedure, but I'm stuck on the syntax and get the error Column 'Increment.increment' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause The script will run on the master database. The end result should look like the following: thanks for any help id inc_from inc_to comp_val ---------------------------------------------------- 1a 0 1 4.6 1a 1 2 4 1b 0 1 3.9 1b 1 2 ...Show All
SQL Server Date lookup in SSIS
How do I perform a date lookup in SSIS. I have a date with time component in it. This has to be looked-up with a table that contains only a date element. I commonly use a slight cheat on this one, if you make the integer key of your lookup table the difference in days from 1 Jan 1900 then you can calculate the key instead of looking it up. You can also use the same trick with the time portion of neccessary (do the diff in seconds). Hope that helps you Philip ...Show All
Visual Basic Key hooking problem (VB2005)
I am using the following code to try and prevent certain keys from being pressed when my application is running. But it always returns a negative number errror. Can someone tell me what I am doing wrong Code: ...Show All
Visual Studio 2008 (Pre-release) June CTP Installable Error
Hi,I'm trying to install June CTP. I successfully downloaded following 2 files from Microsoft. 1) 6.0.5456.3.0.WindowsSDK_Vista_idw.DVD.Rel.img (1,193,464 KB) 2) Setup.exe(284 KB) Now if i try to run setup.exe i'm getting following error message. SDKSetup encountered an error: Failed to download the file http://download.microsoft.com/download/3/B/C/3BC8831B-75D4-43F0-BAC5-4574DBEBC332\SDKSetup.xml. Error - The remote server returned an error: (407) Proxy Authentication Required. But i'm able to browse http://download.microsoft.com/download/3/B/C/3BC8831B-75D4-43F0-BAC5-4574DBEBC332\SDKSetup.xml file. It means i'm able to reach Micosoft site, but could not able to download. Is it issue at Microsoft proxy Is there any alternative way to i ...Show All
Windows Forms i am using .NET framework 1.1 so can i add combobox in datagrid?
can anyone tell me that how to add the combobox in datagrid moreover i am using .net framework 1.1. thanks Windows forms faq sample . VB-Tips has a few samples. ...Show All
Visual Studio Tools for Office VS 2003 enterprise developer and vs 2005 professional
Hi can anyone tell me what is the limitation of vs 2005 pro compare with vs 2003 enterprise edition. Can vs 2005 pro do the office development, as i know it cannot but i have try it on its ok for me to extract the data into the excel document. please advice Hi KangKang Both VS 2003 and VS 2005 can automate Office (Excel) applications. What VS 2005 Pro does not include, in comparison to VS 2003 enterprise, is the Visual Studio Tools for Office (VSTO). VSTO is a way to link managed .NET code to specific Excel or Word documents, instead of embedding unmanaged, native VBA code. It also (in the 2005 version) makes it easier to perform certain tasks, such as embedding Windows Forms controls i ...Show All
Visual C++ warning C4018: '<=' : signed/unsigned mismatch
I am getting following warnings while compiling my code. Can anyone help me to resolve this [exec] d:\AMOL_CVS\HEAD\gom\shared\backupexecjni\be10\ext\BEMSDK\inc2\cobjectarray.h(364) : warning C4018: '<=' : signed/unsigned mismatch [exec] c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xstring(1494) : while compiling class-template member function 'CBemJobHistoryDetail *CObjectArray<T>::At(int)' [exec] with [exec] [ [exec] T=CBemJobHistoryDetail [exec] ] [exec] ../../ext\BEMSDK\inc2\cbemjobhistory.h(150) : see reference to class template instantiation 'CObjectArray<T>' being compiled [exec] with [exec] [ [exec ...Show All
