VB6 App loading as partial title bar only

I have an old VB6 application that is to be replaced in the coming year.  About a year ago we had one machine that suddenly failed to entirely open the app.  All that would open was a non-sizable window containing the title bar section of the of the app and the upper edge of the menu (about 1 inch by .25 inch).  The control box only has the minimize and close buttons activated.  After days of searching, uninstalling and reinstalling we gave up due to lack of time.  The machine was eventually replaced and the installed app worked fine.

Well, the same thing has popped up on another machine.  This machine can't be replaced.  Does anyone have a clue?

Help!!!
LVL 7
lmerrellAsked:
Who is Participating?
 
GranModCommented:
PAQed with points refunded (500)

GranMod
Community Support Moderator
0
 
lmerrellAuthor Commented:
Operating system is XP with all updates.  Is there some DLL or registry setting that controls window size?
0
 
Leo EikelmanDirector, IT and Business DevelopmentCommented:
well something must of been changed if it works all the time and suddenly doesn't work.  Was there recent patches/updates applied to the computer just before this problem appeared?

Leo
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
lmerrellAuthor Commented:
No updates that haven't been applied to my machine and it works fine on mine.
0
 
Leo EikelmanDirector, IT and Business DevelopmentCommented:
I'm not sure how an application can suddenly stop working without ANY changes to the machine it is running on.

we're going to need more information.

Leo
0
 
lmerrellAuthor Commented:
Additional info.

Only the main form has the limited size.  You can still manuever through the menu and open any of the apps other forms at normal size.  The splash form also appears as normal size.  
0
 
Leo EikelmanDirector, IT and Business DevelopmentCommented:
so if you compare the properties of the main form to the other forms is there a difference?

Is the main form accessing some file that no longer exists?

Leo
0
 
lmerrellAuthor Commented:
No, the properties are the same.  And no, no missing file.  
0
 
lmerrellAuthor Commented:
The Form_Load event of the main form does have this in it:

Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
  Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
  Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 7365)
  Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 5600)

Could this be causing some problem on certain machines?
0
 
lmerrellAuthor Commented:
Bingo!  Found it.  The following registry settings were all wacko:

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\GROUP CENTRAL

I was able to correct them so my short term problem is resolved.  But, I'll still award the points to anyone who can tell me what would alter these registry settings.
0
 
lmerrellAuthor Commented:
The settings were being saved (SaveSetting) on form unload as such:

If Me.WindowState <> vbMinimized Then
    SaveSetting App.Title, "Settings", "MainLeft", Me.Left
    SaveSetting App.Title, "Settings", "MainTop", Me.Top
    SaveSetting App.Title, "Settings", "MainWidth", Me.Width
    SaveSetting App.Title, "Settings", "MainHeight", Me.Height
  End If

But, the form can't be resized so the settings should never have been set to a minimized size.  Wierd.
0
 
Leo EikelmanDirector, IT and Business DevelopmentCommented:
Is there somewhere in the problem where it sets the size of the window by the value from the registry?

Because it could be receiving null or 0 values when it initially tries to do this.

Leo

0
 
Mark_FreeSoftwareCommented:

can you show the code that loads these settings?


also it is possible that the writing to the registry was interrupted
0
 
Leo EikelmanDirector, IT and Business DevelopmentCommented:
I assume if you are saving these settings then you are using a GetSetting function and not checking if the values are 0 before setting them to your window.

Leo
0
 
aguppyCommented:
hi lmerrell

I had a similiar situation not long ago. The problem was i was trying to automatically put the form in the top left hand corner, for a while it done the same as what yours is doing, I traced it down to the fact that one of my variables was sitting at -1 instead of 0 when setting the position of the form via an API call

Maybe your is similiar in that one of the positioning variables has become -1. Has someone changed the desktop from xp to classic or something similiar, as there is a x, y difference between the two.

regards
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.