Drag and drop files into your VB6 virtualized application

Drag and drop files into your VB6 virtualized application

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:

Screenshot example

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.

Screenshot example

5. Implement the VirtualUI’s “onDragFile” event.

Screenshot example

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].

Comments (5)

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]
🙂

Leave a comment

Cookie Preferences
Privacy and Cookie Policies
Cybele Software implements specific policies to enhance your browsing experience while respecting your privacy. When you visit Cybele Software's website, the site uses cookies to personalize your experience. These small files remember your preferences and the details of your repeated visits, aligning closely with Cybele's Privacy Policy.

You have complete control over the cookies used during your visit:
- Accepting All Cookies: You can agree to the use of all cookies by clicking “Accept All.” This provides a smoother, more integrated experience.
- Customizing Cookie Settings: If you prefer to manage your preferences, you can click on "Cookie Settings." This allows you to give controlled consent by selecting which types of cookies you agree to activate.
- Opting Out: You also have the option to opt-out entirely from non-essential cookies. It's important to note that choosing this option might impact your experience on the website, potentially limiting certain functionalities and features.
These features ensure that you can tailor your browsing according to your personal preferences and privacy concerns.