• Form placement in VBA editor (WinNT 4.0. SP6, O2k / VB6.0)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Form placement in VBA editor (WinNT 4.0. SP6, O2k / VB6.0)

    Author
    Topic
    #391186

    Hi,

    Have recently had my PC reformatted due to a serious crash….
    After re-installing all my apps, my VBA editor behaves slightly strange, when it comes to the placement of the forms within the VBA editor environment.
    It has moved its default setting for new forms towards bottom right – meaning that I constantly have to scroll substantially, after having added new forms.

    Though this is not critical it is never the less rather irritating.

    Would anyone know where this setting can be change – or where it hides…. (my gut feeling is “somewhere in the registry…”)

    Any hints will be highly appreciated.

    Thanks
    ;o)) Henrik

    Viewing 0 reply threads
    Author
    Replies
    • #697852

      I don’t know where this setting is stored, but why don’t you maximize the windows within the Visual Basic Editor?

      • #697989

        it’s already maximized, but I like to use the debugging and navigation tools as well, so they are all visible and docked (props, Explorer, immediate, watches)

        Normally when working with the code, this suits me just fine as I got enough room to navigate within the code (approx. 10x15cm on a “17” screen).
        But when I add a form, I get a lot of white space in the top left and can only see the top of the top left corner of the form, which is rather irritating as I don’t have any use for the first whitespace area.

        I’ve attached a GIF in which you can see how the editor looks – problem is that the form cannot be moved towards top left – I have to scroll down to get it moving…

        ;O)) Henrik

        • #698009

          Ah, it wasn’t clear to me at first that you meant the position of the UserForm within the window; I thought that the window was shifted.

          I have never seen this behavior, and I can’t find anything about it in the Knowledge Base or in the newsgroups. Can’t find the relevant entry in the Registry either. So I am very sorry…

        • #698024

          Wild guess:

          Since forms are controlled by a file called FM20.dll, I would rename that file and then do a detect and repair of Office.

          • #698033

            Thanks for the advice/wild guess.

            Unfortunately it didn’t change anything…
            Just thought the XY co-ordinates of the window would be stored somewhere in the registry…( maybe on the .frm key – but I cannot “decode” that key)

            ;o)) Henrik

            • #698044

              Why not just resize the window the form design is showing up in. I’ve found that the form itself seems to stick to its location, and it looks like the window is actually too big to be completely seen. I’ve seen this happen often by accident. Try tiling the windows and then resizing the form design window to center the form.

            • #698083

              (Edited by HansV on 30-Jul-03 16:22. Reduced huge screenshot in size – it caused horizontal scrolling in most resolutions.)

              Resize how ??

              I need the form moved towards top left in its window, but top and left edges are somehow locked at their current positions and this goes for all my forms, not just a single one.

              Further, when working with large forms, I often have to use another PC as the one with this problem doesn’t provide a horizontal scroll bar, meaning that I sometimes not even can get a hold of the bottom right corner of the form.

              When you look at the dots on the edges of the form – you’ll see that top and left are filled (blocked), while right and bottom are hollow (resizable).
              But since I can’t get hold of the hollow ones due to the missing horizontal scroll bar, this knowledge isn’t of much use.

              ….and as earlier mentioned I’ve got a nasty feeling that this is triggered by the regEdit and some odd key
              (I’ll give Jan KP’s latest answer a go in just a sec.)

              ;o)) Henrik

            • #698397

              I can’t find a way to mess my screen up as bad as yours, but I wonder whether it might do any good to close all the little windows, maximize the UserForm window, and re-dock the others?

            • #698490

              I managed to get mine into a similar state but cascading the windows got me back in shape. The design window where forms and code appear actually seems to be behind the docked windows, which causes all sorts of wierdness.

            • #698486

              Cascade the windows, which will change the size and make the edges of the window visible so you can tweak the position of the form as well.

            • #698499

              Thanks Hans for the resizing (should have done that myself, apologies)

              Jscher; tried your tip, did no good (see picture…)

              Charlotte; the “normal” windows view tools do no good – neither cascading, tiling…(I have tried them all in many ways)
              Problem is that the form is locked with it’s X,Y co-ordinates within the form window itself, not just the VBE. (see attached picture for full details)

              With the danger of repeating myself here. The core of the problem seems to be that the X,Y co-ordinates for the placement of the form within the form window somehow has been changed and that even a complete reformatting of the disk doesn’t override this setting. Therefore my gut feeling on this is that it must be a setting stored somewhere “deep down” and the most likely place to me – is the registry – question is then; in what key is this stored ??

              Thanks for the many good suggestions – please keep them coming, I’ll try them all….

              ;o)) Henrik

            • #698504

              What happens if you log on as a different user?

            • #698506

              The problem persists – even when logged on as a different user.
              Contrary if I log on with my account on another PC the problem disappears.
              – so it has to be related to this specific computer and its environment

              Right now I think I’m on to something….
              I’m running a dual screen with Word in One monitor and the VBE in another.

              It’s using a matrox millenium G200 card. When I change my settings to a single screen, the positioning changes. Further when I change the display size multiple times in to all sorts of odd sizes the X,Y co-ordinates change…. and now I’m experimenting to see if I can land at a setting in the top left corner at the same time as I’m running in dual mode….

            • #698521

              Yupi-ka-ye…

              MYSTERY SOLVED !! (apologies for yelling, but this was a mean one)

              Matrox has for ao. dual screens a utility called “Powerdesk”, this was the one that caused all the fuzz.

              Thanks for all efforts put in.

            • #698546

              The devil is *always* in the details!! I don’t think you mentioned using a dual monitor setup, which might have led the thread in a different direction earlier.

            • #698832

              Right, no I didn’t mention my monitor, as I initially didn’t have that in mind – all my other apps are working fine….

              Check mark was in “Center dialog boxes on screen” – and apparently the Matrox driver don’t distinguish between run and design modes for forms…
              – so the screen tri-angulated its edges and placed top left of my forms in center of the screen… (@#$!% !!! – well, guess I asked for it… (an “error 40”))

              Thanks for all efforts anyway.

              ;o)) Henrik

            • #698068

              In my Office 2000, it seems to live under:

              HKEY_CURRENT_USERSoftwareMicrosoftVBA6.0Common

              There is a Dock key in there that is known to control docking positions. Maybe removing that key (export it first….) may convince the VBE to reconsider its moves ?

    Viewing 0 reply threads
    Reply To: Form placement in VBA editor (WinNT 4.0. SP6, O2k / VB6.0)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: