Drag And Drop Current Time into a textbook from a lable

Posted on 2014-07-11
Last Modified: 2014-11-03
I have a label that is displaying the current time on a windows form, I also have several textboxes that require the user to enter current time, they have the date/time format. I was wondering if it is possible to use drag and drop to put the time from the label into the textboxes

I am using Visual Studio 2013 Professional and this is a application
Question by:mickeyshelley1
    1 Comment

    Accepted Solution

    Worked it out....
        Private Sub TxtReceived_DragDrop(sender As Object, e As DragEventArgs) Handles TxtReceived.DragDrop
            TxtReceived.Text = e.Data.GetData(DataFormats.Text).ToString
        End Sub
        Private Sub TxtReceived_DragEnter(sender As Object, e As DragEventArgs) Handles TxtReceived.DragEnter
            e.Effect = DragDropEffects.Copy
        End Sub
        Private Sub lblClock_MouseDown(sender As Object, e As MouseEventArgs) Handles lblClock.MouseDown
            If e.Button = MouseButtons.Left Then
                lblClock.DoDragDrop(lblClock.Text, DragDropEffects.Copy Or DragDropEffects.Move)
            End If

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now