Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




File Associations


question 1


Code:
Private Const HKEY_CLASSES_ROOT = &H80000000

Private Declare Function RegCreateKey Lib _
"advapi32.dll" Alias "RegCreateKeyA" _
(ByVal hKey As Long, ByVal lpSubKey As _
String, phkResult As Long) As Long

Private Declare Function RegCloseKey Lib _
"advapi32.dll" (ByVal hKey As Long) As Long

Private Declare Function RegSetValueEx Lib _
"advapi32.dll" Alias "RegSetValueExA" _
(ByVal hKey As Long, ByVal _
lpValueName As String, ByVal _
Reserved As Long, ByVal dwType _
As Long, lpData As Any, ByVal _
cbData As Long) As Long

Private Const REG_SZ = 1
Code:


Public Function CreateFileAssociation(AppName As String, _
ByVal AppExtension As String, AppCommand As String) As Boolean

'Parameters:
'AppName = Name of Application
'AppExtension: = File Extension

'AppCommand = Command Line for Application
'Example:
'CreateFileAssociation "Notepad", ".txt", "notepad.exe"

Dim bAns As Boolean
Dim sKeyName As String
Dim sExtName As String
AppExtension = Trim(AppExtension)
If Left(AppExtension, 1) <> "." Then Exit Function
sExtName = Mid(AppExtension, 2) & " File"

bAns = WriteStringToRegistry(HKEY_CLASSES_ROOT, _
AppExtension, "", sExtName)

If bAns Then bAns = WriteStringToRegistry(HKEY_CLASSES_ROOT, _
sExtName & "shellopencommand", "", AppCommand)

CreateFileAssociation = bAns
End Function

Private Function WriteStringToRegistry(hKey As _
Long, strPath As String, strValue As String, _
strdata As String) As Boolean


Dim bAns As Boolean

On Error GoTo ErrorHandler
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(hKey, strPath, keyhand)
If r = 0 Then
r = RegSetValueEx(keyhand, strValue, 0, _
REG_SZ, ByVal strdata, Len(strdata))
r = RegCloseKey(keyhand)
End If

WriteStringToRegistry = (r = 0)

Exit Function

ErrorHandler:
WriteStringToRegistry = False
Exit Function

End Function



Second question -
Comment - Associations are generally meant to be long term things - like as long as PC still runs. If you are turning associations off & on, you're going to cause problems. If other people are running your app, you'll piss them off

Here is how to find what the associated .EXE file is for a given extension FindExecutable api:

Code:
Const MAX_FILENAME_LEN = 260
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As String, ByVal lpResult As String) As Long
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim i As Integer, s2 As String
Const sFile = "C:WindowsReadme.txt"

'Check if the file exists
If Dir(sFile) = "" Or sFile = "" Then
MsgBox "File not found!", vbCritical
Exit Sub
End If
'Create a buffer
s2 = String(MAX_FILENAME_LEN, 32)
'Retrieve the name and handle of the executable, associated with this file
i = FindExecutable(sFile, vbNullString, s2)
If i > 32 Then
MsgBox Left$(s2, InStr(s2, Chr$(0)) - 1)
Else
MsgBox "No association found !"
End If
End Sub




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Vba && File Associations...
Help!! I'm tearing my hair out with this VBA crap!! I have all kinds of code that works dandy in VB6 but alot of it won't work in VBA. I'm having to use the 'Shell' command in VBA instead of 'ShellExecute' to fire up another application but VBA won't execute the dang application, I think because it has a file extension that's not *.exe. VB6 will execute the other application fine but VBA just yacks up an error message. Is there any way to force VBA to recognize the file association in windoze so it will execute? My application is a high dollar mapping program not any of the M$ Office programs.
Thnx.

Please Help {file Associations}
Hi

I have just about finished my program in which you can save your file as a different extension, so if anyone should take your work to their computer etc they can't open it, anyway...

How do you make is so when the program is closed and you double click the .txt file of in my case MESD file it will open in the program, when i do it, it opens the program and it is blank

Thanks Alot

Michael Eddy (A Newbie)

File Associations
I have tried to research this but haven't really found quite what I'm looking for.

Question #1:
I am using INNO setup to distribute my app, is there a way to script the installation to automatically associate certain file extensions with my app during installation?


Question #2:
Once my files are associated with my app, how can I load a file in my app if the user opens the file? I know I have to use shell commands but I'm not really sure how, an example would be great.

Thank you for the info.

File Associations
This may be a simple question, but I have never encountered this as of yet. I have a Public Sub called OpenProject where my program opens a file through an event triggered by the user (i.e. Open Project from File Menu or Toolbar). What if I have a file extension associated with my program and the user opens it through windows, how do I set it up that my program loads and automatically calls the OpenProject routine for the file selected? Is this done somehow in Sub Main or in the MDIMain_Load event?

Arg, File Associations
When I double click a file say and mp3, Winamp opens the file up and plays it. So my question to anyone that can answer, is how do I do this with my program (presumably using the %1 thingy in file associations)

File Associations
Hi,

How can i add 2 items on the right click menu in windows explorer for all files eg (Encrypt with <MY PROGRAM> ) and (Decrypt with <MY PROGRAM> ) though the registry.

Thanks in advance

the_vb_man

File Associations
hi,

I know how to add my program to the context menu u get when you right on a file in windows explorer for a certain extentions, but is there a way i can add it to all extenstions.

Thanks In Advance

THE VB MAN

File Associations
how do i make it so that my program can open serten files when you click like the TXT file?

Help With File Associations
Hey everyone, I recently made a program thats kinda like winamp, you can put songs and videos and other media into a playlist and the player will scroll through it playing them, but I have a slight problem with associating media files with the program. I have gotten it so that when I double click on an mp3 file, my program will open, but what I want it to do is load the file into the playlist and start playing it. Does anyone have any help or suggestions for this? Thanks

--Smartball

File Associations
How can I get a list of what file is associated with what?

Vba && File Associations
Help!! I'm tearing my hair out with this VBA crap!! I have all kinds of code that works dandy in VB6 but alot of it won't work in VBA. I'm having to use the 'Shell' command in VBA instead of 'ShellExecute' to fire up another application but VBA won't execute the dang application, I think because it has a file extension that's not *.exe. VB6 will execute the other application fine but VBA just yacks up an error message. Is there any way to force VBA to recognize the file association in windoze so it will execute? ALso, I know what you're thinking, why not just VB6? Well because it's a fairly small program and I would rather confine it within the application instead of packaging, deploying and possibly creating conflicts in my clients windoze.
Thnx.

File Associations And The MDI
Has anyone out there worked with file associations via an MDI interface? If so, you're my hero

The trouble is that, with an MDI, you only want one instance of your program running. Thus, when Joe double click on a file associated with your program, any second copies of the program that are started need to communicate to the first instance the name of the file that the user is attempting to open, and then that second instance needs to close itself.

I've found a project over at vbAccelerator (I think?) that does this, but the description is rather over my head and I haven't been able to make it work. Plus, he uses some annoying timer DLL that I'd rather stay away from if possible.

All I'm looking for here is a straightforward, not overcomplicated way of implementing file associations with an MDI.

SOMEONE out there HAS to have experience with this

Daniel

File Associations
How can I make a program open the file that I double click on? I am making a database program, but when I double click on the file, it just opens the program with no information from the file in the text boxes. I tried the %1 at the end of the file association like this:

"C:Program FilesStudent Databasesb.exe %1" but it didn't work. How can I fix this?

Thanks in advance.

File Associations?
I asked a question about file associations quite a while ago, but I didnt really get the help that I needed,
I know how to associate my app with a file type,
but how do I open the file in my app?

say I associated *.txt files with my app, how would I open the contents of the text file in a text box in my app?

Thanks,
Dennis Wrenn

File Associations
i know how to create associations!!!!

but i don't know how to open the file, the user clicked on, because i don't know the code for getting the file name....

*crying for help*

File Associations... Etc.
'for your applications, you may need to create file
'associations for your saved data.
'File associations allow your program to be run
'when a file with a certain extension is 'double-clicked
'in explorer. To do this in VB involves a little bit of


Option Explicit

Public Type mnuCommands
Captions As New Collection
Commands As New Collection
End Type

Public Type filetype
Commands As mnuCommands
Extension As String
ProperName As String
FullName As String
ContentType As String
IconPath As String
IconIndex As Integer
End TypePublic

Const REG_SZ = 1
Public Const HKEY_CLASSES_ROOT = &H80000000

Public Declare Function RegCloseKey Lib _
"advapi32.dll" (ByVal hKey As Long) As Long

Public Declare Function RegCreateKey Lib _
"advapi32" Alias "RegCreateKeyA" (ByVal _
hKey As Long, ByVal lpszSubKey As String, _
phkResult As Long) As Long

Public Declare Function RegSetValueEx Lib _
"advapi32" Alias "RegSetValueExA" (ByVal _
hKey As Long, ByVal lpszValueName As String, _
ByVal dwReserved As Long, ByVal fdwType As _
Long, lpbData As Any, ByVal cbData As Long) As Long


Public Sub CreateExtension(newfiletype As filetype)

Dim IconString As String
Dim Result As Long, Result2 As Long, ResultX As Long
Dim ReturnValue As Long, HKeyX As Long
Dim cmdloop As Integer

IconString = newfiletype.IconPath & "," & _
newfiletype.IconIndex

If Left$(newfiletype.Extension, 1) <> "." Then _
newfiletype.Extension = "." & newfiletype.Extension

RegCreateKey HKEY_CLASSES_ROOT, _
newfiletype.Extension,Result
ReturnValue = RegSetValueEx(Result, "", 0, REG_SZ, _
ByVal newfiletype.ProperName, _
LenB(StrConv(newfiletype.ProperName, vbFromUnicode)))

' Set up content type
If newfiletype.ContentType <> "" Then
ReturnValue = RegSetValueEx(Result, _
"Content Type", 0, REG_SZ, ByVal _
CStr(newfiletype.ContentType), _
LenB(StrConv(newfiletype.ContentType, vbFromUnicode)))
End If

RegCreateKey HKEY_CLASSES_ROOT, _
newfiletype.ProperName, Result

If Not IconString = ",0" Then
RegCreateKey Result, "DefaultIcon", _
Result2 'Create The Key of "ProperNameDefaultIcon"
ReturnValue = RegSetValueEx(Result2, _
"", 0, REG_SZ, ByVal IconString, _
LenB(StrConv(IconString, vbFromUnicode)))
'Set The Default Value for the Key
End If

ReturnValue = RegSetValueEx(Result, _
"", 0, REG_SZ, ByVal newfiletype.FullName, _
LenB(StrConv(newfiletype.FullName, vbFromUnicode)))
RegCreateKey Result, ByVal "Shell", ResultX

' Create neccessary subkeys for each command
For cmdloop = 1 To newfiletype.Commands.Captions.Count
RegCreateKey ResultX, ByVal _
newfiletype.Commands.Captions(cmdloop), Result
RegCreateKey Result, ByVal "Command", Result2
Dim CurrentCommand$
CurrentCommand = newfiletype.Commands.Commands(cmdloop)
ReturnValue = RegSetValueEx(Result2, _
"", 0, REG_SZ, ByVal CurrentCommand$, _
LenB(StrConv(CurrentCommand$, vbFromUnicode)))
RegCloseKey Result
RegCloseKey Result2
Next

RegCloseKey Result2
End Sub


' <<<<<< Form Event Code >>>>>>

Dim myfiletype As filetype

myfiletype.ProperName = "MyFile"
myfiletype.FullName = "My File Type"
myfiletype.ContentType = "SomeMIMEtype"
myfiletype.Extension = ".MYF"
myfiletype.Commands.Captions.Add "Open"
myfiletype.Commands.Commands.Add _
"c:windows
otepad.exe ""%1"""
myfiletype.Commands.Captions.Add "Print"
myfiletype.Commands.Commands.Add _
"c:windows
otepad.exe ""%1"" /P"
CreateExtension myfiletype

'The filetype type is pretty self-explanatory.
'Extension contains the file type extension.
'Proper name is the name of the type, which you would
'refer to the type as (do not use spaces).
'FullName is the description of the file type.
'ContentType is the description that you would see
'in your Internet browser, if you were to download a
'file of this type. You could think of the extension
'as the "shortcut key", the proper name as the "name",
'and the fullname as the "caption".

'This Commands part of the filetype contains
'the "verbs" for the file type. When you right-click on
'a file of this type, you would see these options.
'Open is set as the default "verb", so when you double
'click on the file type, it executes the command associated
'with "Open". You can add others, such as "Print" as needed.

'Be careful with registry editing, as it can have disasterous effects.

File Associations
I woudl like to know how you could associate your program with a certian file extension. like lets say i want to make it so when you click a file with the extension .abc it would open up in my application, how would you do that?

File Associations
Hi, I have built an application and associated a particular file extension with this app. When I double click a file of type "*.ntm" my app fires up and displays the file contents in a window. This works fine the first time. Then if I double click another *.ntm file, another instance of the app fires up. What I want to do is to activate the current instance and tell it to display the file contents.

Does anyone know of a way to do this?

TIA

File Associations
I would like to click on a file in a file list and have the associated application start. I cannot seem to find any documentation on this very common Windows capability.

Testing File Associations?
hi

i have modified some file association code found on this forum so that when i dbl_click a file it will open in my program.

my question is do i have to compile the program before i can see if this works? i ask because at the moment the file does not look as though it has been associated and dbl_clicking on it brings up the box 'cant find the file..' which i assume is obvious since the actual.exe is not there...

so can i test this another way to make sure it definitely works?

File Associations And Opening
ok, i've seen plenty of stuff on PSC about how to create a file association with my program. What i can't seem to find anywhere is what to do once the file association is there and the user has clicked on a file they want to open with my program. ie, how do i find out what file the user just clicked on and then run the sub to open it?

The fact that nobody understands you doesn't mean you're an artist.

Retrieve File Associations
How would I retrieve and sdisplay the Windows file associations into a listbox?

XP File Associations (Installshield)
My installshield installation file creates file associations for data files including icons etc

The installation creates the associations properly in Win 95 and 98 but didnt on XP. Is there something special affecting XP? Or maybe it is just a quirk with install file that will fix itself on rebuilding... am gonna try a few more times but if anyone knows some obvious reason then pls let me know

XP File Associations &lt;Resolved&gt;
Ive sorted the problem, the icon didn't exist on the XP machine (I have just wasted nearly 4 hours on this...........what a dope!!!)


Dear Gurus.

Kleinsma kindly pointed me in the direction of this Microsoft KB article and got my associations in the bag with Win98 & ME. It worked so beautifully I nearly cried!!

Thing is when using XPHome (yeah I know...!!) the association gets set up so you can open files from explorer, but the apps .EXE icon does not get associated with the files the prog creates (they show up in explorer with the Windows "dont know what this is?" icon)

The information seems to be OK in the registry, well the icon is listed in the progs entry (I dont really know the registry from my A***!!) any how. Does anyone know why this is happening

Here is the article link for convenience:


http://support.microsoft.com/default...;en-us;Q247529

I could really do with some help here!!

Cheers
Ray

Retrieving File Associations
anyone know how to retrieve all file associations and put them in an array? tnx in advance

Mediaplayer (file Associations)
does anybody know how to make a media file open automatically in a mediaplayer (msdxm.ocx)?
<Edit> lazyjay - added to the topic title to differentiate it </Edit>



Edited by - lazyjay on 11/1/2004 12:43:31 PM

VS Installer - File Associations - Please Help!
Hi,

I am using Visual Studio Installer 1.1 to create an install for my VB project. I create my associations without any problems, i.e. I create my Document Type (lets call it "MyApplication"), then my extension (call it .aaa) which has its command is set to myapp.exe, then my verb 'Open'. The application installs fine, however the problem is that when I double click on one of my saved files with the .aaa extension (or right click and use 'Open'), it is not passing the file path into my application as a command line argument -- it correctly opens the myapp.exe, but does not pass the file path as a command line argument (in my startup object, Sub Main(), I am looking for the keyword "Command" to contain the file path). Does anyone know how I get this to pass the path as a command line argument into myapp? Any help is very much appreciated!

File Extensions And Associations
using the Common dialog ive been saving what are basically txt files but with the extension *.Wap and *.Rap i can save them easy enough but i cant load the files in my program, it just comes up blank unless, i associate them with notepad in windows...

how would i go about associating files with my program and giving each file type a different Icon?

can anyone suggest how to get around or deal with this problem?

gracias

Signature -----------------------------------------------------------------------------------------------------Code:Private Sub Form_Load() 'Print to from, code my problems!
     Form1.Print "CanT SleeP!..... MusT PrograM!!!" & vbCrLf & "I need coffee, WhErE iS mY CoFfEe?!"
End Sub 'All things come to and end
------------------------------------------------------------------------------------------------------------------

Edited by - coma on 11/20/2003 3:42:48 PM

Retrieve File Associations
Hi all,

Without jumping through hoops, is there an easy way to retrieve (programmatically) what executable will be run for any given file extension? I've found many ways to create an association, and clever ways to retrieve the *name* of the program that will be run, but seemingly no way to find the path, and name of the executable!

Suppose I want to find out what *file* runs an MDB database.

Because my clients have at least three different versions of Office, the exe path for MSAccess can be in at least three different locations!

(Oh, and I can't use ShellExecute, because of "/" switches at the end...)

All I need is what is the current default program name and path for MDB files!

Any help appreciated,

Mark

File Extensions & Associations
Hi,
One of my self-written Programs stores data in files with a own extension.
I want to make a association, so that I only have to double click on the data file and it is open with my application.
I know how to do this in windows, but i want want my program to check, if theres an association with this file type, and if not, ask, if he should create one (and then do this)

But I don't know
a) how to check an association
b) how to create an association
(with visual baisc)

thx,
Tom

File Type Associations At Install
Hi,

I have completed a media player program, and I want it to be the default app for a lot of media files (from MIDI to MP3 to AVI, and even SWF), but I don't know how to set it as default association at install. I am using Install Maker Pro, which allows you to change registry values, INI values, and string values at install, so it should be easy to do... but I don't know what to change/add. I've looked at code that supposedly does it, but it doesn't seem to work on win2kPro (my version, and the best in my opinion [next to linux, of course]). Could someone give me a list of all the regkeys and/or files i need to edit to change the Open association and icon?

Thanks very much!

Inno Setup - File Associations :)
I am setting a file association on files related to an application I am creating in VB. The setup program I am using is INNO Setup. The code I am using is below. The file association works great, however the icon for the associated files is the same icon as the application. I would like it to be the little application icon (it looks like a peice of paper with the application icon in it). Anyone know what I am doing wrong?


Code:
[Registry]
Root: HKCR; Subkey: ".pmk"; ValueType: string; ValueName: ""; ValueData: "PulseMenuPKFile"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "PulseMenuPKFile"; ValueType: string; ValueName: ""; ValueData: "PulseMenuPK File"; Flags: uninsdeletekey
Root: HKCR; Subkey: "PulseMenuPKFileDefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}PulseMenuPK.exe,0"
Root: HKCR; Subkey: "PulseMenuPKFileshellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}PulseMenuPK.exe"" ""%1"""

Creating File Extension Associations...
Does anyone know how to create file associations programatically? For example, if my program saves a file with the extension .icu, I want to add the registry keys (or however it's done) so that the system knows that my application will open files of this type.

I'm pretty sure this could be done using notepad and creating a .reg file (which I would like to see if anyone has it), but I would like to do it in my program using code, so that after the program is installed and the user runs it, it creates the associations automatically.

Thanks in advance!!!

In Vb6 On Windows: Creating File Extension Associations
In vb6 on WinXP...

How do I programmatically associate a program (.exe) to be the default opener of a file exe such as wav?

Thanx in advance

Rami

Default Icon Of An ActiveX EXE (and Then Later About File Associations)
When you select the default icon for an acitveX exe, it makes you select the form that has the icon to be the exe's icon. If there is no form, how do you set it?

Problem With File Associations In Visual Studio Installer
Hi All,
I created a small VB6 application that uses its own file type. I'm using Visual Studio Installer 1.1 to create the setup file, and everything works fine except for the file associations. I don't get any errors neither when building the .msi file nor when installing it, but when I go to the register to check for the new extension, it is not there. Of course, if I doubleclick at any of my files to open it, it doesn't work either.
What I'm doing is very simple so I have no idea what am I doing wrong. In the File Associations window, I added a document type named MyApp.File, under that and extension .mya, and under that a verb open. I've tried many different things but I can't get it to work. I even took the leading period from the extension out, since the readme file for vsi says to do so; nothing has worked so far.
Any ideas?

File Associations And Loading The File
HI. Ive got the whole file association thing figured out. My Prog opens when the file is doubled clicked and it has my icon and all of that.


My problem is, my program is an mp3 player, and althought the program opens when an mp3 is clicked... i cant figure out how to get it to start playing the file automaticaly like with winamp. Any idea how to do this?


Any help is greatly appreciated! Thanks!!

Files And Its Program Associations
I want to run a file for e.g. "an html file". What is the code in VB to run a file with to its associated default program for e.g. "html on mine is Netscape"?!?

Thanks in Advance.

Windows Right Click Associations
(this question is two-fold)

i've finished a program that takes advantage
of popular encryption algorithms. i want to
be able to right-click on any file in windows
and have the name and icon of my program…

like “encrypt this file with…”

then a pop-up menu with all the different
algorithms. and when you click on one, my
application will run and have 2 variables
passed to it…

one, the path to the file you want encrypted
two, the cryptography algorithm selected

i was thinking, may be some kind of query-string?

C:/DecoderRing.exe?file=path&cipher=whatever

does anyone know about doing either of these things???

Setting FileType Associations
Hey,

I want to be able to setup filetype associations to open with my program during the setup process. Could anyone tell me how this could be done?

Random Number Associations In A Table
Hi there,

I’m new to VB, so would really appreciate some help with what I’m trying to achieve. I’m attempting to create a Pontoon game in Access, and at the moment am working on the code for the card generation if a player chooses to ‘twist’.

My plan is having a card table with the values 1 – 52 in one field (with each number representing a card) and a yes/no field to show whether the card has been picked previously in the round. A random number will be generated every time the player chooses to twist, then this number will be looked up in the table to see whether it’s been previously selected.
If the table shows it hasn’t been selected before, I’d like the table to be then updated to say it has now been selected during the round, before showing the card to the user.
If it has been previously selected, I’d like to generate a new random number and begin this process again.

Being a beginner, I’m obviously finding this very complicated to achieve. If anyone can offer any suggestions for inclusion the coding, I’d be extremely grateful.

Thank you

Oh and sorry for the thread title, I really didn't have a clue what to call it.

Visual Studio Installer Associations
Is there anyway to associate files with programs other than ones included in the install package?

Specifically I'd like users to be able to open a file type with notepad.

Again, anythoughts appreciated.

Visual Studio Installer... Setting Associations
Using Visual Studio Installer there is a place to set File associations.

Say i wanted to associate all mp3's and wav's to my program. How would i go about this?

I assume it's using the Document Types Association.. but not sure how to work it just right...thanks!

Visual Studio Installer Document Associations
I'm having trouble creating a document association with Visual Studio Installer. I have a small program to view persisted recordsets and want the extension .rst to open the program.

I already have it in code but I want the association to be created upon setup.

Thanks in advance.

Import Csv File In Vb Without Converting Csv File Into Text Or Excel File.
i have to import data of csv file in vb.i had converted csv file into text or excel and then imported the data from text or excel file.But i want to import data of csv file without conveting it into excel or text file.

thanks for help in advance.

File Support With My App (clicking On A File Opens The Program And Then The File)
Hey peeps , i am wondering how to create a program that has supports files , with this i mean double clicking on a icon make my program run itself and then open the file , how to do this?

How To Install A Dll File By Executing A Batch File Or Vb Script File
how to installed a dll using regsrv32 without manually type .i would like to installed it using a batch file or vb script file . can anyone show me how to do it.



 

Show The File Properties Of File In The File List Box.
Hai, guys. I need some help here. i got a file list box that show the contain of a folder. The folder contain wave file. The file list box display the file name of the file contained in the folder. What i need is the file list box to show the time and data properties of the file. some like this:

WaveFile 001 31/01/2002 13:03.

here is my code for the file list box:

Private Sub File1_Click()
File1.Path = "C:VMBVoice"
strFile = File1.Path & "" & File1.FileName
End Sub

Private Sub Form_Load()
File1.Path = "C:VMBVoice"

End Sub

Private Sub Timer1_Timer()

File1.Refresh
End Sub

This is some thing like when we set the file views in Window explorer to details, window explorer will display the time and date of the file. can i do the same with file list box. Pls provide some help and code sample. Thanks And Have A Nice Days.

Copy File A To File B(TEMP FILE)
Can any of you GURU's send me a snippet that copies my actual file to a TempFile
, also a code that removes it (The original) from my App.Path.
and copies my temp back to my original

file_a(original)-->file_b (tmp file)
file_b(tmp file)-->a(original)

thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved