473,406 Members | 2,343 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,406 software developers and data experts.

Getting selected files from windows explorer

Hi All,

Based on the sample kbbar.net applicaation i have created a tool bar
for windows explorer. Now i have to enable and disable few buttons
based the user slects file in the explorer. For to sync this i have
set-up the connection point as in the following function. I could
able
to get the events only when the user double cliks a folder in the
explorer treview or list view. If the user slect an item by single
click no notification is recieved from Explorer. Please help me in
this regard.

private void ManageConnection(ConnectType eConnectType)
{
if (Explorer == null)
return;

// Explorer is nothing but an instance of WebBrowserClass
UCOMIConnectionPointContainer cpc = Explorer as
UCOMIConnectionPointContainer ;
if(cpc != null)
{
UCOMIConnectionPoint spConnectionPoint;
Guid guid = typeof(SHDocVw.DWebBrowserEvents2).GUID;
cpc.FindConnectionPoint(ref guid, out spConnectionPoint);
if (spConnectionPoint == null)
throw new ArgumentException("COM object does not
support specified source interface");

if (eConnectType == ConnectType.Advise)
{
spConnectionPoint.Advise(this, out iCookie);
}
else
{
spConnectionPoint.Unadvise(iCookie);
}
}
else
{
throw new ArgumentException("COM object does not support
events");
}

}

Alos I have few questions.

1. The connection point works both in the IE and Windows Explorer.
How
can i restrict to only Windows explorer.
2. Whether webbrowser class is equivalent to Windows explorer? or
there is any other class for windows explorer.

Thanks for your patientce and help.

Tx,
Shafeeque O.K.
Dec 25 '07 #1
0 1926

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

Similar topics

19
by: harry | last post by:
Just want to traverse a listbox's (multi select) items & for those that are selected extract the displayed text - something like below - function getSelectedDescrs(lst) { var buf; var maxItems...
9
by: Brian Henry | last post by:
How do you go about getting the "type" of a file from explorer? Say if I want to know what the type for the extension .DOC was, which is "Micrsoft Word Document" in explorer, how would I do this? I...
0
by: VZUmar | last post by:
Hi I am using IWebBrowser2 in my VC++ windows Application, My application uses browser control to navigate through different web pages. IE of machine has Security setting "Empty Temporary Internet...
2
by: MSK | last post by:
Hi, Continued to my earlier post regaring "Breakpoints are not getting hit" , I have comeup with more input this time.. Kindly give me some idea. I am a newbie to .NET, recently I installed...
1
by: iwdu15 | last post by:
hi, how can i get the icon associated with a certain file type? thanks -- -iwdu15
0
by: Johnny Jörgensen | last post by:
In an add-in I'm doing, I need to get the full filename of the file(s) selected by the Visual Studio 2005 user at a given time. Using: Dim win As Window = _applicationObject.ActiveWindow ...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
I am using a web browser control in my program for bringing up files/folders in Windows Explorer on a given user's workstatino -- searching special files/folders on the company server. This works...
4
by: Karl | last post by:
Hi all, I want to write an application that is launched from the context menu in Windows Explorer/Computer. That is to say, when I am browsing around my hard drive and get to any location I...
3
by: rossrobertson | last post by:
I was wondering if someone would be able to provide some assistance. I am trying to develop an application where the user selects a number of files by right clicking them in windows explorer and...
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
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
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.