I am trying to compile a VB6 application, but it fails with the error, "Run-time error '91': Object variable or With block variable not set". It turns out the Resize event of a user control is firing during compilation and calling code that attempts to access an object that has not been instantiated yet.
Why is an event firing during c...
I'm writing a C# frontend to a legacy database that uses VB6 Rnd() and Randomize() methods for user password encryption. The encryption function is very simplistic and really not all that secure, but it's what all current passwords are stored with.
What I'd like to be able to do is authenticate legacy users from a C# application. I ca...
This is probably a simple question, but if I need to collect data at the start of a sub, using several input boxes, which one of these is the right way?
Example 1:
InputText1 = InputBox("Enter your name")
If InputText1 = "" Then Exit Sub
InputText2 = InputBox("Enter your age")
If InputText2 = "" Then Exit Sub
'Do something
Exampl...
I have a VB app that accesses a sql database. I think it’s running slow, and I thought maybe I didn’t have the tables propery indexed. I was wondering how you would create the indexes? Here’s the situation.
My main loop is
Select * from Docrec
Order by YearFiled,DocNumb
Inside this loop I have two others databases hits.
Select *...
We are doing a conversion of a VB6 app to VB.NET. The old VB6 app had a control called FormFlow Filler, which is no longer supported (I believe its over 10 years old).
We have tried various third party controls to replace this but to no avail.
The control was used mainly for working with PDF's and when the user clicked on a PDF field ...
How to select a same database?
I want to create a table from already created database.
Using vb6
My code.
Set db = DBEngine.CreateDatabase("1.mdb", dbLangGeneral)
I don't want to create database, I want to used already created database, so 1.mdb is already created. I want to use the 1.mdb database
How to modify a code?
Need vb...
How to get a text file only?
Using VB 6
MY path - C:\Documents and Settings\Arshad\My Documents\ravi.txt
I want to get ravi file name only. How to get?
Need vb 6 code Help
...
Using VB 6
I want to select path only?
Selected Path - C:\Documents and Settings\Administrator\My Documents\1.txt
code:
Public Function Getpath01(sFile As String) As String
Dim iPos As Long
For iPos = Len(sFile) To 1 Step -1
If Mid$(sFile, iPos, 1) = "\" Then
Getpath01 = Left$(sFile, iPos)
Exit Function
End ...
Hi, how to get the CPU and memory usage in VB 6 code? Thanks!
...
Using VB6 code
I want to open mis file, copy all the data’s and write into a text file.
My mis file.
File name – 1.mis
M3;3395;44;0;1;;20090404;094144;8193;3;0;;;;
M3;3397;155;0;2;;20090404;105941;8193;3;0;;;;
M3;3396;160;0;1;;20090404;100825;8193;3;0;;;;
M3;3398;168;0;2;;20090404;110106;8193;3;0;;;;
so on...,
Above Same data’s sh...
In the FAQ of the Boomerang decompiler (which currently only decompiles to C-code) they make a brief mention that Visual Basic exes happen to include a lot of metadata, so a Visual Basic decompiler might be able to produce better source code for Visual Basic programs than what Boomerang can give you. Since the program I'm trying to deco...
Hello there,
i'm trying to build a setup package for a legacy vb6 software. the software itself connects to a sql server via sqlncli (native client). i've packaged all the dependencies and deploy them to a new machine running winxp and office2003.
now, from the target machine i can connect to the database (ms sqlserver 2005) that is ru...
Is it considered bad practice to use colons to put two statements on the same line?
...
The team is familiar with ASP.NET and has been working in VB.NET for several years, but they just haven't made the transition in thinking in terms of objects. In fact, they may be a little intimidated by OOP from brief glimpses they've seen of C++ and unmanaged environments. Work has kept them busy enough that they haven't had time to ...
How to access a remote database with Visual Basic 6?
It's been a while since I've done any code in Visual Basic 6, I remember ODBC connections however I'm not sure how I would go about it. All that I need is to have a database on a host computer and then some clients would connect to it, probably without need to guarantee simultaneous ...
I tested the code in this webpage that is for moving a picturebox in runtime: http://www.davidsuarez.es/2007/11/mover-y-soltar-controles-con-drag-drop-visual-basic/
I created a Form with two pictureboxex: Picture1 and Picture2 (the page is in spanish, so I copy the modified code here):
Dim DY As Single
Dim DX As Single
Dim Flag_MouseMo...
Using VB6
Code.
Dim posn As Integer, i As Integer
Dim fName As String
posn = 0
For i = 1 To Len(flname)
If (Mid(flname, i, 1) = "\") Then posn = i
Next i
fName = Right(flname, Len(flname) - posn)
posn = InStr(fName, ".")
If posn <> 0 Then
fName = Left(fName, posn - 1)
End If
...
Using VB6
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(1.txt, ForReading)
Final = TS.ReadAll
Do Until TS.AtEndOfStream
TempS = TS.ReadLine
Final = Final & TempS & vbCrLf
Loop
TS.Close
Set TS = fso.OpenTextFile(App.Path & "\...
Using VB6
How to convert the text file through vb6 code.
Having filename like clock.fin, time.mis, date.fin, so on...,
I want to give as clock.txt, time.txt, date.txt through code.
How to write a code?
Need VB6 Code Help.
...
Using VB6
How to copy the text file through vb6 code.
Having Source filename like clock.fin, time.mis, date.fin, so on...,
Having Destination Filename are saving in stroutput.
Stroutput as a string.
I want to give as clock.txt, time.txt, date.txt through code.
code.
FileCopy App.Path & "\Temp\" & Name, App.Path & "\Temp\" & strOut...