fortypoundhead.com

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2014-11-19
07:46

VB6 on Windows 10

Report Back to Forum Back to All Forums

I thought I would start a thread just for working with VB6 on Windows 10, rather than cluttering up the article page (http://www.fortypoundhead.com/showcontent.asp?artid=23993) I did a fresh build last night, then proceeded it to update it to the latest build (9879). After the update was complete, and all patches installed, I then proceeded to install VB6 following the previously outlined procedure. Worked like a champ, and no problems were encountered. I was able to: - Open and utilize the IDE - Compile programs of varying complexity - Run compiled programs So, looks like things are good so far.

Marcvaneck

Joined:
2015-04-22
06:31

Last Seen:
2016-01-13
01:13

Posted on:
2015-04-22
07:10

Report Back to Forum Back to All Forums

Thanks for your post!
Followed your post and it all worked like a charm with Build 9926. Am updating at moment so will see what happens with new build (10049).

I ran vb setup again after the first install and this time selected the Data Access, and it had no issues installing it. No hangups.
So far, so good.

Have picked up some font issues, like Terminal size 6 not being available, having to select 7 instead.
(I use terminal font for RS232 communications windows)

Another issue I have is using the GetWindowsVersion (GetVersionEx) returning "Windows NT" and not the correct version.
Searching on google, it seems this might have started with windows 8.. will have to investigate.

I have managed to get the wheel mouse to work in the VB IDE, ( VB6IDEMouseWheelAddin, registering the dll using an elevated cmd window),
but its a bit iffy. It seems to not always respond to the scroll, so its a bit slow in scrolling through code.
But its usable.
(I did try using the old intellipoint mouse software trick, but that did not seem to work)

Any ideas on an alternative, better method perhaps?
Marc

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-04-24
08:26

Report Back to Forum Back to All Forums

Off the top of my head, no idea about the scroll wheel.  I've not had an issue with it myself.

I see a rebuild in my future, possibly this weekend, so I will run through the process again then.

Marcvaneck

Joined:
2015-04-22
06:31

Last Seen:
2016-01-13
01:13

Posted on:
2015-04-29
01:10

Report Back to Forum Back to All Forums

Did you also use the VB6IDEMouseWheelAddin?
I am now on build 10049 and all is still well :)

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-04-29
13:19

Report Back to Forum Back to All Forums

Yep - the ol' tried and true worked fine.

rpg1999

Joined:
2015-05-28
03:02

Last Seen:
2015-06-03
02:06

Posted on:
2015-05-28
03:05

Report Back to Forum Back to All Forums

I'm sure I had this working on an earlier build but now I am having problems.

Despite creating the blank MSJAVA.DLL file in c:\windows\ I am still getting the prompt to install Microsoft Virtual Machine for Java and can't seem to get round it.

This is on build Windows 10 Preview 10074.

Anyone else have this problem?

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-06-02
12:38

Report Back to Forum Back to All Forums

No problems with that build. FYI, with the iminent release to manufacturing (RTM) of Windows 10 on July 29, I won't be doing any further testing on pre-release  builds.

rpg1999

Joined:
2015-05-28
03:02

Last Seen:
2015-06-03
02:06

Posted on:
2015-06-03
02:02

Report Back to Forum Back to All Forums

The blank file wouldn't work. I even created an MSJAVA.DLL file with the same filesize but no joy. I tried this in c:\windows\, c:\windows\system32\ and c:\windows\syswow64 but no luck.

In the end I copied the proper MSJAVA.DLL (on its own) from a working machine to c:\windows\syswow64\ only and this solved the problem. Hope this helps anyone out there.

GaryOCo

Joined:
2015-07-24
16:27

Last Seen:
2015-08-02
17:09

Posted on:
2015-07-24
16:44

Report Back to Forum Back to All Forums

What about updating my Windows 7 Pro development machine to Windows 10.

I have been developing on this computer ever since W7 arrived but now I am going to want to update the OS to W10. The computer is telling me that it fine to do the update, I have the icon in the task bar telling me that I can go ahead and install W10.

When I converted from XP to Windows 7 I bought a new computer and so I re-installed VB6 and all my add-ons and it was a fairly painful process. Since then I have added heaps of ActiveX ocxs and dlls so this time I would like to just update the OS on the computer that has VB6 installed.

I don't imagine anyone has been able to try it yet but how do you think my vb6 installation will survive that?

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-07-27
09:04

Report Back to Forum Back to All Forums

I'll be giving a try soon. However, my only Windows 7 machine doesn't have VB6 installed.  Rather, I'll be upgrading a Win8.1 machine to Win10, and it *does* have VB6 installed.

Now, if I could talk my wife into letting me experiment with her machine, I'll install VB6 on the Win7 box, perform the upgrade to Win10, then test. If I can pry it loose from her this weekend, I'll give it a shot, and report back here.

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-07-30
10:46

Report Back to Forum Back to All Forums

So I did the upgrade yesterday, from Windows 8.1 to Windows 10, and the process went super smooth. 

Testing with the VB6 IDE and compiling applications proved no problem.  Further, testing with apps compiled on Win7 and Win8.1 showed no problems, either.

Anyone else?

GaryOCo

Joined:
2015-07-24
16:27

Last Seen:
2015-08-02
17:09

Posted on:
2015-08-02
17:09

Report Back to Forum Back to All Forums

Thank you @dwirch that is very encouraging although the transition from W8 to W10 may not be as involved as the one from W7 to W10.

I am supporting a widely used VB6 programme that has over 300,000 lines of code and naturally I am a little nervous about doing the update.

I will, of course, do a disc image before I actually do it so I will be able to revert to that if necessary but I am hoping it will work without any hiccups.

I am sure that I am not alone in wanting to thank you for the work you are doing on this, you are making a lot of legacy programmers feel secure and confident that their future is looking good, at least for the life of W10 which, according to MS is a long time yet.

davidd

Joined:
2012-12-17
06:18

Last Seen:
2015-09-13
06:46

Posted on:
2015-08-31
03:39

Report Back to Forum Back to All Forums

VB6 in Windows 10 "Tablet Mode"

The VB6 IDE also runs OK when in Windows 10 "Tablet Mode". This allows VB6 applications to be more easily converted to also operate in Tablet Mode. However Tablet Mode requires applications to run maximized (not windowed) so may require adding checks to your code. (New 7-inch tablets are apparently only available with Tablet Mode, not Desktop.)

One way to detect tablet mode is to read registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell and if value TabletMode is 1 then it's in Tablet Mode (0 if not). If a user switches to Tablet Mode when a VB6 EXE is running with the form in an unmaximized/windowed state then Windows 10 seems to maximize the form automatically (and restore it back after returning to Desktop mode) - this seems to be a feature of Windows 10. The form Resize event is triggered when this happens.

davidd

Joined:
2012-12-17
06:18

Last Seen:
2015-09-13
06:46

Posted on:
2015-09-05
06:45

Report Back to Forum Back to All Forums

A bit more on VB6 in Windows 10 "Tablet Mode"...
After a VB6 app starts in Windows 10 "Tablet Mode", after presenting the first form, it seems that you need to keep a "current form" visible at all times - if at any point there isn't a "current form", then Start reappears, and the user has to switch back to their app.
For example the following VB6 code causes Start to appear (and so the user needs to click on the app in the taskbar to get back to Form2):-
Form1.Show 'Form1 appears.
'(Do something.)
Form1.Hide 'No "current form" after this line.
'(Do something for a second or so - Start will appear.)
Form2.Show 'Too late! - Start has already appeared.
However the following code leaves Form2 visible, with no Start appearing:-
Form1.Show
'(Do something.)
Form2.Show 'Get the new "current form" Form2 in place before hiding Form1.
Form1.Hide
i.e. make sure you have another form visible before you close the current form or make it invisible. (I don't know the technical details of Tablet Mode, but that seems how it works in practice.)
Or just stick to Desktop Mode!
David
P.S. Anyone know a method of programmatically bringing your app forward (with focus) once the Tablet Mode Start has appeared i.e. without the user having to switch back to it?

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-09-09
10:20

Report Back to Forum Back to All Forums

Hmm.  Maybe toggle the "Always on top" mode for the form in question?  My theory is that if you activate a form, then move it to the top with focus, then turn off Always on top,  Windows *should* flip back to desktop mode, with your form in view.

I'm currently away from my dev box, but I'll give it a shot later today.

davidd

Joined:
2012-12-17
06:18

Last Seen:
2015-09-13
06:46

Posted on:
2015-09-11
06:08

Report Back to Forum Back to All Forums

Thanks dwirch, what you write may work, though I couldn't get it to flip back to the application once it had gone back to Start, whatever I tried.

However I didn't put enough detail into my original question - I'm trying to get my application to start when the tablet starts up i.e. by copying a link to the Startup folder. This works fine in Desktop mode, and on startup the application appears and has focus. But if I set the tablet to the new Windows 10 Tablet mode, on startup the application runs but does not appear on screen i.e. you have to switch to it via Alt-Tab or by clicking on its icon in the taskbar.

This may not seem a big deal, but the application is intended for use by blind people and so I want to make it very "locked down" i.e. in control as soon as they start a PC. I could just say "use desktop mode" but Microsoft are saying that desktop mode will not be available for tablets smaller than 8", so I want it to work OK in Tablet  mode also if possible. (It may be that an easy registry hack or whatever will emerge to get back to desktop mode, but I don't know of one yet.)

If your method does cause the program to get control back then it should also work on startup. I'll have another go!

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-09-12
06:42

Report Back to Forum Back to All Forums

Here's the code for the AlwaysOnTop toggling:

Option Explicit

Private Const HWND_BOTTOM = 1
Private Const HWND_NOTOPMOST = -2
Private Const HWND_TOP = 0
Private Const HWND_TOPMOST = -1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1

Private Declare Function GetActiveWindow Lib "user32" () As Long

Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long

'Pass the form's hwnd.
'for example, MakeWindowAlwaysOnTop me.hwnd

Public Sub MakeWindowAlwaysTop(hwnd As Long)
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
End Sub

Public Sub MakeWindowNotTop(hwnd As Long)
SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
End Sub

You should be able to drop this in a module, and it should work straight away. Any problems with this code, let me know

rlcyicvg@sharklasers.com

Joined:
2015-09-14
09:20

Last Seen:
2015-09-14
09:22

Posted on:
2015-09-14
09:22

Report Back to Forum Back to All Forums

I'm having trouble selecting two controls. It seems like the selection squares are visible when one control is selected but is not visible when two controls are selected

1. Create a form

2. Add two buttons

3. Click one button, you will see the selection squares

4. Hold ctrl and click the second button. The squares are not visible but they can still be moved together

 

Is anyone else seeing this or does anyone know of a fix?

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-09-22
10:47

Report Back to Forum Back to All Forums

Yeah, mine does that too.  Not sure of a fix, though. Sorry.  I'll play with it and see if I can figure something out.

 

 

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2015-10-12
09:12

Report Back to Forum Back to All Forums

Hi,

I used your instructions to install Visual Basic 6 on Windows 10.

It seems to be ok except;

I can't get the Data control DAO to connect to Access.

Reading seems to indiate I need MSjet40.dll I checked and this is installed in SysWOW64 but not in system32.

Also I get a window trying to configure Visual Studio 2013 I let it finnish and new open a VB 6 project.

Then add a data control and cannot find Access 2000 on the connect property options.

Access is there but I can't use any of my Access data bases.

Any Ideas?

 

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2015-10-25
21:31

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-11-04
08:20

Report Back to Forum Back to All Forums

You need to install the 32 bit version of Jet.

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2015-11-08
07:23

Report Back to Forum Back to All Forums

I have MSjet40.dll in SysWOW64 and system32.

There must be something more to installing it than just pruuting it in the folder. Do yu know were I can find intructions for installing MSjet in Windows 10?

 

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-11-12
09:21

Report Back to Forum Back to All Forums

I'll look around, but it should be as simple as installing MDAC from:

https://www.microsoft.com/en-us/download/details.aspx?id=5793

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2015-11-13
06:44

Report Back to Forum Back to All Forums

Thanks, but MDAC did not help.

rog@binley.eclipse.co.uk

Joined:
2015-11-26
07:30

Last Seen:
2015-11-26
08:01

Posted on:
2015-11-26
07:43

Report Back to Forum Back to All Forums

Hi,

I thought I would try some of my old VB6 software in windows 10. Mostly seems to work, apart from graph32.ocx. The two support files + graph32.ocx are in syswow64 and graph seems to register, but doesn't run. Any suggestions?

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2015-12-04
02:41

Report Back to Forum Back to All Forums

It may be that MDAC just didn't install. Are there special instructions for installing it on windows 10?

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2015-12-06
08:39

Report Back to Forum Back to All Forums

The only thing that I would think would be a suggestion would be to run the setup as administrator.  There should be no other issues installing it.

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2016-01-31
08:00

Report Back to Forum Back to All Forums

This page has been removed.

~~https://www.microsoft.com/en-us/download/details.aspx?id=5793

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2016-01-31
10:55

Report Back to Forum Back to All Forums

Do you know the name of the file that VB6 SP6 comes in?

i can't find it any more.

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-11-23
05:24

Posted on:
2016-01-31
12:20

Report Back to Forum Back to All Forums

Wow - that link died quickly. I literally was just on that link just a few days ago. Maybe MS is having issues? It's been known to happen with the MSDN and/or technet pages.

The VB6 SP6 package can be had from here:

https://www.microsoft.com/en-us/download/details.aspx?id=5721

I just now went to that link, and it is alive.

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2016-02-01
07:16

Report Back to Forum Back to All Forums

The result I got from using the link you mentioned above is that the the SP6 install was not successfully completed.

I have a screnn shot but yur sight will not let me uploasd an image.frown

LeighWardle

Joined:
2016-02-07
16:35

Last Seen:
2016-02-07
16:49

Posted on:
2016-02-07
16:38

Report Back to Forum Back to All Forums

Hi all,

I have installed Visual Basic 6.0 Professional on Windows 10 Pro.

I am now attempting to install the final Visual Basic 6.0 Service Pack (SP6B) that I have downloaded from the Microsoft Download.

Running the SP6B install using Run as Administrator shows the following:

Searching for installed components
then the "License Agreement" dialog appears. -
As soon as I click ""I agree"" the install terminates with this message:
"Visual Studio 6.0 Service Pack 6 Setup was not completed successfully"

The VB6 Help | About screen shows the version number of the original version, not SP6B.

I have also tried using Visual Studio 6.0 Installer wizard v4.4 - using Run as Administrator, but it also gave the same error when attempting to install SP6B.

Running the SP6 update both "As administrator" and in "XP SP3 Compatibility Mode" did not work.

Regards,
Leigh

vholford

Joined:
2015-10-12
08:53

Last Seen:
2016-02-11
06:55

Posted on:
2016-02-11
06:55

Report Back to Forum Back to All Forums

~~Leigh has the same problem I have been posting about. Does anyone have a solution?

adrianhalid

Joined:
2013-01-05
21:57

Last Seen:
2016-08-03
16:35

Posted on:
2016-08-03
16:35

Report Back to Forum Back to All Forums

When you installed Visual Studio did you get to the end? Did it say

Visual Studio installed correctly or Visual Studio did not install correctly.

If you got the message "Visual Studio did not install correctly" you will still have the visual studio application on your PC but the installer is in a broken state.

So when you try to install the SP6 it will fail. I just expereinced this today when setting up a new machine.

You must be logged in order to post a reply.




Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers