vb6

VB6 Changing colors for every control on a form

Hi, I am trying to change the colour theme of an old VB6 application (make it look a bit more modern!). Can someone tell me how I could change the backcolor of every control on a form without doing it for each and every control (label, button, frame etc!). I have about 50 forms, all containing such controls and doing this manually for...

What are causes for Error 372 - Failed to Load Control Your version of <control.ocx> may be outdated.

What are known causes for VB6 run-time Error 372 - Failed to Load Control Your version of may be outdated. I have a activceX control built from several standard windows controls and a Far Point. The control is used in a VB6 desktop application. The behavior I am seeing is that this active control fails occasionally on some workstatio...

Building up a monthly total from past 12 months

CurrentMonth = Month(CurrentDate) CurrentYear = Year(CurrentDate) SQL = "SELECT Spent, MONTH(Date) AS InvMonth, YEAR(Date) As InvYear FROM Invoices WHERE YEAR(Date) = '" & CurrentYear & "' AND MONTH(Date) = '" & CurrentMonth & "'" RecordSet.Open SQL, Connection, adOpenStatic, adLockOptimistic, adCmdText Do Until RecordSet.EO...

Why does using Shell to run a .MSI file sometimes fail in VB6?

I am attempting to launch the .NET CF installer from a VB6 app using the following code (for the sake of brevity I have replaced the full path to the installer with "(full path)"): Shell "C:\WINDOWS\system32\msiexec.exe /fa ""(full path)\NETCFSetupv35.msi""" I've run this on four machines so far. On two it works fine, on the other tw...

How to run an SSIS package from Visual Basic 6?

Can anyone provide some information on how to run an integration services package, on an SQL server 2005 instance, from Visual Basic 6? Any help at all is much appreciated. ...

How do I programmatically update OCX references in vb6 projects?

I periodically break binary compatibility and need to recompile an entire vb6 application composed of several dozen ActiveX DLLs and OCXs in total. I've written a script to automate this process, but I have encountered a problem. When an OCX is recompiled with project compatibility its version is incremented, and projects referencing th...

Visual Basic Login Form Query

Private Sub cmdOK_Click() Adodc1.Recordset.MoveFirst Do While Not Adodc1.Recordset.EOF If Adodc1.Recordset.Fields(0) <> txtuser.Text Or Adodc1.Recordset.Fields(1) <> txtPassword.Text Then MsgBox "Please verify login details", vbInformation + vbOKOnly, "Login Denied" txtuser.SetFocus txtuse...

unicode in vb.net

how to use unicode available in vb6 in vb.net?? is there ny equivalent of vb6 unicode in vb.net?? ...

PDF file in VB.NET (upgrade problem from VB 6)

I have upgraded my project from vb6 to VB.NET. The project is used to generate pdf files.. while upgrading I'm getting following problem. Code: 'UPGRADE_ISSUE: Constant vbUnicode was not upgraded. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup2070"' 'taptisColor = IIf(mvarEncodeASCII85, ToA...

How do I fix a broken connection to DB2 from a web application?

I support some old web applications, VBScript-based ASP for the UI and VB6 COM modules for the business and data access layers. Last weekend, I installed DB2 Connect Enterprise Edition v8 fixpack 14 on several Windows 2000 servers, and one of the web apps errors out on null data when it calls the built in VBScript function FormatNumber....

Binary Data Vb6 to C#

Hi guys, I've a problem! I've a binary data that I know that is been created using Vb6, I want read all informations using C#. How Can I do this? I don't data structure of the file!!! Thanks for your attention ...

create a dialtone from 56k modem

Ok, everybody get in your wayback machine. I need to have a phone dial into my computer's 56k modem. I need my computer to have the modem "on" and have an active dialtone. Here is why: I have a sump pump alarm that will call me on a pump failure. It only works with a landline. I want to stop paying for my landline to save money and just ...

Is there any good reference for object oriented|good design in vb6?

hi guys, i'm currently in the process of modifying a legacy editor application and i need to add in a few data structures which i have made into a class of it's own which i later add to a collection object. but thus far i'm little bit blurry on where to put all of my functions which is related to that object. i'm thinking maybe OO like d...

VB6 ActiveX Control Inside WPF With Scrollbars

I have some legacy VB6, which I am hosting inside an ActiveX control, which is in my WPF application. Despite putting the control inside of a DockPanel, which is inside a ScrollViewer, the VB6 displays outside the bounds of both, sitting on top of the rest of the application. Does anyone know how I can keep the VB6 inside of the Scroll...

C# ActiveX exe?

Hi everyone, I need an out of process C# COM component to host a 32 bit VB6 COM object. I can't seem to figure out how to do this in C#. The closest analogue I can think of is an activex exe, but it doesn't appear that C# can do this. Due to client restrictions, I cannot use com+ or dllhost.exe. Does anyone have any ideas? ...

Code works in the IDE crashes in the exe with error 91 "object variable not set"

This code works great in the IDE but crashes every time on the last line when made into an exe and run on the same machine. Any idea why? PageFinished = False Cancelling = False OKToUnload = False WebBrowser.Navigate ("https://www.example.com/index.jsp") Do While PageFinished = False 'set to true in document complete event DoEven...

SQL Server not configured for data access

I m running an SQL Server 2005 database from a VB 6 Application. I connect to the database thro ODBC DSN. I renamed the computer on which Im running the a default instance of SQL server from 'Software' to 'IT' .I then run the 'sp_dropserver' & 'sp_addserver' stored procedures to rename the instance. On restarting the SQL server service...

vb6 changing colors of SSTab at runtime using label in the background

Hi, I am trying to update an old VB6 application. I am struggling with changing the backcolor of the SSTab control at runtime. I know that I cannot just set the Backcolor to the required colour. At designtime I have created a label on each tab and then resized the label to the sstab dimensions. Then I set the label backcolor. This ...

Return array of objects from VB6 to C# using Interop

I need to return an array of initialized objects from VB6 into C# using interop. My VB function looks like Public Function CreateMyObjArray(ByVal MaxCount As Integer) As MyObj() Dim i As Integer Dim temparray() As MyObj ReDim temparray(MaxCount) As MyObj For i = 0 To MaxCount Set temparray(i) = New MyObj Next i Crea...

Data Environment

Any guidelines on how to pass a date parameter to a command1 object of Data Environment in VB6?? and yes I did search but didn't come across any :( ...