vb6

how to develop a .net library backward compatible to vb6

Hello i need to develop a .net library which exposes a java web service proxy to a legacy vb6 asp web application . Being the first time i do such a task and not knowing vb6 programming language, i need some clearifications by a more experienced programmers. To begin i've searched the web and i've found the following link (in case some...

DAO: db.OpenRecordSet("Table1", dbOpenTable, 0, dbPessimistic) - what does the third argument do?

Using DAO out of VB6: db.OpenRecordSet("Table1", dbOpenTable, 0, dbPessimistic) If the third argument is set to 0, as in the above, what is its effect? 0 is not a listed value for this argument in the documentation. EDIT: What sort of recordset will be opened if 0 is given as the third argument? ...

How to detect .NET Framework installation on a machine using VB6

Using Visual Basic 6, what is the best way to detect if the .NET Framework is installed on a client machine, and what versions of .NET are installed? ...

Can a manifest resource be added to a VB6 project using the Resource Editor?

We have a VB6 project that compiles to an ActiveX EXE that happens to have the word "patch" in the filename (it is part of a police dispatch system), which is causing Installer Detection on Windows 7 to think that it requires elevation. Rather than renaming the EXE, I want to embed a manifest resource into the compiled EXE that will req...

xmlhttp error-message: "This page has an unspecified potential security risk"

hi, i'm developping a little app under vb6 which grabs html from a site via xmlhttp. the problem is - i'm getting this error: "This page has an unspecified potential security risk - do you wish to continue?" seems like it's coming either from the OS directly or from Internet Explorer. i've already tried changing the internet-options u...

How to judge if tabbed browsing is enabled in IE using VB?

I'm doing an automation job with InternetExplorer object. ...

Crash of the visual basic 6 IDE just before loading the project ends; only when source safe is active

I am at my wits end with this one. I have a vb6 project that edits, compiles and runs well as long as I do not try to synchronize its files with the visual source safe 6.0d database at loading. I tried removing the .scc files, I tried filling the working folder from the database and vice versa, all to no avail. The problem started when ...

Trying to create a DAO recordset from an array

I'm using VB6 and trying to create a DAO recordset from an array of data. I want something like this but I've hit all kinds of problems Dim rst As DAO.Recordset Dim tdf As New DAO.TableDef Dim fld As New DAO.Field rst.Fields.Append tdf.CreateField(arrayHeader(0), adInteger, 5) rst.OpenRecordset rst.AddNew Array(arrayHeader(0), arrayHe...

Creating non-existent database tables in code

Up to this point my company has had an aversion to databases and has stuck to storing all data in comma-separated files. I have run into a unique customer application that - I believe - would benefit from the use of a relational database. The application calls for storing 'summary' data concerning a manufacturing process and 'detailed'...

Problem in implementing different (languages)fonts in VB 6.0 .

I am currently working on VB 6.0 ( QUESTION ENTRY FORM ). This form consists of richtextbox for typing question and four option button for choices. I am using M.S Access as the database. If the user does not want to type a question in english and if he / she wants to type the question with their favourite langua...

crystal report v8, vb6, command to print directly to printer without dialog box

I use Crystal Report 8 in VB6. From within a form, I want to send command to CR to print directly to printer and without showing a dialog asking to specify the start and end page. With newer version of CR, there is a command call PrintToPrinter. I couldn't find this command with CR 8.5 Can somebody here show me how to do this? ...

Simple division answer without decimal places

I want to create this simple division program.But the problem is that the divisors should not be such that the answer is in decimal places, how do I put the check.Guidance would be appreciated. Option Explicit Dim fiCScore As Integer Dim fiWScore As Integer Dim fsUsername As String Dim fiMax1 As Integer Dim fiMax2 As Integer ...

print to remote Comm Port in VB6

i have a software that prints out to a thermal printer connected to the comm port,the code below works well. Open "COM3:" For Output Access Write As #1 Print #1, Space(8) & "FRAKAS LTD" Print #1, Space(7) & "P.O. Box 7678 SHIMONI" ... ... Close #1 Now i want to print on the same comm port but from a different com...

Calling a win 32 C Library function from a VB 6.0 dll crashes

I have a C Library Cdll.dll which has the function int _stdcall AddVersion(int repval) { return (repval + 10); } I am calling this AddVersion function from a VB dll. Private Declare Function AddVersion Lib "cdll.dll" (ByVal Repval As Integer) As Integer ... Public Function VbMessageHandler(ByRef intVal As Integer) As Integer ...

VB6 Progress Bar - Resetting Maximum Value

I've set up a simple progress bar in a VB6 form using the Microsoft Common Controls 6.0 component, and everything seems to work correctly. However, I use the progress bar for several different parts of the form, each of which use different (and variable) maximum values. When I try to change the maximum value at run-time after the bar h...

Acceptable use of GoTo?

Hello all. I'm currently rewriting an old VB6 program in C# in the .Net Framework 2.0 (not my choice, it was decided by the company). For the most part, things have gone pretty well. The program measures incoming data from a precision grinding machine and displays graphs and dials to display the accuracy. The original programmer was a ...

Webservice call from VB6 code results in "Request format is invalid " System error

Hi, here is a code Private Sub PassTXrecordtoGP(ByVal sopNum As String, ByVal WOnum As String, ByVal mustNumb As String) Dim objXMLHTTP As MSXML2.XMLHTTP60 Dim sURL As String Dim i As Integer i = 1 For i = 1 To 3 If (Len("" & sopNum) = 0) Or (Len("" & WOnum) = 0) Or (Len("" & mustNumb) = 0) Then Exit For sURL = "http:/...

Fixing VB6 Date Bug?

It seems that VB6 can't correctly compare dates in some situations. Are there any solutions to this? Private Sub CheckDate() date1 = #7/6/2010 2:00:00 PM# Debug.Print "Date 1: " + CStr(date1) date2 = DateAdd("h", -8, #7/6/2010 10:00:00 PM#) Debug.Print "Date 2: " + CStr(date2) Debug.Print "Equal? " + CStr(date1 =...

How to tell if end of remote file is reached using Winsock (VB6)?

I am developing a program on top of a basecode taking care of low level socket programming. The problem seems to be that the only way it knows (apparently) when to stop close the connection is when the amount of bytes received exceed that given in the "Content-length" field. But since that field is not set for many sites I don't know how...

Writing a COM Interop Assembly for a .NET assembly to be consumed by a VB6 app

I'm trying to create a COM Interop assembly (myComInterop.dll) between my vb6 app and a .net assembly. I'm also trying to make it so that it can be "registration free" (see here for explanation). The freedom from registration requires that I create a MyVb6App.exe.manifest file, and also that I use a strong name to sign myComInterop.dll...