hoshine's Q&A profile
Visual C++ Want to read a txt file
Hi, I want to read a txt file, but I want to read word by word. So can you please show what function would be best to read word by word from the txt file Thanks. vcboy You could use the TextReader and the ReadLine method to read a line. For each line read you can split it on the space character to get an array of words. ...Show All
Visual C++ Visual C++ 2005 MFC support
Hi, When will 2005 C++ be available with MFC support If the answer is never, what are my options to compile a C++ program with MFC now and in the future Please do not tell me Microsoft is now having home developers (like myself) puchase the full blown Visual Studio 2005 just to compile a MFC C++ application. Brian you are using the wrong book written for an old version, probably vc++ 6.0, really old. Find another book or the version the book was written for. ...Show All
Visual Studio 2008 (Pre-release) Error getting LINQ set up.
I downloaded the LINQ preview and installed it. It actually installed real quick with no reported errors. The LINQ-Preview templates didn't show up so I went and copied them into my default templates folder. I opened up VS and copied some LINQ code into the a code file, pressed compile and received an error stating that: "System.Array does not contain a definition for WHERE". Any suggestions about how to rectify this Oh man... what a dork. Yes that works, thankyou! Time for me to RTFM I think. ...Show All
SQL Server Connecting to hosted / remote database
Hello, I would like to know whether is it possible to administer a database on a hosted site - i.e inserting some lines, executing a query. I normally access the files via ftp connection. And so far the only way I figured I can mess around with the database is to download it and change it on my desktop PC. Thank You. Toma Pajonk they would need to open a port (which is not advisable) port 1433 by default. the best solution is to create a vpn. ...Show All
Visual Studio Express Editions Form Updates not showing
I have a form that contains only a progressbar and several labels that are updated during a data conversion. Specifically If linecount Mod 20 = 0 Then Label1.Text = "Processing line # " & Str(linecount) & " of " & MaxSize ProgressBar1.Value = dstart 'Label1.Refresh() : ProgressBar1.Refresh() Label1.Update() : ProgressBar1.Update() End If If linecount Mod 500 = 0 Then Label2.Text = ( "Elapsed Time in Seconds: " & Str(STime.Elapsed.TotalMilliseconds / 1000)) Label2.Update() End If The problem occurs if I minimize the program while it is run ...Show All
Visual C# Image Verification for asp.net in C# - refer tutorial?
Hey guys! I was wondering if anyone had any links to some tutorials for image verification in c#. I found this tutorial but it is in VB.net - http://www.planet-source-code.com/vb/scripts/ShowCode.asp txtCodeId=3696&lngWId=10 With the proliferation of robots on the web, I figured this good be a good place to start to making your own image verification. this link is in C# http://www.codeproject.com/aspnet/ImageVerification.asp ...Show All
Visual Studio Express Editions DataGrid - passing values to form2
I have a form1 with a datagrid bound to a dataset. I want to keep the datagrid as 'read only'. When I double click on a row I want to pass the current record information to a second form for data editing. How do I do this I have been trying to grab the 'Primary Key' of the record clicked to use as a search parameter in the second form but don't know how to get the current row information out of the grid. Thanks, Sal Hi, // you click in the cell or the rows // of the DataGrid and get the content of it private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e) { /* be warne ...Show All
SQL Server Problem translating schedule into 1/2 hour buckets
I am stumped on a problem. I am trying to write SQL to compare what an employee is scheduled to do VS. what a different system actually recorded them doing. In our schedule system, employees are scheduled for a specific task beginning from any minute of any hour and lasting so many minutes long. For example some records might look like this... NAME TIME MIN TASK Joe &nb ...Show All
Visual Studio Team System Unit test generation and multiple solutions.
Hi all, I would really like to separate my development projects from my test projects by putting them in different solutions. The problem with this is that I am not able to automatically generate unit test code as the test project can not be seen by Studio (as it is in a different solution than the current one). Anyone knows a way to solve this issue Thanks, Patrick THere is no way to directly do this. My recommendation would be to generate the tests, and then remove the the test projects from the solutions into the test solutions. ...Show All
.NET Development .NET UI Application Crash
Hi, We have a vb.NET client UI application which calls a number of web services. The application is intermittantly crashing completely without any evidence of an exception etc. The application is single threaded for the most part, the only area that deviates is a class managing serial port comms via win32 calls. (we do not use p invoke..) I understand the most likely cause for an unexpected termination of this nature is threading - more specifically that referencing UI elements unsafely... I can say after a very large code review that this does not take place. Can anyone provide any advice on what might be the cause or where else we might lo ...Show All
.NET Development access invisible characters?
Having a strange problem with retrieving data from access. I am using the VS2005 dataset manager to retrieve rows from a table. I am passing values from a bunch of text fields to the query to match to the relevant fields in the table. However, this table which was generated within access seems to have problems with retrieving rows with blank fields. Again, however, if those fields are blank from a record I have added with my application, they are retrieved fine. Which leads me to beleive that either access is adding some sort of weird character to the blank fields, or my application is adding some character to those fields and the blank fiel ...Show All
Software Development for Windows Vista Read and WritePrivateProfile
Now that writing to HKLM is being restricted will the PrivateProfile APIs be modified and/or extended Writing to a file (ini or xml or ...) is now a more preferred way to operate rather than using the registry. Using these APIs is much more efficient than having to load an XML parser or write file management code into a app for a few limited shared values. Also it would be useful to be able to store/read binary data with the PrivateProfile APIs. These calls just read and write files on disk. If you give a full path to the .ini file instead of having it assume the Windows directory, they ...Show All
Smart Device Development close form on windows ce 4.2
Hi, I wan't to close a child form but "this.close" or "this.dialogResult" doesn't exists. What do I have to do then Grtz Annihil8 If you are using C# you could try the Dispose() method on your form. That will close it for sure. If you want to hide it try: form.Visible = false; form.Refresh(); If you want to exit the app completely try Application.Exit(); ...Show All
Windows Forms MDI data structures
I want to write a document editor which can handle a large number of documents simultaneously, any of which can ioncrease in length arbitrarily. A multidimensional byte array is not suitable because only the last dimension can be redimensioned. Does anyone know how standard editors like Word etc. manage their data files JOLinton That will work. Collection classes are still better than arrays for any object grouping that needs to dynamically change in size. I would suggest taking a look at ArrayList (or List<> if you are using .NET 2.0). This would be a good opportunity to dive into ...Show All
SQL Server Retrieve the next auto-increment number
HI, I have one master table and multiple detail tables. The primary key of the master table is an auto-increment number, which is a foreign key in those detail tables. I am wondering if SQL Server allows us to get the next available auto-increment number of the master table up front. Thanks a lot. No, you can only get it after it is created. To do this you would have to lock the table until you used the value or you could get collisions if two users were doing the same thing simultaneously. Use scope_identity() to get the last inserted identity value. ...Show All
