Forum Discussion

sanjay0288's avatar
sanjay0288
Frequent Contributor
8 years ago

Working with VB Objects

Hi,

  I am working on an application which is developed in VB and flex. There are grid controls on which I need to fetch the data and perform some operation on the control but using the object spy I am not able to find any methods to achieve the desired operation. Can anyone from Smart Bear team suggest that VB controls are supported by Test Complete. Also shed some light on working with these type of controls. Please find attached snapshot of the object spy in advanced view mode.

  • Is that advanced view on the properties? Not many there ...

     

    Looking at page three of the methods available, I think you have access to the grid. But I think you need to work out how to interrogate and/or interact with it.

     

    I've never used a VB based grid. But have used Delphi and .NET ones. And they are all different. Some are easier to work with than others. But your available methods show and "ActiveCell" method. And that is referenced here:

     

    https://msdn.microsoft.com/en-us/library/yc4fsbf5(v=vs.110).aspx

     

    (DataGridView is the replacement for DataGrid. Many of the properties, including CurrentCell are common between the two)

     

    The full docs for the old style DataGrid can be found here:

     

    https://msdn.microsoft.com/en-us/library/system.windows.forms.datagrid(v=vs.110).aspx

     

    ... I suspect you're just going to have to familiarise yourself with the control and how it works. From what I can see, they are bound to a DataSource object as well, so you may have to poking about in that too. It depends what you're trying to do, which you don't say specifically in your initial post.

    • sanjay0288's avatar
      sanjay0288
      Frequent Contributor

      Hi baxatob,

        Thanks for the information.I have a grid control which is being recognized by testcomplete but the problem what I am facing is I need to get the contents inside that grid. For example need to get 2nd row 3rd column data. And If  data is present I need to perform click operation on that item so that a pop up comes up.  The problem here is I am not able to achieve this.

       

      Also I doubt this is not a standard VB Grid if I spy on the control the wndclass property shows as "Afx:6f90000:8" Can you please shed some light on this type of control  as I am stuck in a very bad situation

       

      Regards,

      Sanjay

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        Is that advanced view on the properties? Not many there ...

         

        Looking at page three of the methods available, I think you have access to the grid. But I think you need to work out how to interrogate and/or interact with it.

         

        I've never used a VB based grid. But have used Delphi and .NET ones. And they are all different. Some are easier to work with than others. But your available methods show and "ActiveCell" method. And that is referenced here:

         

        https://msdn.microsoft.com/en-us/library/yc4fsbf5(v=vs.110).aspx

         

        (DataGridView is the replacement for DataGrid. Many of the properties, including CurrentCell are common between the two)

         

        The full docs for the old style DataGrid can be found here:

         

        https://msdn.microsoft.com/en-us/library/system.windows.forms.datagrid(v=vs.110).aspx

         

        ... I suspect you're just going to have to familiarise yourself with the control and how it works. From what I can see, they are bound to a DataSource object as well, so you may have to poking about in that too. It depends what you're trying to do, which you don't say specifically in your initial post.