dcsimg
Results 1 to 15 of 15

Thread: [RESOLVED] Locate (Alter) VB StartUp Screen Settings as now Full Screen

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Resolved [RESOLVED] Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Something odd happened.
    When I start VB, I normally received a moveable window
    which contains a SSTab with three choices (New Program, Existing, and Recent).

    I still receive the SSTab with choices BUT the underlying window that contains it is full screen with just a close button.

    Anyone know where these window setting reside so I can change them back to a moveable window?

    Registry Search shows all shell - open - command
    as mypath/vb6.exe "%1".
    Not sure what "%1" is but VB as well as other files
    using shell-open-command has it.

    No keys listed I can see which indicated left, top, width, height or constant for sizing.
    Last edited by vb6forever; Aug 9th, 2018 at 08:49 PM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    I found this list in the registry which appears to control "some if not all" of the VB IDE. It is located at HKCU\Software>Microsoft>Visual Basic> 6.0 (or 5.0 in my case). It includes the following properties: (see image)

    I have played with changing the default values (from 1 to 0) for several of them but no luck. Those that have multiple bits I have Not Touched.

    To clarify, when the VB IDE (VB5.exe) is first started it "now" puts
    a Window with the Title Bar "New Project" at full screen (maximized) and no way to minimize or size (X only).

    On top of this main window appears the SSTab (assume it is contained in another Window) with the choices New, Existing, Recent).

    PREVIOUSLY - when the VB IDE first started it started as Normal (can resize).

    Anyone know which property (subkey) out the attached list affects this startup sizing and its value?
    Attached Images Attached Images  
    Last edited by vb6forever; Aug 10th, 2018 at 08:19 AM.

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    12,363

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    To the best of my knowledge VB starts in whatever mode it was in when last closed. If it was in normal window mode it starts in normal windowed mode. If it was maximized then it starts maximized. I have never saw it as an actual full screen app and have never saw it without the typically 3 control options in the top right. Now of course I always run in MDI mode so can't say if it behaves the same in SDI mode if that is what you are using.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    DataMiser:

    Thanks for responding.
    As I said something burped - or - I unknowningly hit a key combination of some sort. Whether SDI or MDI, I always got a VB_IDE on startup which was
    sizeable and the normal three buttons in the upper corner. As stated now just get X button only.

    I tried toggling registry key MDIMaximized to 0 (set at 1) but this had no effect on the IDE. Appears to be a MDI project default when one chooses to make an MDI.
    This is past the IDE load process IMHO.

    There are several subkeys with multiple bytes (assume they relate to some variable that where bits are being toggled (???), and it may be one of those -- BUT -- which one?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    DataMiser:

    Thanks for responding.
    As I said something burped - or - I unknowningly hit a key combination of some sort. Whether SDI or MDI, I always got a VB_IDE on startup which was
    sizeable and the normal three buttons in the upper corner. As stated now just get X button only.

    I tried toggling registry key MDIMaximized to 0 (set at 1) but this had no effect on the IDE. Appears to be a MDI project default when one chooses to make an MDI.
    This is past the IDE load process IMHO.

    There are several subkeys with multiple bytes (assume they relate to some variable used during IDE load (startup) ???), and it may be one of those -- BUT -- which one?

    Sadly I did not make a copy of these reg key beforehand (never thought of it). Will do, if - when - I get it back.
    Last edited by vb6forever; Aug 10th, 2018 at 12:05 PM.

  6. #6
    Hyperactive Member
    Join Date
    Jul 2013
    Posts
    329

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    I would delete all these keys to allow VB to return to the default state.
    Carlos

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Good idea. Should of thought of it. Can always restore.
    Thanks will give it a go.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    What's interesting is that when a project is loaded
    everything works Ok (sizeable) -- HOWEVER (and there may be more exceptions) selecting "File>Save Project As" triggers a FullScreen of the IDE (IDE appears to be a MDI Window) YET the "Save As" dialog remains as if IDE is normal (sizeable).

    =========================
    Deleted All Registry Keys Under HKCU\Software\Microsoft\VB..

    Still have same issue. So my guess stored elsewhere (??)
    Last edited by vb6forever; Aug 10th, 2018 at 03:49 PM.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Since weekend coming may try and reload VB.
    Would be interesting though to know where ALL these setting exist.

  10. #10
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,440

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Not sure how you got what you got, but I was able to reproduce it and correct it manually.

    You should have access to Spy++ or some other tool that allows you to get the window handle of any window. Once you have that window, you can restore the size. Hopefully once it's restored, the next time you open it, it will remain restored and not maximized. That was the case with me. Once I broke it and made the dialog maximized, every instance of VB started with the maximized dialog. Once I fixed it, everything was back to normal.

    1. Open a test project, add a button to the form and add this code. Then run the project, just don't click the button yet.
    Code:
    Private Const SC_RESTORE As Long = &HF120&
    Private Const WM_SYSCOMMAND As Long = &H112
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
    
    Private Sub Command1_Click()
        Dim cWnd As Long
        cWnd = Val(InputBox("Enter Window Handle"))
        If cWnd <> 0 Then  SendMessage cWnd, WM_SYSCOMMAND, SC_RESTORE, ByVal 0&
    End Sub
    2. Now open a new instance of VB, but leave that maximized dialog window open - don't close it

    3. Get the hWnd of that dialog, the window that belongs to the title bar, not one of its child windows
    -- note remember to refresh your tool's listing as needed to ensure it finds the dialog hWnd

    4. Click the button on your first test project and the dialog window should be restored.
    -- note you may have to use Alt+Tab to get to your 1st test project if it went behind that maximized dialog.

    5. Now click the Open or Cancel button in that dialog to close it & then close that VB instance.

    6. Close all VB instances & done. Open a new instance of VB and see if the problem went away

    Edited: If your tool (like Spy++) gives the hWnd in hex format, simply prefix the value with &H when you click that button. For example, Spy++ gave me 000105F6 as the window handle, I just entered &H000105F6 when button was clicked.

    You mentioned other dialogs became full screen also. If the above worked for the initial dialog, then test again for the other dialogs; i.e., "Save As" dialog. Repeat as needed for other dialogs.

    If this doesn't work, almost seems like you have some sort of virus/malicious code running that is maximizing windows of the dialog class? But that's getting ahead of ourselves.

    And just for grins, whipped up a self-searching & restore routine. No external tools needed.
    Code:
    Private Const SC_RESTORE As Long = &HF120&
    Private Const WM_SYSCOMMAND As Long = &H112
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
    Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    Private Const WS_MAXIMIZE As Long = &H1000000
    Private Const WS_VISIBLE As Long = &H10000000
    Private Const GWL_STYLE As Long = -16
    
    Private Sub Command1_Click()
    
        Dim cWnd As Long, lAttr As Long
        
        Do
            cWnd = FindWindowEx(0, cWnd, "#32770", vbNullString)
            If cWnd = 0 Then Exit Do
            lAttr = GetWindowLong(cWnd, GWL_STYLE)
            If (lAttr And (WS_MAXIMIZE Or WS_VISIBLE)) = (WS_MAXIMIZE Or WS_VISIBLE) Then
                SendMessage cWnd, WM_SYSCOMMAND, SC_RESTORE, ByVal 0&
                MsgBox "Dialog restored, hWnd: " & cWnd
                Exit Sub
            End If
        
        Loop
        MsgBox "Failed to find maximized dialog window"
        
    End Sub
    The above will look for top-level dialog windows that are maximized and then restore them. It only does the first one found. In either case a msgbox displayed for success or failure.
    Last edited by LaVolpe; Aug 11th, 2018 at 11:05 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    LaVolpe ---- GREAT JOB - Owe you one.
    Still have no idea what I did and to my knowledge No Viruses as First thing I checked after upset.
    Have notice I've been getting a lot of extra things (double comment characters (') on lines), so going to
    check out mouse and settings.

    Planned to use Process Monitor this AM to see what I could do -- not good at it though.
    Saw your post.

    Used Spy++ and your "manual" code but could Not get to work.
    Went to post back and saw the Auto code (WORKED GREAT).

    Here's a pic of manual FWIW.
    Attached Images Attached Images  

  12. #12
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,440

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Hopefully that also fixes the "Save Project As" dialog. It did for me.

    Looking at your screenshot, you can clearly see that the dialog is maximized as shown in the "Rectangle" & "Client Rect" lines. The manual process should've worked if you entered into the InputBox: &HE02F6 or &H000E02F6. But no biggie, sounds like it's fixed now using the auto-search/fix sample code?

    Apologize a bit. I could've solved this for you yesterday, but was distracted by something else. And I forgot about your thread until this morning. Glad you saw my reply before you tried an unnecessary re-install.

    edited & FWIW. The way I replicated the problem was to use code similar to that posted above, but instead of sending the dialog SC_RESTORE, I sent it SC_MAXIMIZE. Even tried to drag the dialog to the corners and top of the screen to see if Windows would somehow auto-size to maximum, but it didn't. Also tried known WinKey combinations but didn't maximize. Wonder if some registry setting was tweaked by you or some other project. Yep, kinda curious how you managed to maximize that specific dialog by mistake.
    Last edited by LaVolpe; Aug 11th, 2018 at 12:26 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Yes, also resolved the SaveAs, so "assumption" using the same dialog throughout the IDE.

    you can clearly see that the dialog is maximized as shown in the "Rectangle" & "Client Rect" lines.
    Noticed that and also the Restore Rect sizing.
    Appears the Restore Rect must be either a default or hard coded.
    Be interesting to know where the Dialog settings are actually stored.

    Wonder if some registry setting was tweaked by you or some other project.
    By me, NOT knowingly. Stay out of registry unless absolutely needed.
    Was working on this VB file compare project so I can compare VB Modules, Classes, etc.
    Was making good progress -- a lot of RTB API calls - and was trying to get the
    bad line highlight to stay over each line of bad text so
    was messing with API RTB Scrolling. Was also searching (Firefox) the net at same time for
    info, so ???.

    Again. THANKS A BUNCH.

  14. #14
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    17,440

    Re: [RESOLVED] Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Quote Originally Posted by vb6forever View Post
    Be interesting to know where the Dialog settings are actually stored.
    If really interested, you can capture the registry settings (post #2 above) and save them somewhere. Then using the "manual" method I posted above, find and send the dialog a SC_MAXIMIZE message and close the maximized dialog. Then go back to the registry and see if any settings changed. If so, might have your answer. If not, maybe they are saved elsewhere in the registry? I'd have to be super curious to expend the effort for that particular issue, and personally, I'm not that curious but maybe you are?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Feb 2017
    Posts
    229

    Re: [RESOLVED] Locate (Alter) VB StartUp Screen Settings as now Full Screen

    Didn't expect you to do it as you've already expended a lot of effort on my behalf.
    I'm not that curious but maybe you are?
    I am. Think it will be a good an easy test case both to id (where or if) VB is storing this
    stuff in the registry. Also thought I'd give Process Explorer a go at it to see if I
    can't get a little more familiar with it.

    Planned to do a registry compare once I get this file compare utility completed - how long ? - .
    My first "real in depth" attempt at manipulating the RTB.
    Current issue I'm working on is after identifying the various "file" differences (haven't got to words in each line yet) I highlight those lines. However, for some reason the RTB text scrolls / moves back to the top after the highlight call and the highlight also goes there (line 1) even though highlight indicates it highlighted line 53 in my test file. So hopefully a quick fix.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width