Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / May 2007

Tip: Looking for answers? Try searching our database.

Dbl-Click to load a file when app is already running

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elmo Watson - 27 May 2007 03:22 GMT
I'm using the GetCommandLineArgs (VB.Net 2005) in my form load event
GetOutsideFile(Environment.GetCommandLineArgs())
so that, when I have files associated with my app, and double click on a
file, they will run the app and load the file in it.

However, when the app is already loaded, double-clicking on a file will not
load it, since the application is already running, and the only reference is
in the frmMain's load subroutine.

What do I need to do inside my app, to make this possible?
Peter Ritchie [C# MVP] - 27 May 2007 15:58 GMT
How are you associating files to your application?
Signature

Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#

> I'm using the GetCommandLineArgs (VB.Net 2005) in my form load event
> GetOutsideFile(Environment.GetCommandLineArgs())
[quoted text clipped - 6 lines]
>
> What do I need to do inside my app, to make this possible?
Elmo Watson - 28 May 2007 19:25 GMT
I'm associating them through my Installer program - - that's not the
problem - I have that part done.

The part that I'm having problem with is that, once associated -
dobule-clicking one file will open the program and load the file - no
problem
BUT - when double clicking on the file, once the program is already loaded
and in memory, WILL NOT load the newly double-clicked file into the program

> How are you associating files to your application?
>
[quoted text clipped - 10 lines]
>>
>> What do I need to do inside my app, to make this possible?
G Himangi - 30 May 2007 04:31 GMT
I am not sure but I think Windows attempts to communicate with your open app
instance via DDE when a second file is being opened. You will have to handle
DDE messages send to your main app window.

---------
- G Himangi,   Sky Software       http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------

> I'm associating them through my Installer program - - that's not the
> problem - I have that part done.
[quoted text clipped - 20 lines]
>>>
>>> What do I need to do inside my app, to make this possible?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.