vb6

VB6 GUI not working in multithreaded COM environment

I have a VB6 COM client that makes calls to an inprocess STA ATL/COM server. One of the Server methods, X, can take a while to finish so I need to be able to cancel it. What I tried was to run the method code in a new thread and include another method, Y, that does a timed WaitForSinleObject. So the client first calls X then goes into a ...

Unit Testing in VB 6 with SimplyVBUnit

I've recently decided to start using some light unit testing to see if it adds any value to our project, but I'm having trouble finding documentation for SimplyVBUnit. Any suggestions? ...

How to solve TimeOut Expired Problem?

Using SQL Server 2005 and VB6 When I executing for yearly data or more than 3 months' data, it is showing "Timeout Expired" error. It is not executing completely. My Connection String ConnectionString = "Provider=SQLOLEDB.1;" & _ "Persist Security Info=False; " & _ "User ID=" & Settings.SQL_Username & _ "; Password = " & S...

How to avoid the White Blank Screen?

Using VB6 At the time of executing, it showing white blank screen while it was working with database, How to avoid the white blank screen in VB6. WHITE BLANK SCREEN MEANS HANGING (WHEN IT WAS WORKING WITH DATABASE). How to avoid that? ...

[VB 6.0] ADODB Connection Problem

Hi, I am trying to perform a database operation from a VB 6.0 application (connecting to SQL 2000). The application is running fine in my local and test machines, but it gives the following error in the UAT environment. dbConn - Nothing lErrorNum = -2147024770 sErrorDesc = Method '~' of object '~' failed My source code is: Dim conne...

VB Form Resize Event Problem?

Using VB6 Using MDI Forms, sub Forms also When I run the Software in More than 15 Inch Screen, Crviewer Control, Frame Control, Everything is appearing in 75% of the screen, I Wrote the code for Crviewer Control in the form resize event. Code Private Sub Form_Resize() CRviewer2.Top = 1450 CRviewer2.Left = 0 CRviewer2.Heig...

Visual basic 6 events

How can i restrict an event to occur? Suppose i don't want textbox change event to occur when i press backspace. ...

Visual basic 6 textbox autocomplete feature?

How can i add an autocomplete feature in a textbox? As soon as i write something in a textbox(whether 1 character or 2 or 3), it should match it with the student name in the database and complete the name. ...

COM Add-in for Excel doesn't load when Excel is launched by opening file

Several users have reported that if they launch Excel by double-clicking an Excel file, the add-in will not load. But, if they open Excel via the Start menu (or Quick launch toolbar) the add-in loads fine. Some details, in case they help: It is a COM add-in, written in VB6. The problem has been reported on Windows XP/Excel 2003 and Vi...

Need recordset behavior in VB.NET w/ADO help

Hello all. VB.NET newbie here. I've learned (through this site) how to negotiate a dataset via: For Each dRow In quanDS.Tables(0).Rows 'do something to each row Next I now need to figure out now to loop through a subset of the records returned in the dataset - here's a VB6 example I need to convert: strSQL = "select * from tblDQ ...

C# Monitor.Wait and VB6 message pumping and events.

I have a com callable wrapper written in C#. The wrapper uses a Socket internally to SendAsync and ReceiveAsync. In order to make this appear synchronous to the VB6 code that calls this wrapper, I use Monitor.Wait. I can't figure out if Monitor.Wait pumps messages while it blocks. According to cbrumme's blog over on MSDN - I mentio...

Handling a VB6 event in C# - why does it only work sometimes?

I have a VB6 application implemented as an ActiveX exe. I also have a C# application that interacts with the VB6 app via COM. This all works fine except in one scenario. If the VB6 app is kicked off from the C# app, everything is fine. If, however, the VB6 app is already running stand-alone, then although the COM interface still works...

How to select a file automatically?

Using VB6 Now I am using a Browse button in my software to select the text file, then it is converted in to mdb (access). I don’t want to select the text file. Once I installed my software in any system, the text file should automatically select in a specified path. Then the text file automatically converts into mdb. Once converted in...

How to select a folder only by using common dialog control

Using VB6 Code. CommonDialog1.DialogTitle = "Open File" CommonDialog1.Filter = "*.*" CommonDialog1.FilterIndex = 1 CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer CommonDialog1.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly CommonDialog1.CancelError = True On Error Resume Next CommonDialog1.ShowOpen If Err Then 'Msg...

Does the ReDim statement intialise String Arrays with empty strings?

Given the following statements in VBA: Assume that val = 4 and Option Base 0 Dim dataStr() As String ReDim dataStr(val) Will the ReDim statement intialise the String array dataStr to 5 empty string elements(0 to 4). What exactly will be the contents of the Array after the execution of the ReDim statement. ...

How to delete the filename?

Using VB6 I want to delete the last 5 words of the filename, then i want to give so other filename.\ Code. Name FileName As NewFileName The above code is working for rename, but i don't want to rename, i want to delete the last 5 letter of the filename. Expected Output Filename sufeshcdk.txt - I want to take (sufeshcd) only Modif...

vb6 Multimedia query

How can i add an animated file on VB form? What extention does it support? ...

Replacing a filename problem?

Using VB6 In a folder, am having n number of text files, file names are like abc.mis-.txt, [email protected], so i want to rename the filenames like abcmis.txt, deffin.txt. I used a function for renaming. Code Dim filename3 As String filename3 = Dir$(txtSourceDatabaseFile & "\*.txt", vbDirectory) Do While filename3 <> "" 'Function for re...

Getting Error on while reading a blank text file?

Using VB6 When I Reading the blank text file, showing error as Input Past end of file Code. Dim fso As FileSystemObject Dim TS As TextStream Dim TempS As String Dim Final As String Set fso = New FileSystemObject Set TS = fso.OpenTextFile(txtSourceDatabaseFile & "\" & FileName, ForReading) Final = TS.ReadAll Do Until TS.AtEndOfStream ...

vb6 webbrowser control

How can I remove the scrollbars from a web browser control using VB6? ...