vb6

handle the total of Integers exceeding Long

I have the following code : Dim L as Integer Dim R as Integer Dim a as Integer a=((L+R)/2) Now (L+R) exceeds limit of Integer. In order to handle this case: I have following three options: Define L (or R) as Long Write a= ((CLng(L)+R)/2) Declare new variable as Long : Like this Dim S as Long S=S+L+R I am confused which on...

connect to the SQL instance Using Vb 6.0

Dear Friend How I can connect to the SQL instance using SMO with vb6.0 Thank You ...

Number of copies never passing from print dialog, always 1.

We have a VB6 application that uses the vbprndlg.dll library to show print selection dialogs to the user. Here recently we've received reports from users on Windows Vista and 7 (both 32 and 64 bit) stating that the number of copies always stays 1 no matter what they put in the number of copies box on the dialog. When running the exact ...

VB6 crashes after build

Visual Basic 6 is crashing after a new build of my program. Whenever I Start (F5 or Ctrl-F5) my program after making changes to the code, VB6 crashes with the following message: An unhandled win32 exception occured in VB6.EXE [XXXX]. I can't make any pattern out of XXXX. It's been 5168, 5012, 1488, etc; it changes every crash. The...

How to replace Sheridan 3D controls in VB6?

I won the first price maintaining a big vb6 application that uses a large number of external controls (big means: so big that rewriting it from scratch currently is not an option). I'm looking for a smooth upgrade path to vb.net, replacing the 3rd party controls by more standard ones. Is there an easy replacement for the Sheridian 3D c...

Change column's properties values

How do I change all the column values (Nullable=True and Allow Zero Length=True) in a table except PersonalID column? When the script is executed I get the error "-2147217887 - Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." This is the code only for one table.I need to c...

How to write wrapper class of iTextSharp and expose it as a COM object

In order for me to get this DLL to work with MC Access 2000, I was told that a interop COM wrapper object would have the iTextSharp functionality encompassed in it. I have never created a COM object. I was wondering if someone out there has ever created one for iTextSharp to use in MS Access so I wouldn't have to "reinvent the wheel." T...

addin to enhance vb6 undo redo funationality

The vb6 has a very basic undo and redo mechanism, stated here: http://msdn.microsoft.com/en-us/library/ee440706(office.12).aspx#CommunityContent i want it to undo changes like if i move a button to some plave and press ctrl z it should come back to its prev place. Can any guide me to a vb6 addin that does this. Appreciate you help ...

Enumerating Windows "log-in screen" user accounts in VB6

I am attempting to retrieve the log-in accounts that are actually visible when Windows first loads (XP, Vista and 7). I am able to enumerate all accounts (thanks to this code: freevbcode.com), however this particular function enumerates all system user accounts (Administrator, Guest, HomeGroupUser$, LogMeInRemoteUser, etc.) whether they...

how to declare an array of user defined type in vb6

Type ABFator a As Single b As Sinlge End Type Dim ABFactorArr(8) As ABFactor 'Basically i want to declare an array of 8 ABFactos which i can then access I do this and the complier gives error user defined type not defined Thanks ...

Hot make a mouse leave event in vb6 over a image

Hi, I have a image for which i have written code in MouseMove to higlight it. this is being done what i want is to when the mouse leaves image the highlights go away but i cant seem to find any event which will do that. i am working in visual basic 6.0. i have tried the mouseup and down event but they dont match my req. Thanks ...

global click event handler (WithEvents)

I am trying to create a class module that will act as a global handler for when ever someone clicks one of the sixty textboxes I have in my form. Th textboxes represent a timecard for the week displaying information as clock in, clock out, lunch start,end,duration, total daily hours under each fo the seven days of the week. When someon...

Crystal Reports 8 - 2 machines, only 1 exporting

Hi, i'm working on an old VB6 project, using CR 8. At the development machine, with Crystal Reports installed, i can export to excel, for example, without problems. Not so at a client machine. I've copied all the CRs dlls and used modules to compare what is different. The only thing different about the two machines is that the developmen...

Hide Member Without Using Underscore

I have a class written in VB.Net exposed to COM via the ComClass & ComVisible attributes. The class is then made available to VBA via a TLB. In VB6 you could easily mark a member hidden in the object browser but still available with a check mark. In VB.Net the only way I found to make a member hidden the VBA object browser is to prefixin...

vb6 Capture Entire Web Page

Hey all, I've been trying to find the code that allowed me to capture an entire web page using the webbrowser1 control and i believe also a picturebox or 2.. but i am not able to find the code that i used a couple months ago! I've been goodgling until I'm all googled out! If anyone knows of the code for VB6 then please post a link to it...

Crystal Reports "Login failed for user 'acs_sql'."

I've got an app running in VB6 using Crystal Reports version 9 (shutup -- it's been running great for them for 11 years). I've got MANY crystal reports in this thing, and 99% of them work just fine after our "upgrade" to Windows 7 However, on 1 specific report, when I try to run it from the app, I get the error mentioned above. I've c...

Problem extracting text from text file perfectly in VB6

Hi everyone, I am working on a VB6 project and I need to extract plain text from a text file. Here is code of the function I used to do that: Private Function FileGetText(TextFile As String) As String Dim FileContent As String Dim TextLine As String Dim n As Integer n = FreeFile Open TextFile For Input As #n 'Open given Text File Do Un...

Access controls of parent dialog in VB6

Hello, I have a dialog in vb6 which changes the values being displayed in its parent dialog. the x1 is displayed in txt_c1 text in parent dialog and it has a txt_1validate funtion too for the text box. Now i want to change the value of txt_c1 txtbox from child dialog and then call its validate function. But the problem is that txt_c1 is...

how to add image using in project which is loading image using LoadResPicture in vb6

Hi All, I have a project which is loading images using: imgwrc1.Picture = LoadResPicture(115, 0) Now how do i add my image and give it id 116, 0 in the argument shows that it is a bitmap but there are no bitmaps in the project folder. So from where is the image being loaded. I want to display this image in dialog ...

AddIn Suggestions for Visual Studio 6 / Visual Basic 6 Code Nagivigation & Exploring

Hi! I am looking for good Visual Studio 6 Addins for code navigation and exploring. For instance, I want to have the functionality of showing in- and outcoming calls of methods like Resharper already has. Furthermore I am looking for a simpler code navigation. Do you have any suggestions? ...