Results 1 to 21 of 21

Thread: "object doesn't support this property or method" on START within SDK

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    "object doesn't support this property or method" on START within SDK

    When I launch an app within the SDK, I get an "object doesn't support this property or method", there is no reference to what object is causing this. When I press OK, it continues without crashing. I have tried to block where this is occurring. The message comes after Form Load, after Form Activate and before Form Resize. The form is not visible when the message comes up. I can not trap the error using On Error within any of those methods. I get the same message if I X out of the app. Have not tried compiling the app yet. Anyone run into this?

    The error message does not have a Debug button, just OK and Help. Help says "Unable to display help"

  2. #2
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    Hi CAVUCO,

    Welcome to VBForums.

    By SDK, I assume you're talking about the VB6 IDE (integrated development environment). That is, you're just clicking the "Run" button (or possibly tapping F5).

    To my eyes, it sounds like a funky installation of the VB6 IDE. Is it happening on a new project? Is it happening on pretty much all projects you try to execute?

    What version of Windows are you using?

    If it's a specific project, is it small enough that you could show us the code in the start-up form? (Or do you start with a Sub Main?)

    Good Luck,
    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  3. #3
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by CAVUCO View Post
    When I launch an app within the SDK, I get an "object doesn't support this property or method", there is no reference to what object is causing this. When I press OK, it continues without crashing. I have tried to block where this is occurring. The message comes after Form Load, after Form Activate and before Form Resize. The form is not visible when the message comes up. I can not trap the error using On Error within any of those methods. I get the same message if I X out of the app. Have not tried compiling the app yet. Anyone run into this?

    The error message does not have a Debug button, just OK and Help. Help says "Unable to display help"
    And did you try pressing the Debug button?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by Eduardo- View Post
    And did you try pressing the Debug button?
    No Debug button

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    Hi Elroy,

    Yes, from the IDE and pressing the RUN button. It doesn't happen with other projects I have installed. It did not initially happen when I ran the project, when it started I removed the last thing that I added and it still didn't go away.

    Using Windows 10 Home

    I do start from the Main form

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    CAVUCO,

    The only thing I can think of that would cause this is calling some dependency (DLL, etc.) that's subsequently calling some other dependency (or possibly another object within itself). And, that second call is into a property or method that doesn't exist. And, the reason you're not getting the Debug button is because you're in the compiled/binary code of the first dependency.

    That also possibly explains your statement, "When I press OK, it continues without crashing" and why you can't trap the error.

    If it were me, I'd start "stepping through" my VB6 project's code (F8, shift-F8, etc) to figure out where the first dependency's call is being made from your VB6 code.

    Good Luck.

    Also, be sure to let us know what it was if/when you get it figured out.

    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,904

    Re: "object doesn't support this property or method" on START within SDK

    Go to the menu bar, click Project -> References
    Check if there are any missing references.

    If nothing is missing then start the project from within the IDE using F8 (Debug, instead of Run)
    Press F8 every time a line is highlighted

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by Arnoutdv View Post
    Go to the menu bar, click Project -> References
    Check if there are any missing references.

    If nothing is missing then start the project from within the IDE using F8 (Debug, instead of Run)
    Press F8 every time a line is highlighted
    I'm familiar with the F8 routine but how does this tell me when what dependencies are called?

    The message comes up as soon as the Exit Sub (I have an errHandler in the function that never processes). When Exit Sub line processed within Form Load I get the error message.

    I even removed all code from the Form Load and it still gives me the message. I also get the same error when I close the app using the X

  9. #9
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by CAVUCO View Post
    When Exit Sub line processed within Form Load I get the error message.
    Hi CAVUCO,

    Okay, that possibly does help. What it tells me is, you're possibly instantiating some objects (possibly locally in that Form_Load event) and using those object for who-knows-what. And you're possibly not un-instantiating them before you hit your Exit Sub (or End Sub).

    One thing you might try is ... identify all the objects declared locally in your Form_Load event and un-instantiate each of them just before any Exit Sub (or End Sub).

    Also, this is the one (and only) place where I might recommend a GoTo statement. Rather than using Exit Sub, take out all those Exit Sub statements, and replace them with a GoTo that jumps to a label near the End Sub. Just after that label, do all your un-instantiations.

    Just to be clear, here's an un-instantiation example:

    Code:
    
    Option Explicit
    
    Private Sub Form_Load()
        Dim c As Collection             ' Creates variable for Collection object.
    
        Set c = New Collection          ' Instantiates our c Collection object.
    
        ' ... do stuff.
    
        If True Then
            GoTo GetOut                 ' Example of using GoTo (only place I'd EVER recommend it).
        End If
    
        ' ... maybe do more stuff.
    
    
        ' Fall into typical exit.
    GetOut:
        Set c = Nothing                 ' Un-instantiate our c Collection object variable.
    End Sub
    
    
    Now, rather than seeing your error on Exit Sub (or End Sub), you might see it when you perform your un-instantiation. This should tell you the precise object (and its associated dependency) that's causing your problems.

    Good Luck,
    Elroy

    EDIT1: Just as a further FYI, when you un-instantiate objects, you potentially execute all kinds of code that may be in a Terminate event of that object. I'm guessing (somewhat wildly) that that may be where your problem is. Also, just to further explain, any COM objects that are instantiated locally to any VB6 procedure are implicitly un-instantiated when you exit that procedure. And (I'm again guessing) that's why your error is happening on the Exit Sub (or End Sub) line.

    EDIT2: Also, you've really got us shooting in the dark here. How about posting your Form_Load code?

    EDIT3: And if you get it going, please let us know what/how you fixed it.
    Last edited by Elroy; Mar 21st, 2018 at 11:01 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  10. #10
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by CAVUCO View Post
    I even removed all code from the Form Load and it still gives me the message. I also get the same error when I close the app using the X
    I just re-read your post and saw that.

    That's yet another monkey-wrench in the works. I've still got to believe that the error is arising from the un-instantiation of some object that's being created out of some dependency.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  11. #11
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,440

    Re: "object doesn't support this property or method" on START within SDK

    Never mind objects created during form-load:
    what about third-party-ocx/user-controls?
    he uses version 1 of an OCX, which has a property he's using.
    in the meantime that ocx got updated to version 2, which doesn't have that property (anymore)

    agree with elroy: without code it's gazing into a crystal ball.....
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  12. #12
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by CAVUCO View Post
    No Debug button
    Sorry, I didn't read well.

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    I created a new blank form and copied all the objects (and underlying code) over to the new form. Then created the same error, so I started, I started removing (deleting) the objects, one by one and found that I had a bad control. Strange since when I created it, I copied and pasted from a control that is working. So I recreated the control and it's working without error now. Thank yo all for your help.

    Really quick, I noticed that when I select multiple controls (by holding CTRL and clicking on the controls ) when I select the second control, the select tabs (little tags on the control for resizing etc) disappears off all the controls. Used to be that all the controls selected would be "tagged" or when I dragged a selection rectangle around multiple controls, you got a good idea of what controls are selected. I'm not getting that. And when I move a group of selected controls, the ghost image of the controls does not appear while I drag them. Is there a setting for that?

  14. #14
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    Hi CAVUCO,

    I'm guessing that you're on Windows 10. Several of us have looked into those little "handles", and they just seem to be gone with Windows 10. You'll find that they sometimes accumulate on your Win10 background (as shown here), and don't go away until you've exited that copy of the VB6 IDE. I've never seen any harm done by any of this.

    I've got a little add-in app where I re-created them, but I've gotten to where I don't even use that. I've managed to get used to not having them. For me (and I think others as well), it's a small price to pay for continuing forward with the VB6 IDE on the latest versions of Windows.

    Also, since you do appear to be using Windows 10, it'd probably be advisable for you to learn about shims. These are the things that are placed between Windows and some program (in this case, the actual VB6 IDE). You can set "groups of shims" by using the Compatibility Modes under properties of an EXE. However, by using these over-reaching Compatibility Modes, you also introduce other problems. It's best to bite the bullet and learn about shims, and use as few as you possibly need to.

    There are a few threads here that discuss all of this.

    Here's a fairly good post by me that discusses them.
    And dilettante has also discussed them in detail here.

    If you never mess with any of the DPI-aware stuff and manifest files, wisekat boiled it down to the essentials here.

    Good Luck,
    Elroy
    Last edited by Elroy; Mar 22nd, 2018 at 02:04 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  15. #15

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by Elroy View Post
    Hi CAVUCO,

    If you never mess with any of the DPI-aware stuff and manifest files, wisekat boiled it down to the essentials here.

    Good Luck,
    Elroy
    Do I need to install Compatibility Manager before running this zip file? Where is the best place to get that?

  16. #16
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    Yes, and this post tells you how to get it, and some pointers on getting it installed.

    Good Luck,
    Elroy
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  17. #17

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by Elroy View Post
    Yes, and this post tells you how to get it, and some pointers on getting it installed.

    Good Luck,
    Elroy
    Right, that is what was a little confusing because it seemed the Comaptibility manager was needed to do Steps 1-4.

    1) After it's running, create a new shim database (SDB file).
    2) Create a new application with shims in this database.
    3) Add the shims you need.
    4) Save the new shim database (I saved mine in my VB6.EXE folder, and named it VB6_IDE.SDB).
    5) "Install" the new database (this is actually what "sets" the shims) (right-click, install).


    If I download WiseKats zip file all f that is already done, correct? Just need to do Step 5, but I guess that step needs the Compatibility Manager also

  18. #18
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    @CAVUCO: Yes (to both of those questions).
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  19. #19
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: "object doesn't support this property or method" on START within SDK

    I'm pretty sure that sdbinst.exe is part of Windows. You should not need the Application Compatibility Toolkit as long as you have an .SDB that you want to install.

    See: Using the Sdbinst.exe Command-Line Tool

    Sadly, that isn't really complete, so see:

    Code:
    C:\WINDOWS\system32>sdbinst -?
    Usage: sdbinst [-?] [-q] [-u] [-g] [-p] [-n[:WIN32|WIN64]] myfile.sdb | {guid} | "name"
    
        -? - print this help text.
        -p - Allow SDBs containing patches.
        -q - Quiet mode: prompts are auto-accepted.
        -u - Uninstall.
        -g {guid} - GUID of file (uninstall only).
        -n "name" - Internal name of file (uninstall only).
    Last edited by dilettante; Mar 29th, 2018 at 10:33 AM.

  20. #20
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,936

    Re: "object doesn't support this property or method" on START within SDK

    CAVUCO, well there ya go.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  21. #21

    Thread Starter
    Junior Member
    Join Date
    Mar 2018
    Posts
    16

    Re: "object doesn't support this property or method" on START within SDK

    Quote Originally Posted by Elroy View Post
    CAVUCO, well there ya go.
    Awesome guys, Thank you so much. Have spent the last few years in Objective C doing ipad stuff. Nice to be back.

Posting Permissions

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



Click Here to Expand Forum to Full Width