473,473 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pick file with mouseclick on desktop and display name in textbox

1 New Member
I want to do the same as this but instead of drag and drop, I want to do it with left mouse_click

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  2.     Me.AllowDrop = True
  3. End Sub
  4.  
  5. Private Sub Form1_DragDrop(sender As System.Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
  6.     Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
  7.     For Each path In files
  8.         MsgBox(path)
  9.     Next
  10. End Sub
  11.  
  12. Private Sub Form1_DragEnter(sender As System.Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
  13.     If e.Data.GetDataPresent(DataFormats.FileDrop) Then
  14.         e.Effect = DragDropEffects.Copy
  15.     End If
  16. End Sub
Mar 17 '13 #1
0 1059

Sign in to post your reply or Sign up for a free account.

Similar topics

38
by: MLH | last post by:
I have 2 global constants declared in the same global module: Global Const MY_VERSION$ = "1.04" Global Const ProjectName$ = "MyProj" I have 2 global procedures designed to return the value of...
9
by: Sandy | last post by:
can mfc application, send text data to opened notepad file in desktop?(live transfer of data) . can anybody help
2
by: | last post by:
I have just about finished my project and need to change the name of the ..exe file created by the Windows Installer to the real name. I was developing naming the solution and project MyProject,...
1
by: James | last post by:
Is it possible that I can have a c# window service run under different display name?
1
by: volunteer | last post by:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="filename.xsl"?> <markers date="20060523"> 04:21:50 PM <marker sn="1" rank="6" name="john" /> <marker sn="2" rank="5"...
11
by: mike_solomon | last post by:
Hi I have a link on a website that if you click opens up outlook <button onClick="location.href='mailto:a@b.com?subject=test subject'" > Select</button> Works fine But I want to include...
3
by: crazystone82 | last post by:
Hi friends, i need to drag a file from desktop and drop into web page.actually i had did a JS for dragging the images around the web page,but i dont know how to drag the file and drop it into...
0
by: not_a_commie | last post by:
I have a base class with a collection of objects. I want to change the display name of that in my descendant classes. I tried this line: ...
5
by: Yas | last post by:
Hello, I have the following table with 4 columns.... firstname, lastname1, lastname2, EMAIL Table has user names and email, I would like to generate a 5th column called DisplayName. The email...
1
by: =?Utf-8?B?VHJpc2hh?= | last post by:
How do you change your display name in windows mail? -- Trisha
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.