|
-
Aug 8th, 2000, 01:38 PM
#1
Thread Starter
Hyperactive Member
Now that I have your attention, I have a few questions(sorry for the dirty trick but they are not easy, and I am hoping for a prompt reply):
Starting from the easiest:
1) If you use .open(folder) with a shell and a selection is made within the browser, how do you find what that selection is?
2) In Windows NT I am trying to change the show all files button within the options menu to hide files of this extension. How can I do this?
3) I also want to add a file extension to that list at run time. Is that possible?
4) Is there anyway to execute code whenever the CDROM is accessed?
Thank you for your time,
Joe
P.S. If something is unclear please tell me so I may rephrase it
-
Aug 8th, 2000, 03:11 PM
#2
transcendental analytic
For the third qwestion
You could use my registry module (it's on my homepage) with the following code. You just have to change all the Bla's here with your own extension, also you can change the extension name and the associated file type. Content type is shown when you download something with your browser and default icon is the file path and the icon index separated with comma.
Code:
Declare Function SHChangeNotify Lib "shell32.dll" (ByVal wEventID As Long, ByVal uFlags As Long, ByVal dwItem1 As String, ByVal dwItem2 As String) As Long
Property Let Associate_BLA(newvalue As Boolean)
If newvalue Then
RegVal("root\.bla\") = "blaFile"
RegVal("root\.bla\Content Type") = "BLA file"
RegVal("root\blaFile\") = "BLA "
RegVal("root\blaFile\DefaultIcon") = App.path & "\" & App.EXEName & ".exe,1"
RegVal("root\blaFile\Shell\Open\Command\") = App.path & "\" & App.EXEName & ".exe %1"
Else
DeleteKey "root\.bla"
DeleteKey "root\blaFile"
End If
SHChangeNotify &H8000000, 0, vbNullString, vbNullString
End Property
Property Get Associate_BLA() As Boolean
Associate_BLA = RegVal("root\.bla\") = "blaFile"
End Property
As this is a boolean property you can just switch it on and off when you like or return if it is set or not
Code:
if Associate_BLA=false then Associate_BLA=true
[Edited by kedaman on 08-08-2000 at 04:13 PM]
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 8th, 2000, 03:41 PM
#3
Thread Starter
Hyperactive Member
Thank you very much for the code but....
The amount of code makes it impractical to do what I wanted it to. Perhaps do you know the answer to the first question? Thank you very much.
Joe
-
Aug 8th, 2000, 05:00 PM
#4
transcendental analytic
Hmm, that's probably the easiest way to understand File Associations, if you had a look at any other codes they've posted along the forum you woudn't undestand much of it.
I'm not sure what you meant there with the first qwestion, can you refrase it? more details?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 9th, 2000, 07:43 AM
#5
Thread Starter
Hyperactive Member
In refrence to your first reply, the method I was thinking of utilizing required much more code to be bundled with the segment you gave me. I decided a different approach would be more practical.
Allow me to explain the first question. I am creating a new shell called ashell. Then I am using ashell.open(bla) to open a specific folder. When that window is launched I want to know if the user selects a file by single clicking or using the keyboard. I also want to track if they open any of the files in the particular folder. Are you aware of any way to do either?
Thank you very much for your time and the haste of your replies,
Joe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|