I've developed a program that uses the mouse wheel by utilising calls to SetPropa etc. to hook messages in VB6 (there may be a better way, but it works).
Unfortunately this makes debugging impossible a lot of the time, so I use conditional compile statements to turn this off while developing...
Is it possible to pass a PictureBox to a DLL?
When I try, I get Error 91
The full project will contain routines to draw various text and images, but I have created simple project1 with just a Command Button and a PictureBox and code
Option Explicit
Dim MyClass As Class1
Private Sub...
I am writing a Function to draw an image on a printer page. To make it general I don't have reference to any forms, controls etc.
e.g. Function starts
Public Function InsertImage(pOutput as Object, pImage as String, pX as double, pY as double, pWidth as double) as Boolean
which will insert image...
Hi
I have a common subroutine which can be called from various points that I want to optionally update a status Label in a form only if it is loaded
ie I want to write code like
If Form2.Loaded Then
Form2.Label1 = "recalculating"
Else
' do nothing
End If
but of course .Loaded is not...
Now that Adobe have made acropdf.dll not work in VB6, has anyone found an alternative solution for displaying the contents of a PDF file?
I've got several old vb6 progs that create PDF's and then used acroPDF to display them that no longer work, but I can't find an alternative without spending...
Hi. I have been writing progs for many years using VB6.
In most of my programs the database I/O is done in a separate class which is compiled as a separate DLL, and so can be called by different programs as required.
Now, however, I want to use two different I/O DLLs in the same program, and I...
I have several different classes that access different databases.
All these classes use the same data structure to hold abbreviated details of the fields in the database which the users programs need to refer to.
This is defined as:
Type FIELD_ITEM
Name As String
DefinedSize As...
I am writing an application that contains (among other things!) names and addresses in text boxes and I would like the user to be able to input accented characters for foreign addresses e.g. Ėûá. I can write a routine to supply the necessary symbol from, say, a menu option, as in Word, but if a...
I get the error "ActiveX component can't create object" when trying to compact a database when trying to run on a different PC.
I am using the recommended code:
Dim jro As jro.JetEngine
Set jro = New jro.JetEngine
jro.CompactDatabase xxxx,yyyy
but it fails on the Set command
I have reference...
I am having a problem running VB6 Professional on my new Win7 PC
I installed it as suggested by running setup as administrator, but I cannot get it to run without constantly coming against a "Error accessing the system registry" message every time it tries to access my controls/classes I have...
I am having problems opening a file on my network.
I am running VB6 under Windows 7, trying to read from a file on a different pc (running XP).
If I open the file as pathname "\\PC0\DOCS\Folder1\TEST.TXT" then it works OK
However \\PC0\DOCS is mapped on boot to T: but if I try opening...
I am writing a class, and I want to be able to generate a simple picture filled with a certain colour and save it as a .bmp using SavePicture.
However, as my class does not contain any forms, how do I create a PictureBox object.
I'm sure it must be very simple, if is is possble, but my brain...
I developed a project with a dll to do the data lookup.
Later I wanted to use the same dll in a different project, so I decided to move the dll into a general library folder.
Unfortunately, this has left me with multiple entries for it when I open the project references.
I have tried regsvr32...
I have a VB6 prog that creates a new word document. Then I want the Word doc to be on top for the user to use.
I can easily create the document, but am not sure how to get Word on top. I'm sure it's very easy and has been covered before, but I'm not sure what to search the forum for!
Sample...
Is there any way to print to a printer in VB6 using all the capabilities of the printer drivers.
Most printers have a vast array of options, eg double sided, booklet form or even things like stapled if you can print to the office photocopier.
Proprietry programs like Word, Excel etc...
I want the user to be able to select the printer required so use the ShowPrinter method with PrinterDefault set to False as I don't want to change the default, however my program do not get the device selected.
Simplified code is:
Private Sub Command1_Click()
CommonDialog1.PrinterDefault =...
I need to create a SQL statement (actually for a control in VB6 but also applies in access) to select only unique values of 2 fields:
eg SELECT Field1, Field2, Field3, Field4 FROM MyTable ORDER BY Field2, Field3;
but I only want 1 record for any unique Field2 & Field3 combination.
If I use...
I need to create a SQL statement for a control in VB6 to select only unique values of 2 fields:
eg SELECT Field1, Field2, Field3, Field4 FROM MyTable ORDER BY Field2, Field3;
but I only want 1 record for any unique Field2 & Field3 combination.
If I use DISTINCT then it automatically include...
Where is the best place to store common data files used by different programs on different windows platforms? For example, I have various Label size definitions which I need in various programs.
I used to just store in a folder under "my documents" but that path keeps changing, being in the...
I am having problems configuring my network.
I have PC1 running Vista, with a Router connected to the internet plugged into a USB socket.
I also have a 4-way hub connected to the PC1 network adapter which connects to PC2 (running XP) and a network printer (actually a large Canon photocopier)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.