Solved

vb6 on windows 7

Posted on 2010-09-06
7
981 Views
Last Modified: 2012-05-10
I have a program in vb6. I give the width of the form dinamically in form load , for example:
f.Width =600
When i try this in XP, everything is fine. When i try this in windows 7, the form is opened, but it is blank, there is no control on it. If i minimize the form, and then maximize it again every thing is ok. The controls are shown in the form. Any idea about this?
Thank You
0
Comment
Question by:info2009
7 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 33611616
Maybe some runtime issues? though I would of thought an error would popup. MS here give a link to the extended controls (any activex or ocx you might be using) http://msdn.microsoft.com/en-us/vbasic/ms788708.aspx which is this http://support.microsoft.com/kb/957924/ the vista version. might work for win7 or be a similar page.

if your not using any of these controls, have you tried compiling your app in win7?
0
 

Author Comment

by:info2009
ID: 33611780
Sorry , but the links didnt help me. Any other idea ?
0
 
LVL 23

Accepted Solution

by:
ahammar earned 125 total points
ID: 33611956
Here is a dirty way that might work.  It should happen so fast you can't see it happen.  Minimize the form then restore it again when your form opens...or at some point in your code..ie...

Me.WindowState = vbMinimized
Me.WindowState = vbNormal

or if it's outside the form code, then this:

Form1.WindowState = vbMinimized
Form1.WindowState = vbNormal

where Form1 is the name of your form..

Just a thought if you want to try it...

:-)
Albert

0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 3

Assisted Solution

by:Genetic_Wolf
Genetic_Wolf earned 250 total points
ID: 33612825
first you must ensure your component is one LISTED in the SUPPORTED section for Win7,
standart one ARE... other... like CALENDAR, AREN'T
the FULL List is here:
http://msdn.microsoft.com/en-us/vbasic/ms788708.aspx
look in the section called:
Supported and Shipping in Windows Vista, Windows Server 2008, and ... (Win7)
(Win7 was omitted on purpose in the statement)

and also in section called: Unsupported Runtime Files

Some file AREN'T Listed AT ALL.  (like some AdoX component) I already mentioned them a few, they send me back an email telling me they will update the list.



second, ensure you got Vb6 SP6 installed before compiling.
Service Pack 6 for Visual Basic 6.0
3/25/2004
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9EF9BF70-DFE1-42A1-A4C8-39718C7E381D&displayLang=en

You ALSO need all POST sp6 component update.  here SOME of them:

communs Control
27/04/2005
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=25437d98-51d0-41c1-bb14-64662f5f62fe


Cummulative Security Update for Visual Basic 6.0 Service Pack 6
09/12/2008
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=e27eebcb-095d-43ec-a19e-4a46e591715c

Cummulative Security Update for Visual Basic 6.0 Service Pack 6
04/05/2009
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=cb824e35-0403-45c4-9e41-459f0eb89e36


plz install in correct order (date)


Also, PLZ NOTE that Win7 is handling FONT differently.  Some FONT CAN'T BE used in Vb6 on Win7 for some reason (Aero theme and Font Anti-Aliasing).  Verdana for exemple is known to cause some problem in some component

For this reason try to use a standart font like MS Sans Serif.  to rule out this issue.

it would help us to see some code and wich component you'Re using in order to fix the issue.
0
 
LVL 10

Assisted Solution

by:c0ldfyr3
c0ldfyr3 earned 125 total points
ID: 33765022
Try this first:

Right click your VB Shortcut and click the compatibility tab and check the 'Disable Desktop Composition' checkbox, you could also try different versions of windows compatobility settings such as for Windows XP etc...
0
 
LVL 3

Assisted Solution

by:Genetic_Wolf
Genetic_Wolf earned 250 total points
ID: 33765038
To continue on my proposition, I thought about something else...

MENU cause a bug on Win7 wich make sometime item to go DOWN and sometime out of form view.
if you have a menu on that form, try disabling menu to see if that solve the problem

go in menu and at your root menu, Uncheck the VISIBLE box
0
 
LVL 3

Expert Comment

by:Genetic_Wolf
ID: 34002939
The menu problem is something introduced by Microsoft by one of the latest patch not related to Vb6.
The only fix I found is to create your own menu without using the IDE Menu from the Vb6 Interface.

it's a pain to program though, but there is several exemple on the net on how to do so.
good luck
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question