The goal is to bring to Python Virtual Forms Framework by creating a GitHub repository with all the good things that Virtual Forms Framework already provide us in VBA, C#, VB.NET.

Excel Database with Virtual Forms

But before we can even start, there are some challenges already.

So if you are willing to help to build this great project, boost your social proof by participating in this project, please take a look at this first challenge and if you can, please try to solve it.

Davor

Challenge:

We have a custom COM component (Virtual Forms Control) that fires events and that exposes objects.

(((downloads are at the bottom of the article)))

This code opens this COM component and it connects to the database and shows the form.

But, when I scroll and click through the grid it doesn’t catch the events. It should catch the EditChange event that is fired from this COM component.

Here is the CODE1:


With this code (CODE1) we can communicate with the textbox that is on this COM component with this line of code:


But as I have said, this code (CODE1) doesn’t catch the events.

#######################################

And this code (CODE2) catches the events, but I can’t figure out how to communicate with the textboxes and how to loop PumpEvents so that we can use in practically indefinitely and not only for a number of seconds.
Here is the CODE2:


If you want to see it in action, here are 2 videos:

Here are 2 short videos on this control in action in VBA & my first attempts in Python:

https://youtu.be/W2pvsOY1qF4

https://youtu.be/U8t_O2IOJ0w

 

Here is the COM component (VFSetupBeta2.0.0.31.exe):
https://www.virtual-forms.com/sharing/Vi…0.0.31.zip

and the VFFilePython.vf:
https://www.virtual-forms.com/sharing/VFFilePython.vf

Do you have any possible ideas for a solution?

Please share it in the comment.

Thanks,

Davor

P.S.

Within the events, we should have the possibility to:

  • reference the COM object textboxes like in this code:  vf1.TextBox("VF2", "[customerid]")[0].Text = "888"
  • some events can return values that are passed in arguments back to the COM component, like  EditBeforeSave if we return

    then the COM control will discard saving the record to the database.