473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Open file from drag over application Icon

Hi all,

I want to fire the drag events when someone drags a file over the
application's icon. This means the application has not opened yet.

Scenario would be:
1. user selects file they want to open through the app
2. user drags file onto the app's icon (desktop) or from "Send To" popup
3. app opens upon "drop"
4. app recognized the file that was dropped on it and opens the file from
the application

If this is not clear, just let me know.

Thanks!

Mar 15 '07 #1
5 5687
VJ
you are trying to do darg drop over a desktop icon??

VJ

"Rob" <Ro*@discussions.microsoft.comwrote in message
news:DA**********************************@microsof t.com...
Hi all,

I want to fire the drag events when someone drags a file over the
application's icon. This means the application has not opened yet.

Scenario would be:
1. user selects file they want to open through the app
2. user drags file onto the app's icon (desktop) or from "Send To" popup
3. app opens upon "drop"
4. app recognized the file that was dropped on it and opens the file from
the application

If this is not clear, just let me know.

Thanks!

Mar 15 '07 #2
Yes.

Just like you can do with notpad or word.

"VJ" wrote:
you are trying to do darg drop over a desktop icon??

VJ

"Rob" <Ro*@discussions.microsoft.comwrote in message
news:DA**********************************@microsof t.com...
Hi all,

I want to fire the drag events when someone drags a file over the
application's icon. This means the application has not opened yet.

Scenario would be:
1. user selects file they want to open through the app
2. user drags file onto the app's icon (desktop) or from "Send To" popup
3. app opens upon "drop"
4. app recognized the file that was dropped on it and opens the file from
the application

If this is not clear, just let me know.

Thanks!


Mar 15 '07 #3
VJ
You have to make sure that your application is the default application for
files with whatever the extension you support. So if for notepad .txt is the
extension. This can be done when installing the application. the setpup and
deployment or InstallShield packaging gives you the option to register your
app as the default app for a extension. If you are looking to do it from
C-Sharp code, I am noot sure, but would be possible..

VJ

"Rob" <Ro*@discussions.microsoft.comwrote in message
news:8F**********************************@microsof t.com...
Yes.

Just like you can do with notpad or word.

"VJ" wrote:
>you are trying to do darg drop over a desktop icon??

VJ

"Rob" <Ro*@discussions.microsoft.comwrote in message
news:DA**********************************@microso ft.com...
Hi all,

I want to fire the drag events when someone drags a file over the
application's icon. This means the application has not opened yet.

Scenario would be:
1. user selects file they want to open through the app
2. user drags file onto the app's icon (desktop) or from "Send To"
popup
3. app opens upon "drop"
4. app recognized the file that was dropped on it and opens the file
from
the application

If this is not clear, just let me know.

Thanks!



Mar 15 '07 #4
On 15 mar, 10:21, Rob <R...@discussions.microsoft.comwrote:
Hi all,

I want to fire the drag events when someone drags a file over the
application's icon. This means the application has not opened yet.

Scenario would be:
1. user selects file they want to open through the app
2. user drags file onto the app's icon (desktop) or from "Send To" popup
3. app opens upon "drop"
4. app recognized the file that was dropped on it and opens the file from
the application

If this is not clear, just let me know.

Thanks!

Hi, I think you must put some code on Main method, Use the args
parameter
look this
using System.IO;

class Program
{
static void Main(string[] args)
{
if (Path.GetExtension(args[0])==".jpg")
{
//load the form
}

}

cheers

Mar 15 '07 #5
Thanks! I had to tweek the code you sent to do what I wanted, but great call!
"Horacio Nuñez Hernández" wrote:
On 15 mar, 10:21, Rob <R...@discussions.microsoft.comwrote:
Hi all,

I want to fire the drag events when someone drags a file over the
application's icon. This means the application has not opened yet.

Scenario would be:
1. user selects file they want to open through the app
2. user drags file onto the app's icon (desktop) or from "Send To" popup
3. app opens upon "drop"
4. app recognized the file that was dropped on it and opens the file from
the application

If this is not clear, just let me know.

Thanks!


Hi, I think you must put some code on Main method, Use the args
parameter
look this
using System.IO;

class Program
{
static void Main(string[] args)
{
if (Path.GetExtension(args[0])==".jpg")
{
//load the form
}

}

cheers

Mar 15 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Paul | last post by:
Hi, Does anyone know how I would be able to drag a single file onto my applications icon and have it run some predefined code. What I want is to drop an .mp3 file onto my applications icon...
2
by: scissorhand | last post by:
Is drag and drop feature available in ASP .Net? I am developing a webpage which requires a system administration function. Users in the admin group have to drag user icon to a group icon and assign...
5
by: Java script Dude | last post by:
For those who are missing the feature on how to import into Open Office dBase app from text files and spreadsheets in OOO Base 2.0: A wizard exists to import from spreadsheets only at this time...
2
by: Pete Mitchell | last post by:
I have an application that parses a file and creates a new one based on the contents of the original file. What do I need to do so that a user could drag the source file from Windows Explorer and...
2
by: vanvee | last post by:
Hi I have an application, that when a user double clicks a file (that the application creates), the application opens. When the user right clicks a file and selects "Open With", the program...
0
by: RHSFSS | last post by:
Hi, I have a Drag and Drop registration problem (See http://www.thescripts.com/forum/thread434707.html for similar problem post), can anyone out thereadvise on the best solution? I have a .NET 2.0 ...
3
by: Mark.V.Sullivan | last post by:
I have encountered the same problem another posted about several months ago. Unfortunately, there was no result posted on the old thread. I will let the original message text stand and ask if...
2
by: esrever | last post by:
Hello all, Sorry for the topic title but I couldn't describe it better.. I want to make a console application in win32, which when I click on a specific file ( with it's type associated of...
2
by: bob | last post by:
Hi all, I have a treeview that has drag drop. Works well enough but... If you drag out of bounds of the treeview the nodrop icon comes on. Fair enough. But when I move back inside the treeview...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.