timrande's Q&A profile
Visual C++ Creating and Opening a Sequential Access File in C++
I am a twenty four year old college student taking a class in basic c++ programming. I am using the Visual C++ .NET Express software and I need some help. A while ago I had an assignment to complete involving the ifstream and ofstream classes from the "fstream.h" library. I was supposed to create an output file object that I could write information to and then create an input file object that could send that information back into the program to be used. I have used *&!@ near every example my textbook has to offer and just don't know where to turn for this. This assignment isn't going to get done. I just want to know from someone who is ...Show All
Visual C++ Using Hooks and Using Mouse Commands
Hello, I have a couple of questions; first of all, is it possible to use hooks (e.g. - WH_Keyboard) in a windows forms application in VS2005 Secondly, how is it possible to move the mouse, make it click at points, drag etc... With Thanks, Gal Beniamini. 1. It is possible to use windows hooks in .NET, an article (with C#) for this can be found here http://support.microsoft.com/default.aspx scid=kb;EN-US;318804 2. Hooks can not be used to simulate mouse input. This has to be done by SendInput (older versions are keybd_e ...Show All
Visual C# Need a quick conversion from string to char*
I need to sleep and my time is short. I need a quick way to convert a variable of type 'string' to 'char *'. I need to do this because my function in a .dll only accepts strings as 'char*' Any snippets of code would be appreciated. Thanks. u cannot get an string into an array.. unless the string lenght is 1...but u can use the function of the string ToCharArray() so u can get ur string in an array of chars mig16 ...Show All
Software Development for Windows Vista About "Presenting Windows Workflow Foundation " The Book
Hi group membes The Book named "Presenting Windows Workflow Foundation" by sams seems to be a very good introductory book , but alas i dont have it . Is there any one who had this book in electronic format or some one who already read it and now wants to give it away ........ (may be to me )hehehehe The book is really quite good as an overview and the InformIT discount makes it very inexpensive in terms of computer books. Don't expect deep drill downs but its an excellent way to get up and running quickly on all the different aspects of WinWorkflow. Alex ...Show All
.NET Development DataSet Usage - Not saving to file
Ok, my knowledge of the DataSet object is elementary at best, but I'll try to make some sense. I've added a MS Access .mdb file to my VC# project using the New Data Source wizard. Incase it's pertinent, here's the connection string (sorta): Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db000.mdb;Persist Security Info=True;Jet OLEDB:Database Password=xxxxxxxxx Now, I want my program to count validate that there's at least one user account in the table 'Users' during startup. I'm checking this with [object].Users.Rows.Count , which works just fine. When the application inevidably discovers there's no accounts, I ...Show All
Visual Studio Team System Rule Idea - Use Create and Not New
Programming visual basic.net ISBN 0735620598 page 1307 has the following 'rule' When using SymmetricAlgorithm, Rijndael etc on cryto routines, you should do the following Dim encr as SymmetricAlgorithm = SymmetricAlgorithm.Create() and not use new, so your code is generic and can work with different machine level defaults. I don't know if this applies to other creation routines. I can't see such a rule in the existing list but it looks like a good one for FxCop I think that the API does have a machine specific object, and does as is recommended. As it has been pointed out, you don't necessarily want to code up API specific rules ...Show All
Windows Forms How to iterate through a DataView
Hi, How can I get the number of elements of a DataRowView or an Iterator static private void print( DataView dv, string label) { Console .WriteLine( "\n" + label); DataRowView drv; for ( int x = 0; x < dv.Count; x++) { drv = dv[x]; for ( int q= 0; q < DRV.COUNT ; q++) { Console .WriteLine( "\t" + drv[q]); } } Console .WriteLine(); } DRV.COUNT ...Show All
Windows Forms Reflection permission
While just starting to sink in .net environment, I've created a user control inherited from DataGrid which resizes each cell for its content to be readable upon resizing. The solution is (I get advised from another Windows Forms) to rely on Reflection to get a reference to hidden method providing the number of data rows in the grid. In the next lines, ...Show All
Architecture Entities
I'm starting the following project: A multi database (SQL Server, Oracle and Firebird) using Winforms in the presentation layer and Web Services in the middle tier. My principal question is about the best way to implement the entities transit between the layers. I'm thinking in this option: a typed dataset based entities without the default adapters created by the VS 2005. Instead I will use a Helper class to factoring the multi database feature and generate the required DataAdapters. I'm free from develop own class for each entity of my system and I could use the benefits of binding and serialization of the datasets. In addition, I wi ...Show All
.NET Development IActiveDesktop
Dear all i do programming in a desktop application that puts html file on the desktop as a background and rearrange desktop icons and adjust the list view of the desktop and others... after searching the internet , i found that the only way is to use the IActiveDesktop interface. so my question is how to implement IActiveDesktop interface in C# thx all Sound like you are going to make a program to hyjack Pc's Remco ...Show All
Windows Forms Configuration Manager - possible bug?
In trying to learn the new architecture for application settings in .Net 2.0 I have come across the following and am wondering if it is a documentented error. I cannot access AppSettings or ConnectionStrings using the string indexer, but can only use the integer indexer. For example: System.Configuration.ConfigurationManager.ConnectionStrings["MyConnString"].ConnectionString This throws an error - generally that it is null. However, if I use: System.Configuration.ConfigurationManager.ConnectionStrings[0].ConnectionString I get what I expected. The same example holds for AppSettings. I have searched these forums an ...Show All
Smart Device Development System Log - Is there one? Where should I log application data...
I'd like to log application data/events somewhere. Is there a log system already for PPC, and if not anyone got any recommendations for FREE prebuilt classes that provide logging functionality such as "maximum file size" etc. Thanks! I'd log directly to a file in the same directory as my executable. For some links see this: http://www.danielmoth.com/Blog/2004/11/debugwriteline.html Cheers Daniel ...Show All
Visual C++ Notification on Text change for Windows Control
Hello, I have a question in SDK windows programming. I have a window control, implemented as an editable control for user to enter text. User can add text in the window control either by typing through keypad or copy/paste using mouse. I call GetWindowText() to read text from the control. I want to display a message while user is entering text or copying a value, if the text exceeds a certain length. I am aware that I can trap keyboard and mouse events to do this. But I would like to know if there is any way to get notified, when there is a change in text on a window control Your response is appreciated. Thanks. ksrks ...Show All
.NET Development Restricting Web Service to localhost
Hi, I am trying to restrict the web service to only respond to clients from the same server. In other words, I am checking the ' HttpContext.Current.Request.UserHostAddress'. I have couple of questions, 1. Is it possible for the client to manipulate the value of 'UserHostAddress' so that it looks as though the request is originating from the local machine even though actually it is not 2. Is there any other config way of saying that this webservice can only be invoked from the local machine Here is the code in VB.NET, Private Function CheckIfRequestIsFromLocalMachine() As Boolean ' ...Show All
Visual C# String IsNumeric ???
Hi, VB.NET has a way to check for valid numeric strings i.e. strings that are checked to see whether they contain digits only : IsNumeric is the name of the function. Is there such a thing in C# thanks Chris Here's an example using TryParse: http://www.tangiblesoftwaresolutions.com/Articles/CSharp%20Equivalent%20to%20IsNumeric.htm David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter and VB to C++ converter Instant J#: VB to J# converter Clear VB: Cleans up VB.NET code Clear C#: Cleans up C# code ...Show All
