vb6

How do I make Internet Explorer Open Invisibly in VB6?

Doing like so: Shell ("C:\Program Files\Internet Explorer\iexplore.exe -embedding http://www.websiteurl.com") Doesn't work how I need it as I essentially need it to be able to redirect and prompt a user to download a file. Any ideas? ...

ActiveX communication

I'm developing an ActiveX EXE that exposes an specific class to a third-party software. This third-party software instanciates an object of this class and uses its methods. Strangely, this third-party software destroys its object of my exposed class as soon as it calls an specific method, but I have no idea why this happens. The onl...

Equivalent of Array() in VB.NET?

In VB6 you can do this: Dim a As Variant a = Array(1, 2, 3) Can you do a similar thing in VB.NET with specific types, like so?: Dim a() As Integer a = Array(1, 2, 3) ...

VB runtime functions in VB.NET for VB6 programmers

Hi, I'm preparing a class on Visual Basic 2005 targeting Visual Basic 6 programmers migrating to the .NET platform. My primary concern is to teach my students the best practices for developing in .NET, and I am wondering about whether to consider the use of the VB runtime functions VB.NET legitimate or not. I have read that many of th...

.NET Interop: Using an assembly in the current directory

I'm trying to use a .NET assembly from VB6 via interop without placing it in the GAC and without using the /codebase argument for regasm.exe. From what I understand, when I run regasm.exe on a .NET class library, it creates a registry entry for each class in the class library telling the COM clients they should load mscoree.dll that ser...

E_NOINTERFACE after upgrade of VB6

After upgrading a VB 6 based application exposing a COM interface, COM Clients (in .NET) built against the previous version receive E_NOINTERFACE errors. The error message (translated) Cannot convert COM-object of type AProduct.AClass to interface of type AProduct._AClass ... What went wrong here? What is the cause of the E_NOINTERFA...

VB6 Editor changing case of variable names!

Hi all, I'm not much of a Visual Basic person, but I am tasked with maintaining an old VB6 app. Whenever I check out a file, the editor will replace a bunch of the uppercase variable names with lowercase automatically. How can I make this stop!? I don't want to have to change them all back, and it's a pain to have these changes show u...

Why do I get a "Failed to export the report" error when I try to export a Crystal Report to an HTML file?

I'm trying to export a Crystal Report to an HTML file, but when I call the Export method, I immediately get this error: Source: Crystal Reports ActiveX Designer Description: Failed to export the report. I have tried both crEFTHTML40 and crEFTHTML32Standard as export format types - and both result in the same error. Here is a...

How do I export a Crystal Report to a Unicode text file?

I'm trying to export a Crystal Report to a text file, while preserving any Unicode characters that are found within. By default, Crystal Reports seems to export to an ANSI text file. Here is a highly simplified version of what I'm doing: Dim objCRReport As CRAXDRT.Report [...] objCRReport.ExportOptions.FormatType = 8 'crEFTText objCRRe...

How can one open a PNG (image) file with VB6 into an RGB array, or R, G, B arrays

How can one open a PNG formatted image file with VB6? Ideally, I (that is my customer) would like to have the PNG file open and placed into seperate R(ed), G(reen) and B(lue) arrays. VB6 is not my tool of choice (for lack of knowledge) and I be thrilled if some one could point me in the right direction for a VB6 solution. ...

Compare memory footprint of .Net and VB6 applications.

I've been trying to compare the memory footprint between a VB6 application and .Net application. Trying to determine what's the average difference between the two. The .Net code is for the most part a direct translation of the VB6 and for the most part has the same instructions as they would be programmed in C#. So while it's an apple t...

XOR Drawing in C#

I am a trying to learn C# .Net. I had written small (hobby) Analog Clock application in VB sometime ago(edit: VB6, to be precise), and I thought I will rewrite in C#.NET, as part of my learning process. In the VB application, I drew the hands of the clock in XOR Drawmode, so that I have to move the second hand, I just had to redraw it ...

How to simulate a slow printer in Windows XP?

To test printing in a Visual Basic Project I need to simulate a SLOW printer, how can I do that? ...

Is there a good VB6 documentation system similar to Javadoc?

I'm working with a VB6 code base and I'm interested in beginning to generate documentation for future development efforts. I'm traditionally a Java developer and I've gotten quite used to the Javadoc system for generating such documentation. I found VB.DOC but from what I can see it's meant for a .NET environment. Are there any that will...

searching VB6 code

I've inherited a ASP/VB6 code base (not my forte... yet) and I'm trying tease it apart to figure out the cause on an error message I'm receiving when running the app. I've traced it back through an event that is being raised in on of my classes. Is there away in windows I can search the bulk of the code base for where it is being consum...

Upgrading a large VB6 app to .NET. Opinions on VB Migration Partner

I have a really large VB6 code base with a ton of 3rd party controls. Want to move it to .NET. Rewriting it is out of question - the client sees no value in spending money to get the same thing. Moving to .NET with the built-in upgrade wizard is basically a non-starter. Has anyone tried the VB Migration Partner from http://www.vbmigr...

Dynamic memory allocation in VB6

Is there such a thing? I'm talking about something like a C++ new command i.e. allocation of memory which necessitates explicit releasing of the memory (or risk memory leaks). I ask because I remember having to solve some GDI leak problems previously by setting forms/controls/other objects to Nothing but can't remember what or why now...

How do I read an MSMQ message from a VB6 app using .NET code?

I am writing a simple xml string to an MSMQ from a VB6 app, but when I attempt to read the message off the queue in C# using the XmlMessageFormatter I get the following error: "Name cannot begin with the '.' character" How do I successfully read these messages using .Net code? ...

vb6 xcopy deployment

Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM . I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error. Is there any tools out there which will help me to do this process? I tried a tool from codeproject which is...

VB6: Interacting with an invisible form

So, I have a form in VB which is visible except when the program is started silently, in which case the form is still loaded but the interactions are done programmatically. However, in a tiny number of cases I want forms created within the invisible form to be visible. What is the best way to accomplish this, ideally without creating n...