gmctech's Q&A profile
Visual C# Switch Statements } Can You....
Hey i was having a discussion about switch statements with a few mates of mine. And i discovered that if you don't break one of the cases it will go inside the next case, no matter of what the value is that you are checking. So can you do this: string value = "Value1"; switch (value){ case "Value1": value = "Value3"; case "Value2": &nbs ...Show All
SQL Server connecting to database from script component
Can someone please send me some sample code on how to connect to the database from the script component I tried using the connection manager to establish a connection and then use it inside my code in VB.NET but it did not work. Please send me some samples. See also http://msdn2.microsoft.com/en-us/library/ms135897.aspx And here is a sample of destination component: http://msdn2.microsoft.com/en-us/library ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How do I develop games for the XBox 360?
The starting point to learn how to build games for the XBox 360 is here . In a nutshell though, building games on your PC using the DirectX SDK is the best starting point for building games for the XBox 360. You can't get an XDK for xbox or xbox360 unless you are a registered developer and for now this means you are a big company with lots of $$$$ All the public information is here: http://www.xbox.com/en-US/dev ...Show All
Visual Studio Express Editions Compile fails on network drive
I installed VCX (VC++ Express) on my local drive, but my project files are on a network drive mounted as S: I created a simple HelloWorld Win32 Console App and the compile fails due to: 1>cl : Command line error D8022 : cannot open 's:\project\TestExpress\TestExpress\Debug\RSP0000024283524.rsp' However, it works fine on a local drive. I read about this problem with other products but I can no longer find the reference. A ...Show All
Visual C# RichTextBox Spell Check w/ Word Interop
How do you use word interop to spell check a rich text box without loosing the formating I have no problems getting the interop to work, but it wipes out my formating. I am using .Net 2.0 C# with Office 2000. I have tried passing the text in as RTF, but then the spell Checker views the RTF tags. private void button1_Click( object sender, System. EventArgs e) { Word. Application app = new Word. Application (); ...Show All
SQL Server Binding Datatable to Report
Hi, I have created a datatable which is filled by the result of stored procedure. So I need to know like how to bind this datatable with the report using report viewer. Apoorva First you have to make sure you have a dataset. Also that the data set is connecting to this table. If this is your first time creating a report I would suggest finding a walk through on a simple report creation Here is a pre ...Show All
Visual C++ Problem: Using _beginthreadex in DllMain
I want to spawn a thread with _beginthreadex in my Dll,but it doesnt work. the code : // ThreadFunc unsigned __stdcall ThreadFunc( void* pArguments ) { MessageBox(NULL, L"yanxizhen Test", L"Test", MB_OK); _endthreadex( 0 ); return 0; } // // DllMain // BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) ...Show All
.NET Development XMLserializer: how to display output file in block?
hi, I use XML serializer to serialize xml files. But I wonder how to make it display in blocks instead of one long line. because later I need to open these xml files with notepad for manually editing. Anyone can help me with this Thank you in advance. ps. I'm using C# Oh i've just found the formatting property writer.Formatting = Formatting .Indented; wr ...Show All
Visual Studio 2008 (Pre-release) Deadlocks using duplex contracts
We have found that we get deadlocks if we have a duplex contract that mixes OneWay calls with normal calls. In the following duplex contract, if the service calls UpdateData() while the client is in the middle of a call to GetData(), both client and server will hang. Is it legal to mix OneWay and normal calls like this Or should all calls in a duplex contract be OneWay [ServiceContract(Namespace = "http://Areva.Psa", Session = true, ...Show All
Smart Device Development CameraCaptureDialog Issues
I've been having some issues using the CameraCaptureDialog class on an HTC Apache device (rebranded as the UTstarcom 6700): 1. After exiting my application, the device's camera capture screen comes into focus. This happens whether I dispose of the class instance or not, and the Close() method is protected, so I can't call that. Any ideas on getting rid of this lingering capture screen 2. On a seemingly random, intermittent basis, an InvalidOper ...Show All
Visual C++ PurifyPlus reports FMM in STL of VC++ 7.1
Hi all, I run my VC++ 7.1 generated dll under PurifyPlus' control. I get a whole slew of FMM (free memory mismatch) errors for memory chunks allocated by the Microsoft STL. Unfortunately I haven't got the stack trace available right now but I could regenerate it if it's necessary. One example code snippet looks like this (details omitted): class ComponentFactoryBox { ...Show All
Visual Studio Express Editions Error spawning 'cmd.exe'
When I compiled the project, there was an error,----Error spawning 'cmd.exe'. Why Hi all, I've got the same problem and i've found this solution... In the Options go into Projects and Solutions -> VC++ Directories page and place this rows: $(SystemRoot)\System32 $(SystemRoot) $(SystemRoot)\System32\wbem Bye ...Show All
Windows Forms Finding Path To Active My Documents Folder
I have several VB.Net programs that read through a series of text files, process the data and then print the files using PrintDocument to the Adobe Acrobat 6.0 distiller. Currently, the distiller (by default) sends the created output files to the& ...Show All
Visual Studio Express Editions How do you insert a byte in a string (without expansion)?
Is there any way to insert a byte in a string without this byte being converted to more ASCII characters For example: Dim A As Byte = 85 ' This is an ASCII "U" Dim S As String = "Start " S = S & A In this case, VB tries to be intelligent and insert two characters - 8 and 5 - inserted of one byte - the ASCII U. The result is therefore "Start 85" instead of "Start U". Is there any way to p ...Show All
Software Development for Windows Vista API docs on search API yet?
Hi I'm looking for some documentation on the desktop search API in Vista. Doing a search through the Feb CTP SDK only seems to give hits to the old indexing service and not to the new desktop search API. I've written code in the past to issue queries from my app against the MSN/Windows Desktop Search on Windows XP and I'm looking for similiar documentation on the version shipping in Vista. Thanks I'm wond ...Show All
