Drag and drop files into your VB6 virtualized application

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

Have any questions?

Book a call today to learn more about how Thinfinity® can help your organization. We are always available to guide you and provide the best solution based on your specific needs.

5 Comments

Steve Troxell
Reply
February 18, 2022 at 10:21 pm

Step #5 is unreadable

    Nick Ceraso
    Reply
    February 21, 2022 at 5:24 pm

    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

Javierus
Reply
November 29, 2020 at 11:09 pm

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?

Enrico Raviglione
Reply
October 28, 2020 at 11:09 am

Can you explain also drag&drop and upload of multiple selected files?

Add Comment

Thinfinity_logo

Get a Demo

Experience how Universal ZTNA with Thinfinity® integrates with VDI and DaaS for unmatched security and flexibility.

Blogs you might be interested in

<span>Application Modernization</span>, <span>Application Virtualization</span>, <span>Developer</span>, <span>Drag and Drop</span>, <span>HTML5 Conversion</span>, <span>Independent software Vendor (ISV)</span>, <span>SDK</span>, <span>Secure Application Delivery</span>, <span>Thinfinity VirtualUI</span>, <span>User Experience</span>, <span>VB6</span>