vb6

Printer Page Size Problem

I am trying to set a custom paper size by doing: Printer.Height = 2160 Printer.Width = 11900 But it doesn't seen to have any effect. After setting this up, i ask for that values and it returns the default ones. And this: Printer.PaperSize = 256 Returns an error... Any ideas?? ...

Font size differences between VB6 and VB.NET

When setting a point 10 font size in VB6: Me.FontName = "Verdana" Me.FontSize = 10 Debug.Print Me.FontSize The reported font size is 9.75. However, when the same is done in VB.NET: Me.Font = New System.Drawing.Font("Verdana", 10) Console.WriteLine(Me.Font.Size) The reported size is 10. Can someone explain the difference here? My hu...

Can/how do you host a full VB6 Form in a C# WPF app?

I am currently exploring the option of porting some older VB6 application to WPF with C#. The plan, in phase one, is to port several key forms and not all the application. The theoretical goal is to open the VB6 form in a container of some sort within WPF via an ActiveX dll. Is this even possible? I've tried looking at the Interop and c...

Trace not working in a .NET DLL loaded from VB6 EXE

Hello I have a .NET DLL that writes to the Trace. But seems that when I call my DLL from a VB6 EXE the trace is not working. I have created an myApp.config file in the EXE folder with the trace configuration, but this does not solves the issue. I've also tried creating the Trace objects in code,but doesn't work: Dim _traceSrc as Trace...

I want to use a VB.NET dll in a VB6 program. Is it possible?

I am having problems when using a VB.NET dll in a VB6 program. I have already created my dll with the GuidAttribute, used the RegAsm to create a tlb and added it to the references of my VB6 program. The problem is when I try to create the object using CreateObject function, however the following error shows up "ActiveX componnent can't c...

How to know if there is any PDF reader on the client PC

Hi everyone, I need to know if there is any way to detect in a client PC (Windows) there any PDF reader (Adobe Reader, Foxit Reader, ...), using VB6 and. NET (C #). I can not do by reading the Windows registry, because the user may not have permissions to read it. Thank you. ...

CAPICOM Decrypt() errors with "ASN1 bad tag value met"

I have a large amount of data encrypted with the CAPICOM library through our legacy VB6 applications. I need to access this data from a .Net 3.5 app but am getting the error: "ASN1 bad tag value met" when I call the Decrypt method. Google has been little help in tracking down decent code samples or explanations as to what this error me...

VB6 - Windows API call to DnsQuery - Function and Pointer Question

In VB6 I'm making a call to the Windows API DnsQuery. Private Declare Function DnsQuery Lib "dnsapi" Alias "DnsQuery_A" ( _ ByVal lpstrName As String, _ ByVal wType As Integer, _ ByVal Options As Long, _ ByVal pServers As Long, _ ppQueryResultsSet As Long, _ ByVal pReserved As Long) As Long Private Type VBDnsRecord ...

Using a VB6 Class in C#

Is it possible to use a VB6 class in C#? ...

vb6: objShell error

public sub Main() Set objShell = CreateObject("WScript.Shell") strCommand = "C:/Program Files/s/schedule.exe" objShell.Run strCommand, vbHide, True Unload Me end sub it's supposed to run schedule.exe hidden....but program crashes with Runtime error '-2147024894 (80070002)' : method '~' of object '~'...

Get hWnd of the current window/form in VB6?

Ho do I get hWnd of the current window/form in VB6? ...

VB6 activex runs only with administrative privileges

Hi Several years ago we have written VB6 activex control that is hosted by a webpage. Since then for many users it stopped working unless the user logged on with administrative privileges. The website is set to "Trusted sites" in IE. The IE security settings are the same for both Admin and User. The control cab file is signed. The con...

how can i imitate zhider (hides any windows app)

how are they doing the hides ? http://www.zinious.com/products/ZHider/ like it can hide any window programs from showing up in taskbar and system tray. how can i do this programmatically in vb6, .net , c++ ? are there other similiar tools to zhider ? open source ? thanks. ...

How to fetch data from a text file to vb form

hello.i have a text file in which the names of the sutdents occur at various places .there is the text written "names" and then the name of one student follows it.similarlly at another place this text "Names" comes with the name of the student followed.i want to fetch the name of the student one by one i.e. first name is to be fetched th...

VB6 ADODB Fails with SQL Compact: Multipe-Step operation generated errors

Hi, I am converting an old application to use SQL Compact database (it works ok with SQ Server 2005 and 2008) and using the following code gives an error when attempting to execute a simple select command: Private Const mSqlProvider As String = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;" Private Const mSqlHost ...

Centre a form in VB6

I am writing a programme to be used internaly within our company and have come across the problem below: How can you get a Child form to centre on the screen when using the MDI parent maximised form as the backgroung ...

VB Installation problems

I installed VB 6 in my machine. Whenever I open VB 6 editor, it is asking for a "Dell Resource" CD When I open VB 6 Project. It gives me errors saying SVGControl.dll could not be loaded - Googling tells that Adobe SVG viewer needs to be present. But installing that does not solve the problem. This dll is in System 32 but when i regis...

VB6 ADODB.Recordset RecordCount property always returns -1

I am trying to get some old VB6 code to work with SQL Server Compact. I can connect, open the database and all seems well. I can run insert select commands which work. However the ADODB.Recordset RecordCount property always returns -1 even though I can access the Fields and see the data. Changing the CursorLocation = adUseClient ...

VB6 install error - Feature you are trying to use is not available

After installing VB 6, when I open the VB6 editor, it is showing the message "The feature you are trying to use is on a CD ROM or removable disk that is not avaiable." What is the issue here? ...

Crystal Reports for VB6 install issue - ordinal could not be located in CRPE32.ddl

When i install Crystal Reports installer for VB 6, CRYSTL32.EXE, I am getting an error saying "The ordinal 1132 could not be located in the dynamic link library CRPE32.ddl". Please guide me how to solve this error. ...