Pihrt's Q&A profile
Visual C# "Simple" task becomming extremely frustrating (textbox.text and integers)
Thanks for the help TAG. I got that part working. Now I have a new problem. How do you append values to the end of another value I don't want to add the values, just apped it (ie. 0 + 1 + 1 = 011, not 2). Here's the code I'm using right now: iTempBin = iTempBin & iBin % 2; All I get is the number 0 when I try to do this. The result should not be 0. Edit: I figured this out. Results below: iTempBin = string .Concat(iTempBin, iBin % 2); ...Show All
Visual C# Good C# Authors
I was hopping I could get a couple of good recomendations for C# authors. I took a few C++ programing classes a few years and did a little programing back then, but I never really followed it. I've decied to get back into programing and want to get started with the C# language. Thanks! I really recommed Jesse Liberty, he has a Learning C# book as well as the Programming C# book. Or, there is a book targeted to non-programmers called Programming in the Key of C# by Charles Petzold that is pretty cool. If you are a non-programming right now I would definitly recommend either the Learning C# or "Programming in the Key of C#". Alot of the ...Show All
Smart Device Development Hangup/Disconnect GPRS connection
I had try the cmhelper, but the disconnect button did not really hangup/disconnect the Pocket PC GPRS connection. Is there anyway to disconnect the pocket PC's GPRS after the GPRS connection had been established Thanks Hi, This news groups may not have right set of audience for your query Pls follow the link for information on newsgroups who could reply for this query http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=286724&SiteID=1 srikanth Bogadapati ...Show All
Visual Studio Team System Testing Native Code (C++ ) using Team Unit Testing frameworks
I have been looking for some pointers or guide lines as to how do I test C++ unmanaged code using Unit Tesing capabilities of VS 2005. Do I need to write wrappers in managed code ( a sort of mixed mode class one that calls into managed code and other that calls the native code) Any suggestion welcome Regds Dinesh I don't see any workaround for this. For ExpectedExeption attribute you can specify either managed exception type or type + error message. For unmanaged exception you would get something like System.Runtime.InteropServices.SEHException. If you need to verify what's inside and the test in in C++, don't use ExpectedException ...Show All
Visual C# Multiple Threads accessing RichTextBox.appendText Method (BeginInvoke)
My user interface (running on the main thread) implements a RichTextBox object. I would like to append text to the RichTextBox (myRTB) from the main thread, and from a second thread. The problem I'm having is to interleave the results of the two threads. For the main thread, I simply use the method myRTB.AppendText(String NewText); For any async thread, I provide the method private delegate void AsyncWrite(String Text); public static void AsyncWriteLine(String Text) { AsyncWrite InvokeWriteLine = new AsyncWrite(MyRTB.AppendText); object [] args = new object [] {Text}; myRTB.BeginInvoke(InvokeWriteLine,ar ...Show All
Visual C++ Regarding the generated warning C4996: 'std::_Traits_helper::copy_s' was declared deprecated
I have a query regarding the warning C4996.I'm attaching a set of code, To which i'm trying to compile in visual studio 2005 Beta 2. But It sucessfully compiled but generating warning.I'm not able to find the solution to resolve the warning. Generated warning is also below. Could you tell whats i'm doing wrong. ***************************************************** C2440typecast.cpp ***************************************************** typedef TCHAR TChar; struct case_insensitive_char_traits : public std::char_traits<TChar> { static bool __CLRCALL_OR_CDECL eq( const _Elem&am ...Show All
Smart Device Development No result code for SendMessage with WM_COPYDATA
Hello, I've asked this question in MSDN forum , but without result. So I' want to ask somebody here, whats the problem with my code. I try a inter process communication with windows messages and WM_COPYDATA. It should work for managed and unmanaged applications. The receiver of WM_COPYDATA messages is a managed applications. For the sender the result code of SendMessage is important. In the managed receiver I use Microsoft.WindowsCE.Forms.MessageWindow. I override the WndProc, to check for WM_COPYDATA. Then I set the msg.Result to the desired value and call base.WndProc. But the sender always get 0 as result of his Se ...Show All
.NET Development SerialPort Class Help DataReceived
I'm using the DataReceived from the V.2 .NET SerialPort class. I'm communicating with a microprocessor board and i can write to it fine. I'm having trouble reading from it. It sends a single byte at a time without an EndCharacter. I can see the byte being sent on my oscope and with an older Turbo Basic program it does read the byte. My problem is that my DataReceived event isn't being thrown. I have my ReceivedBytesThreshold set to 1 and i still can't see anything. Here is my code just see if the event can be thrown: Private Sub SerialPort1_DataReceived( ByVal sender As Object , ByVal e As System.IO.Ports.SerialDataReceivedEve ...Show All
Windows Forms Data grid enter event...
I've created a simple control, it inherits the datagrid control. I've only added a 'PressedEnter' event, wich is fired when a user hits enter while editing the grid. The control is called 'GridWithEnterEvent' I created a form with a standard datagrid control on it, and set the properties of the datagrid. The code under "Windows Form Designer generated cod ...Show All
Visual Basic New Line in Text File
Hello Community I have a simple question. I created a new Text File like this: My .Computer.FileSystem.WriteAllText( "C:\test.txt" , "test //now should come a new line// test2 " , False ) Now how can I insert a new Line into that text, so that the text File looks like the following: test test2 THX for help. Kyle Katarn Sorry for my bad English:-) My .Computer.FileSystem.WriteAllText( "test.txt" , "Test" & vbNewLine & "Test2" , False ) HTH, ...Show All
Windows Forms Inherited Click handler
I have an MDI application in which all of the child forms inherit from a base form. This base form handles all of the common functionality of the child forms, including form initialization and closing logic. I have a protected method called CloseButton_Click which is supposed to be the Click handler for any button on a derived form which closes the form when it is clicked (primarily OK and Cancel buttons, but there a few other cases as well). The method sets the DialogResult of the form to the DialogResult of the button, and then closes the form (similar to the functionality of modal forms, but my forms are not modal). However, when I look a ...Show All
Visual Basic Help on Classes
Hi, I am developing an IT Asset Tracking application using VB 2005 and SQL Server 2005 Express edition. Will I need to create classes to represent objects such as Computers, Printers, Scanners/Faxes, Contracts, Purchase Orders etc or are there any other approaches. For example, if I am correct, I will have a class called Computer and its properties will include Make,Model,CPU,Hard Disk,Memory etc. Is this the right approach. Computers can be split up into Desktop PC's, Servers and Notebooks. Would I have to create separate classes for these as well or would they be ok under the Computer class Once I create an object from the c ...Show All
Visual Basic automate server information for email accounts in outlook
How to automate server information for email accounts in outlook using visual basic Please let me know the work out. Sorry, I'm not exactly sure what you're trying to do. But have you looked at the Visual Studio 2005 Tools for Office — Outlook (Beta) offering Since I noticed you were programming against Microsoft Office Outlook, perhaps this could help you in some way. Regards, Paul Cornell Documentation Manager Microsoft Developer Division User Education ------------------------------------ This posting is provided "AS IS" with no warranties, and confers no rights. ...Show All
Windows Forms Sql Server Form Deployment over Http
Hi, I've developed a windows app that is meant to be deployed at clients's office. It needs to be able to access Sql Server 2000 at our location over the Internet. When we were testing it at our office, it worked fine at all the workstations we tested at, but when we deployed it at the client's location, it gave sql exceptions whenever the fi ...Show All
Visual Studio Team System Baseline existing violations using Visual Studio Team System
I have a question regarding basline existing violations. In our organization we are migrating existing projects to VSTS and TFS. When we have done this we want to enable static analysis for our projects. The problem we have is that we don't have the resouces to fix violations in the old code. I have found a number of posts describing the posibillity of creating a baseline of violations and ony emitting warnings on new violations. What I can't find is a description how this is done using the VSTS environment. Could anyone point me in a direction where to look for more information in this matter. Regards, Christian ...Show All
