473,416 Members | 1,542 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,416 software developers and data experts.

DragDrop event during application startup.

Hello,
I'm trying to allow users to drag a file (in this case a crystal report .rpt
file) onto my application's icon and have that drop event open my application
and open the report in the application.

Currently I can use the drop event in the reportviewer to be able to drag
the .rpt into my application while it's open.... that works great. But I
can't get it to work when the application is not open. Basically I can't find
the event that fires to allow me to accept dropped files upon application
startup.

For an idea of the action that I am talking about try dragging a .txt file
onto a notepad icon. Notepad is launched and the text file is opened in the
notepad window.
Nov 23 '05 #1
3 1456
Dpage wrote:
Hello,
I'm trying to allow users to drag a file (in this case a crystal report .rpt
file) onto my application's icon and have that drop event open my application
and open the report in the application.

Currently I can use the drop event in the reportviewer to be able to drag
the .rpt into my application while it's open.... that works great. But I
can't get it to work when the application is not open. Basically I can't find
the event that fires to allow me to accept dropped files upon application
startup.

For an idea of the action that I am talking about try dragging a .txt file
onto a notepad icon. Notepad is launched and the text file is opened in the
notepad window.


When that happens notepad is launched like: "notepad.exe c:\file.txt"

So your application has to be able to accept a commandline parameter of
a rpt file at startup. It's not a dragdrop event of any kind at this point.

Does that clear it up for you?
Chris
Nov 23 '05 #2
Yes, that is so obvious I'm embarrassed i didn't think of that... I spent all
morning doing dragdrop event handling I didn't think of the command line
coming into it at all. :)

So how do I go about reading command line arguments from my winform? Never
done that before...

"Chris" wrote:
Dpage wrote:
Hello,
I'm trying to allow users to drag a file (in this case a crystal report .rpt
file) onto my application's icon and have that drop event open my application
and open the report in the application.

Currently I can use the drop event in the reportviewer to be able to drag
the .rpt into my application while it's open.... that works great. But I
can't get it to work when the application is not open. Basically I can't find
the event that fires to allow me to accept dropped files upon application
startup.

For an idea of the action that I am talking about try dragging a .txt file
onto a notepad icon. Notepad is launched and the text file is opened in the
notepad window.


When that happens notepad is launched like: "notepad.exe c:\file.txt"

So your application has to be able to accept a commandline parameter of
a rpt file at startup. It's not a dragdrop event of any kind at this point.

Does that clear it up for you?
Chris

Nov 23 '05 #3
Dpage wrote:
Yes, that is so obvious I'm embarrassed i didn't think of that... I spent all
morning doing dragdrop event handling I didn't think of the command line
coming into it at all. :)

So how do I go about reading command line arguments from my winform? Never
done that before...

"Chris" wrote:

Dpage wrote:
Hello,
I'm trying to allow users to drag a file (in this case a crystal report .rpt
file) onto my application's icon and have that drop event open my application
and open the report in the application.

Currently I can use the drop event in the reportviewer to be able to drag
the .rpt into my application while it's open.... that works great. But I
can't get it to work when the application is not open. Basically I can't find
the event that fires to allow me to accept dropped files upon application
startup.

For an idea of the action that I am talking about try dragging a .txt file
onto a notepad icon. Notepad is launched and the text file is opened in the
notepad window.


When that happens notepad is launched like: "notepad.exe c:\file.txt"

So your application has to be able to accept a commandline parameter of
a rpt file at startup. It's not a dragdrop event of any kind at this point.

Does that clear it up for you?
Chris


http://www.vb-helper.com/howto_net_l...arguments.html
Nov 23 '05 #4

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

Similar topics

7
by: Kate | last post by:
Hi: I have a form with a picture box and some command buttons to make certain shapes appear in the picture box. The shapes are drawn on blank UserControls added like this: 'at top of form...
10
by: KS | last post by:
I have a Button I want to pull to a Label. I want the Button visualy to move when I pull it. When I drop the button on the Label I want to test some data coming with the Button - f.ex is the...
1
by: KS | last post by:
In want to visualy drag a Button to a Label and when I depress the mousebutton on top of the label I want to show some dato from the Button in a MsgBox - that's my primary goal. I have made a...
4
by: Owe Armandt | last post by:
When I play with DragDrop of files to a form I get two DragEnter events before the DragDrop event, why is this?? Owe
0
by: Flack | last post by:
Hello, Is it possible to find out how many methods are listening to a certain event? For example, if a number of methods subscribed to a controls DragDrop event using +=, can I find out how many...
3
by: Jim R | last post by:
I am trying to use Dragdrop event on a control in a VB.NET 2005 app. The app is getting the DragEnter event, but is never getting a DragDrop event. My control has its "AllowDrop" property set to...
8
by: ApexData | last post by:
I'm using the OnKeyDown event in hopes of capturing a key being held down during the initial startup of my application. Does anyone know, at what point the OnKeyDown event fires? I checked to...
1
by: Jeff Williams | last post by:
With a DragDrop event is there a way to determine which control I have droped files onto. ie I have 5 picture boxes on the form. I want to use one dragdrop event and when the drop occurs get...
10
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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...

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.