We keep receiving comments and questions from VB6 developers about the features that Thinfinity VirtualUI has to enable desktop applications to interact with users worldwide without client setups of any kind. We want to thank you all for that. With your questions, we’ll continue to publish articles that help to engage the users and to improve their experience.
Today we welcome the “Drag and drop” event, which is a very commonly used feature in any modern desktop application and in web applications as well. Many times, this event is combined with the Thinfinity VirtualUI’s upload method. Will see that too.
Since you will publish your VB6 desktop application on the web, you have to take into account that the end-user will interact with it through a web browser, so if you coded the classic “Drag and Drop” event on your VB6 application, the user will get the file rendered by the browser doing what he is used to doing.
In the following example, we’ll learn how to adapt a VB6 application. We’ll get the same application that you can download from this link.
What to do:
1. Download Thinfinity VirtualUI from here.
2. Install it and start your trial.
3. Open your VB6 project ante declare the following first:
This way we declare that VirtualUI will use its events. Besides, we will assign the end-user file’s source folder to the “Filename” variable.
4. Instantiate a VirtualUI object and make it call its start method.
5. Implement the VirtualUI’s “onDragFile” event.
This event will receive a file from the user’s machine and needs to realize somehow that the file is being dropped. Note that “Action” is for “Thinfinity.DragAction”. As you can see, we code that in the second line (“If Action = Drop Then”) to trigger what’s about to happen in the third and the fourth line.
When the file is dropped, the third line will make the app show the server machine’s path in the box where the file is being uploaded. Then the VirtualUI’s upload method will do the rest, passing as a parameter the “Filename” which is the user machine’s source for the file being uploaded.
Should you have any questions, contact us at [email protected].
Step #5 is unreadable
Hello Steve,
Thank you for noticing that and contact us with your feedback. The issue will be solved later today with the site new update.
If you need any support with VB6 regarding our products, please do not hesitate to ask our IT experts by writing at [email protected]
Best regards,
Nick
Is this possible with Delphi?
Currently we have in our software a feature that allows dragging an email from Outlook into the app, can this be done with the virtualUi-zed app?
Can you explain also drag&drop and upload of multiple selected files?
Hi Enrico, I see you’re already working with Finn.
If you need any other assistance you may write to me to [email protected]
🙂