BlueMikey's Q&A profile
Visual Basic StreamReader
Hello, I’m trying to create a program will supply information for variables from a text file, so that as the possibilities change, a simple text file will need to be amended, rather than rewriting the original code. I am reading about FileStream and StreamReader, which seem like just the ticket. For instance, if I wanted to populate a TextBox with items I wrote in a text file, such as: Tom Mike Jim Jean I threw together a sub like this: ------------------------------ Private Sub Button6_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Dim objF ...Show All
Visual C++ CSocket Locks up in CSocket::ConnectHelper (sometimes)
A CONNECT PROBLEM WITH CSocket I have what I think is some very simple CSocket code for a client and a server, but I'm having difficulty getting it working since it occasionally locks up. Any advice would be greatly appreciated. Here's the situation: I have a client program and a server program. I start them both up, assuring that the server starts up first and is waiting and ready for the client. They are both running on the SAME MACHINE. ON THE CLIENT SIDE When the client program is started it successfully makes a connection to the server, sends a simple (command) string to the server, and then retrieves (data) strings from the Server ...Show All
Visual Basic Redundant DragDrop procedures for multiple textbox fields
Using DragDrop text entry in textboxes is really cool, but is it necessary to have the following event handler for each and every textbox on a form Private Sub TextBox3_DragDrop( ByVal sender As Object , ByVal e As System.Windows.Forms.DragEventArgs) Handles TextBox3.DragDrop TextBox3.Text = e.Data.GetData(DataFormats.Text) End Sub Or can a less redundant programming reference be made to handle multiple textboxes where DragDrop is permitted Thanks! Just add each necessary event to the handler: Private Sub HandleDrop(...) Handles TextBox1.DragDrop, TextBox ...Show All
Visual C# How to Read/Write DBF file In C# use OleDb
See the topic! Give me an example to show me how to do this ,thx! And my msn is i_will_communicate_through_this_forum@msdn.com I can't insert a Datetime Object into the DBF file,why Yes ,Got a Exception . Say that "A Abnormal GUID" I want insert a Datetime object into .Somebody told me write sql like: insert into [5.dbf] values({^2006-02-20},'leton',23,'question',T) I don't know how to write this sentence to insert a line into dbf file. ...Show All
Windows Forms Casting error in listbox
Casting error in listbox. I'm filling four listboxes, all from the Concepts table. The first is filled from form load, and works perfectly. Dim cdt As New ConceptsTableAdapter Dim C0DT As New dsHasbara.ConceptsDataTable cdt.FillByParentID(C0DT, 0) 'cdt.GetDataByParentID(0) Me.lstConcepts0.DataSource = C0DT ...Show All
.NET Development Manage a dataset from web services
Hi, I have a dataset in a windows forms that retrieves data from a DataBase, and i want to update, delete and add rows. I have to use Web Services, how can I do it Thanks in advance. pass the dataset from win form to web method as an input parameter.Use the dataset to update the data in the database. Thanks Manish ...Show All
Visual Studio OpenFileDialog from a Macro
I am trying to invoke the OpenFileDialog within a macro, however I get an error "Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure your Main function has STAThreadAttribute marked on it" when calling the ShowDialog method. I've tried adding STAThread in various places, but to no avail. Can anyone advise on this, or demonstrate the correct use of STAThread in a macro. Thanks I had the same problem. When I run the code with option "Start Without Debugging". It works. ...Show All
.NET Development Book recommendations?
I just bought "Network Programming in .NET with C# and Visual Basic .NET" because of a recommendation here, but I got the book and found out that it's apparently in the wrong version for what I'm using. I'm using Visual Studio 2005 Professional, and I got syntax errors when I tried using some of the code in the book. The book looks like it's exactly what I want except for the incompatibility. Does anyone have any recommendations for books that teach socket and network programming in VB 2005 Thanks. Eventhough it is based on 1.1 version, the are very few changes at the socket level. You could work a ...Show All
SQL Server Bar chart problems
1. How can I move the left-most and right-most bar into the center so that it won't show only half 2. How can I show the x-axis with all the day in a selected month The dataset may contains only some dates but I would like the x-axis should all days. #1: On the x-axis tab of the chart properties dialog, select the "margins" option. #2: Make sure your category grouping expression returns a DateTime object. In addition, you must have the x-axis option selected for "numeric or timescale values". Still, if the underlying dataset only has data for the 2nd till 10th of the month, you won't get the full month show ...Show All
.NET Development Transactions across WebServices
What's the best way to handle the transactions across web services in .net How to perform a 2 -way commit Example: Client a makes a request to company ABC Server to add user. AddUser() operation is executed on Company ABC Webserver. Then a call is made to the web service to execute AddUser() operation on Company XYZ Server. ( data is synchronized on another database ) If either operation fails on eith company ABC or company XYZ, the whole operation should be rolledback. Any idea Thanks. monu Hello, If you need to perform transactions in an interoperable way, you probably wa ...Show All
.NET Development FTP usage
Hi. Using .NET 2.0 and its the first time im using the FTP protocol in development. I am trying to issue a few commands, firstly it works fine such as listing a directory however if i wish to disconnect from the server using, lets say "QUIT" or perhaps I wish to upload /download a file, I get an error saying: "This operation cannot be performed after the request has been submitted." Am I doing something wrong or must I create another FtpWebRequest object per command Other thing is, if i explicitly specify a method with a NEW FtpWebRequest, a command to "QUIT" or even "CD dir " it gives me an exception that the method is not sup ...Show All
SQL Server Error message "Interface not registered"
Hi I got the following error message when I make a new integration service project Failed to save package file "C:\Documents and Settings\Administrator\Local Settings\Temp\1\tmp2B.tmp" with error 0x80040155 "Interface not registered". Can someone help Me Hi there, This looks like a setup issue. Did you have a prior build of SQL/VS 2005 on the machine If so, likely the machine wasn't cleaned up prior to setting up. regards, ash ...Show All
Visual Studio New project wizard - porting from vs2003 to vs 2005
I created, using CodeDom , a new custom project type with VS2003. The project creates a new form with a few components, several predefined methods etc.; just to be clear the project calls dte.LaunchWizard("CSharpExe.vsz", ref parms) I'm now trying to port this project to VS2005 and I had to modify the above call to : Solution2 sol2 = ( Solution2 )ApplicationObject.Solution; strTemplatePath = sol2.GetProjectTemplate( "Windows Application" , "CSharp" ); dte.LaunchWizard(strTemplatePath , ref parms); No problems here. The project still inserts all the component (declaration, initialization etc) following the&nb ...Show All
Smart Device Development close the ppc
how to close the ppc with c# code in cf 2.0 and wm 5 platform. Thank you. I don't really understand the question. What are you trying to close Close the keyboard Close the form Close the application Close the COM port ...Show All
Visual C# Check whether string contains uppercase letters
I want to create a password validation method so i want to check whether sring contains at least 1 uppercase letter... how do i do this public void ChangePassword(string UserID, string oldPassword, string newPassword) { if ( IsValidPassword(UserID, oldPassword) ) { if (newPassword.Length >= 8) ...Show All
