vb6

Is it practical to learn and use visual basic 6 as a 2nd year BSIT student?

Hi. Is it wise to learn and use visual basic 6 in these days? Because many powerful programming languages are emerging. If no, then why and what is the best programming language to use as a Bachelor of Science in Information Technology student? ...

Doubt in using crystal report in VB6.0

Hi, I'm using Crystal Reports in my VB6 project, but I'm facing error while loading the report in crystalreport1.action=1; Please give me some solution for this problem. It is showing the error as Error in 20728-F. I am attaching the code below. So please reply to my query... cryStockReport.ReportTitle = "Total Stock Report" cryStockRe...

How to create a VB6 collection object with ATL

or a VB6 - compatible - collection object. The title says it all, here's the background. We provide hooks into our .net products through a set of API's. We need to continue to support customers that call our API's from VB6, so we need to continue supporting VB6 collection objects (simple with VBA.Collection in .net). The problem is s...

File Rename problem?

I'm using VB6 and I have a folder where I have n number of files. I want to change the file extension to .txt. I used the code below to change the extension of all .fin files to .txt. Dim filename1 As String filename1 = Dir$(txtsourcedatabasefile & "\*.fin", vbDirectory) Do While filename1 <> "" Dim strInput As String Dim strO...

How to check the filesize?

Using VB6 I have the text file with different sizes, so i want to delete the file where filesize = 0 kb. How to make a vb6 code for deleting the 0 kb files. Need vb6 code Help ...

Why is My Loop Only Deleting One File?

Using VB6 In a folder, i have n number of files, i want to delete a 0 kb files code Dim filename5 As String filename5 = Dir$(txtsourcedatabasefile & "\*_*", vbDirectory) MsgBox filename5 Do While filename5 <> "" If FileLen(txtsourcedatabasefile & "\" & filename5) = 0 Then Kill txtsourcedatabasefile & "\" & filename5 En...

File Moving Problem?

Using VB6 I want to move the files to another folder. Code. Dim fso As FileSystemObject fso.MoveFile (txtsourcedatabasefile & "\" & "1.txt"), App.Path & "\Uploaded\" txtsourcedatabasefile = "C:" Above code is not working, it showing error as object variable or with block variable not set. How to modify my code. Need VB6 code Hel...

Compiling the software problem

Using VB6 i created a software in vb6 with xp operating system, In my system, software is working perfectly. When i run my software in other system(xp operating system), it showing error as cannot find project or library, showing error in Date, Left..., Now i moved to vista operating system, i try to run my software, It showing the sam...

How to pass NULL or empty strings to stored procedure input parameter with ADO and VB?

I have a stored procedure in Sql Server 2005 with a varchar input parameter defined as: @Value varchar(24) = NULL in my VB6 application I try to set the parameter with an ADO funtion: Set prmParamVal = cmdChkParam.CreateParameter(, adVarChar, adParamInput, Len(paramValue), paramValue) If the value I try to pass is an empty (zero le...

Converting C (not C++) to C#

I have some old C 32 Bit DLLs that are using Oracle's Pro C precompiler library (proc.exe) to expose a hundred or so sproc/func calls to an even older VB6 GUI which references these functions through explicit Declare statements like so: Declare Function ConnectToDB Lib "C:\windows\system32\EXTRACT32.DLL" (CXN As CXNdets, ERR As ERRdets)...

VB6 execution with database is different when stepping through vs running

I've come across a weird scenario with the following code in a vb6 app: Private database As dao.Database Set database = openDaoDatabase([some valid database location], False) createDBField database, "Table", "FirstRow", dao.dbInteger, 0, "0" Public Sub createDBField(targetDB As dao.Database, strTable As String, strField As String, dbT...

Accept SSL Certificate in vb6 using the Webbrowser control.

The Problem: I am creating a vb6 application that will connect to a particular web service located on a a HTTPS site. The problem is, the HTTPS site I'm accessing requires all request to accept it's certificate policy. (as its a self-signed ssl certificate) Basically I need the application to accept security certificate dialog boxes aut...

How do I intercept DLL load/unload events in a VB6 ActiveX DLL?

I've inherited a legacy classic ASP application that uses VB6 ActiveX DLLs to perform the business logic. I'd like to track the points at which the DLLs are loaded and unloaded. Is there any way of intercepting these events in a VB6 DLL? On a related note, should Class_Terminate events always run when a their containing DLL unloads? ...

Prevent windows from queuing shellexecute requests

Win.ShellExecute 0, "open", "C:\dir\program.exe", "arguments", vbNullString, SW_SHOWNORMAL Win.ShellExecute 0, "open", "http://www.google.com", vbNullString, vbNullString, SW_SHOWNORMAL I want google.com to open regardless of whether or not program.exe is still running. How do I fix this? I would rather avoid things like calling "star...

In VB6, how do I have a program open at a specific pixel-based resolution?

I need my vb6 application to open to a precise dimensions, in pixels. How do I do this? ...

In VB6 is linking to a tlb generated from an ocx the same as linking to an ocx directly

The reason I am asking is I have an ocx that I don't want to register on the build machine but I would still like to build against it. If the tlb route is not the right direction any hints on how to accomplish this would be appreciated. Thanks ...

Can .local files be used during VB6 compile to avoid registering COM ocx and dll files

In an attempt to keep my build machine clean can .local files be used during the compile of an application or is there a better way to keep the bloat off the machine. ...

If I registered a TLB do I still need to register the ocx in order to compile?

I am trying to compile a vb6 application and I can't register the ocx files. In order to attempt to compile I have replaced the Object= lines in the .vbp file with Reference= lines to the TLB instead of the OCX. Now when I compile I get the following type of errors. Line 125: Class KimgpLib.KImgp of control KImgp1 was not a loaded cont...

Any cheap or free IDE's out there for VB6 programming?

Any cheap or free IDE's out there for VB6 programming? or is MS the only way to go? Thanks. ...

AccessViolationException in COM control in .NET app

I'm working for a client that has a VB6 app in the migration process to .NET. Currently they have a .NET shell, but host some old VB6 controls in .NET. There's an error I stumbled upon is logs that happens when they in .NET asynchronously pull some data from the database, and then forward that data to a COM component to display it: The...