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




Files That VB Acceses


Can anyone tell me the list of files (i.e. dll files) that VB accesses everytime it executes a program? Would really appreciate it. Thanks.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Does The DataGrid Lock The Tables It Acceses
On a shared application the first instance of the program can modify the information from the table, but the others can't. Other tables of the DB can be accessed and modified without a problem.
I have not set the DataGrid to AllowUpdate, Delete or AddNew.

Any ideas why this is happening?

Thanx,

Juan Solano

Printing Multiple MSWord Files. Files Do Not Print In The Same Order As Instructed By Code
I am printing multiple Word files from VB using the code indicated below. The order in which they come out of the printer is not the same as that followed by the code.

What can I do to get them to come out of the printer in the same exact order as executed by the code.

Code Used:

For nI = 0 to n

sFile = "File" & Trim(Str(nI)) & ".doc"

Documents.Open FileName:=sFile, ConfirmConversions:=False, ReadOnly:=
True, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="" , Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="",
Format:=wdOpenFormatAuto

ActiveDocument.PrintOut Range
            :=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=1, Pages:="",
             PageType:=wdPrintAllPages, Collate:=True, Background:=True, PrintToFile
            :=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0,
            PrintZoomPaperHeight:=0

        Documents.Close
        
        
Next

Converting Maya Learning Edition 4.5 Files To DirectX .x File, Where Do I Get Files?
i havent been able to get hold of maya 4.5 convetor to directx .x files

ive checked the dx8 sdk and its only got up to v4 for maya, which doesnt work

ive got some sdk for dx9 but it doesnt seem to be in there either, i might be wrong on that if so tell me,

i just need something to convert the files thanx

How To Build An Exe That Erases Files From Temporary Internet Files And Clears Cookies
How to Build an Exe that Erases files From Temporary Internet Files and Clears Cookies using win API

How Can I Make Files With VB, Or Save Files To A Chosen Directory By Using The Browse
Hi!
I wanna know how to make files in VB. For example a text file.
I also wanna know how to save files to a chosen directory by using the file browser.
This is the code I've used, but it doesn't save the file:

VB Code:
With CommonDialog1     .DialogTitle = "Save"  'sets the dialog title       .InitDir = "C:"  'sets the initial directory       .Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"  'sets the file types      .ShowSave  'show the dialog  End With

Edit: I wanna allow overwriting.

How Do I Play Midi Files And Wave Files At The Same Time In My Form?
How do I play midi files and wave files at the same time in my form?

This is a big question of mine and I've already abondoned one other project because of it!
Thanks

 

Copying Files To Program Files Folder During Setup
Hi I have modified some VB source code of a tool we had built for us.
All the mods look great but when replace the existing .exe with the one I have created (on the install CD) and install the application it doesn't work.

This is because the VB mods I done open 3 new text based file that MUST be in the applications program files directory for the app to work.

I dont want to create an new installshield because I dont have the software, the current installsheid installs MDAC and some other things and this is all new to me!!

What would be the easiest way to create another setup.exe to first run the original setup.exe then copy these 3 text based files to say c:program files
ewapp?


I could write some vb to copy the files from CD to program files directory.

any good free aps available to do the above??

Any help welcome

Thanks

Matt

2 Questions - Checking Files Size, And Sending Files
1. How do i check the exect size of an exe file? i need it in bytes.

2. Is it possible to send files throught winsock without worring about data that might get lost on the way, and without burden too much on the internet? If not, whats the best way to do it? (I need to transport files from server to multiply clients for program updates).



Thanks ^^

Listing All Files In A Folder, Including Files In Subfolders...
I'm trying to obtain a list of all files in a folder, im currently just looping through a DirLists "List" property and setting this folder to a FileList, then getting the filenames, but... that doesnt get files in all subfolders... ie...


Code:
For i = -1 To Dir1.ListCount - 1
File1 = Dir1.List(i)
For j = 0 To File1.ListCount - 1
List1.AddItem File1.List(j)
Next j
Next i

I dont mind having to use these list controls because i need them on my form anyway, I've had a look at the file system object for this purpose, but I can't work out how to do it >_<
Any help would be greatly appreciated!
Matt

Redirecting Output From *.exe Files And Communicating Between Running *.exe Files
Hi
I would like how could I get the output of an old *.exe file I’ve done ages ago (in Pascal) and put it in a textbox for example.
Could I even interact with an other program?
Say I have a program that adds two numbers and it’s written in Pascal or an other program non-GUI oriented ,
could I do something like this:
-run that program from my Visual Basic program,
-then supply the two numbers to that old program, (just like I would do from a DOS shell when I would run it)
-get the output and print it in my visual application.
Just like taking an old program, and instead of re-writing it in full, just build a simple visual interface and keep the old program.
Sorry for being over-explicit but I’ve asked this question on other programming forums and I got all sorts of answers for things I didn’t ask (like how I can redirect output in input in a DOS shell).
Thanks in advance. (and could anyone post the easiest way (one that does not include API perhaps ) because I’m a little bit dumb )

Files Older Than 16 Days, Number Of Files In A Folder
I am trying to come up with a way to write a script that will do the following,

Identify which subdirectories have files in them older than 16 days, and subdirectories that have more than two files in them.
Then I need to log these directories to a log for review.


I would also like for this VB Script to exclude a couple of the subdirectories in a folder that I am searching.

Can you assist me in writing this?

Using Custom Resource Files - Text Files (RESOLVED)
Hi

In my program i have a file, say readme.txt, that contains alot of information about the program. When i create a newer version of my program, i would like to just distribute the exe file and not the readme.txt file ( which would also be updated ).
So the way i thought of doing this is adding it in a resource file, so when i compile, the readme.txt is compiled into the exe.
Now the only problem i have is that i dont know how to retrieve the data from the readme.txt file thats stored in the resource file.

I assume its something like this


VB Code:
text1.text = LoadResData("IDName", ? )


but i dont know what to put in the second parameter, the only constants i can use are

vbresBitmap
vbresCursor
vbresIcon

and none of them are obviously it

or am i doing this wrong?

Thanks

*** Resolved*** Saving MS Word Files As HTML Files Via VB
i'm trying to save a word document as HTML via VB

i'm using this
wordobj.ActiveDocument.SaveAs ("c:clutter tempMediapix.html"), 108, False, "", True, "", False, False, False, False, False


where 108 is the vb code for word html (i think)

but when i run it i get an error saying that the command could not complete...

any suggestions??

Copying All Files And Nested Directories (and Files In Those Dirs)?
Help :s

I need an easy function where I supply an old path and a new path and it will copy everything from the old path and all sub directories contained within and files to the new one.

Anyone know how to do this?

Saving Files Already Open Files In Excel And Word
I need to program the condition where as a user is attempting to save an Excel or Word file that is already open. I'm using common dialog component and don't know how I can trap this error to inform them that the same named file is already open.

Make All Files One And Extract To Original File Name Like In Zip Files
Hi,
I have a listbox called a list1 which has a list of JPG,MP3,WAV and lots of other file types. I just want to save them all as a single file and extract them to their original file names.

Like what WINZIP does ............ but no need to compress them just want to make all those files into one big one.

i'm working on this program called game base ............. yeah ........ and u can see how it stores info.......... on differant dir ... and files.... want to make my prog save all files in a big bundle like a .FLA file in flash.

Regards,
Dasith

Code For Finding All Files In A Dir Including All Files In The Subdirs
Is there an easy way to list all files in a dir including all subdirs.
So if i send a dir name list like C: it lists all files on my C including all subfolders and when I say listallfilesincludingsubdirs "C:windows" it lists all windows crap and garbage .

Jarry

Filter Files In FileListBox Based On Date Of The Files
I would like to filter the contents of the FileListBox to only show files that were created on a given date. How do I do this?

How Do I Convert Wav Files To Midi Files With Visual Basic?
Please Help Me!!

I need to convert wav files to midi files with visual basic. Does someone know how to do it?

Thanks,

Lore



Maria Lorena López
email@removed

Do You Know A Smart System To Convert HTML Files In PDF Files???
Hi my dear friends,

Sometimes I return here to ask a question...

I developed an intranet web site in which the users can generate HTML files. Due to a migration to a new system, the requirement is to get all these HTML files and convert them to PDF format, because the new system doesn't support HTML files.

I made a search on the net about this issue, and there is a lot of converters, but the problem is that I'd need to use only the technologies that are already installed, because the customer doesn't want to spend money in new third part software.

I'm wondering if it's possible to create a VB6 application that reads all the HTML files from a folder (path included, because I have to manage also subfolders) and convert them into PDF files. It doesn't matter if the process is so long, I can schedule it at night.

Any idea or suggestion will be appreciated.

Cheers and good weekend to all,

Laura

Try to teach something to someone, and you'll learn more than you expect of yourself!

Read Articles and Resources By Rock: This page contains links to several articles collected over time here at VbCity



Edited by - laurarana on 5/21/2007 3:16:26 AM

I Need Codes In ASP/JSP Both For Uploading And Downloading The Picture Files Or Any Files To The Se
I need codes in ASP/JSP Both for uploading and downloading the picture files or any files thro' to the server ?

Regards
Ankhita

Setup.exe Copies 'Setup1 Files' Instead Of 'Bootstrap Files'
An installation package I have created using the Package & Deployment Wiz fails to install. Setup.exe first copies across all the files in the Setup1 files section of Setup1.lst (instead of the Bootstrap files section) then insists on a reboot. After reboot it does more or less the same ting again but copies less of the Setup1 files across after this.
Setup1.exe never starts.

Reading Arc/Info Exchange Files ( E00 Files) Using VB
If anyone understands how to extract information from an Arc/Info Exchange file (i.e. an E00 file) using VB I would appreciate hearing your thoughts.

The online links I found on a google search for reading E00 files using VB; unfortunately, were dead links. Either the VB code to read data from E00 files using VB is no longer available online or I didn’t pick the right google terms.

Binary Files Are Just ASCII Text Files... Why?
I have very little dealings with reading/writing files using binary access. I've always used simple Input/Output as I've only had small tasks to do with files.

I have read many times that when you write out raw binary data to a file and open it up, it looks like a bunch of gibberish. I'm not seeing this.

Here is some sample code of what I'm doing

Code:
Dim x As Long
Dim b(1 To 1000000) As Byte
Dim ff As Long

ff = FreeFile
For x = 1 To 1000000
b(x) = Int(Rnd * 255)
Next

Open "c:inary.txt" For Binary As #ff
Put #1, 1, b
Close #ff
Again, just sample code... what I am really doing is writing my game map data to a file. I put it in a byte array just like b() is.

However, when I open this file up in my text editor, I see everything in ASCII characters.

What happened to the "gibberish" I am supposed to be seeing?

If I did this for example instead

Code:
b(x) = Int(Rnd * 26) + 65
I would see all capital letters when I viewed the file.

Subsequently I am reading the file into my byte array like this sample code

Code:
'Fill the temp array with the file contents
Open "c:inary.txt" For Binary As #ff
ReDim b(LOF(ff))
Get ff, , b
Close #ff

Am I missing something, or is what everyone calls "gibberish" just random ASCII characters they see?
I also write other files that contain mostly text (which I convert to byte arrays). These open as plain text files which are easily readable.

Any input of how I can write "bytes" to files that dont show up as ASCII when opened with a text editor?

Thanks

Loop Through Folder To Change .txt Files To .xls Files
This seems to be a topic of great discussion...But I can't seem to find what I'm looking for...(And now you know how U2 got the title to their song)

I have a folder on my desktop with 3 years worth of daily .txt files that I need to convert to .xls files...

I have consulted 3 forums, 2 books and numerous experts...but have found no solutions to this task.

This is as close as I can get...(with the help of the previous mentioned sources) What am I missing...
Will someone please help me see what I'm doing wrong.


Code:
Sub ChangeFilesToExcel()

Dim SourceBookName As String

With ThisWorkbook
ChDrive "C:"
ChDir "C:Documents and Settings123456DesktopDaily Files"
End With

SourceBookName = Dir("*.txt")
While SourceBookName <> ""
Application.StatusBar = SourceBookName
Call macro6(SourceBookName)
SourceBookName = Dir
Wend
End Sub


Code:
Sub macro6(SourceBookName As String)
Dim WB As Workbook

Set WB = Workbooks.Open(SourceBookName)

With ActiveWorkbook
.SaveAs Filename:= _
"C:Documents and Settings123456DesktopDaily Files" & "*.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End With
End Sub
Thank In Advance...

Reading AutoCad Files And ArcView Files In VB6
Hi !

Can someone tell me, whether there is a method to read a drawing prepared using autocad(DXF or any other form) and a file prepared in ArcView (shp file) into VB6.0. I want to redraw the same content using VB6.0 also.

I am stuck there in a program preparing now.

Thanks

JJJ

Producing MHT (web Archive) Files From HTML Files
Does anyone know how to programatically generate an MHT (web archive, single file) file from an HTML file via VB 6.0? I am generating an HTML file using the "Print #1, strHTMLOutput" method, but once, generated I would like to have that file archived into a single file so that any referenced images don't need copying as seperate files to a target machine...

Many thanks in advance.

Converting Jpeg Files To Hex/Binary Files?
Do you guys know how can I convert jpeg files (or any other files, like .rtf or .doc for that matter) to binary or hex files so that i can save it in my database?

Also, I'd like to add some sort of "header" or what-not in order to "encrypt" the said file. Any tips?

Thanks.

Resource Files..... Adding Files To Through Code?
Hello,

I was wondering if anyone has ever found a way to add files to a vb resource file (embedded into a program) at runtime.

Does anyone has any websites or ideas on how i could go about doing this?

Thanks for your time!

Retrieve Email Address From DBX Files Or PST Files
Dear all,
good morning.here is my requirement

1) Retrieve all Email Address from outlook express messages and microsoft outlook folders.

Based on this requirement i searced in web and found a website which does the same. http://hangvogel.fly.to/

Though i wanted in VB Code format am looking for your help. pls do the needful and help me.

thanks
Parthi

FSO - Extracting Files From The Files Collection Object
Hi, and thanks in advance for your help.

This code works:


VB Code:
Sub ShowFolderList(folderspec)    Dim fso, objFolder, objFiles, objFile, s    Set fso = CreateObject("Scripting.FileSystemObject")    Set objFolder = fso.GetFolder(folderspec)    Set objFiles = objFolder.Files    For Each objFile in objFiles        s = s & objFile.name         s = s & vbCrLf    Next    MsgBox sEnd Sub


And this code doesn't - can anybody tell me how to 'extract' a file object from the files collection? I'm getting run-time error 5, "Invalid Procedure Call or Argument" on the line below the "For" line.


VB Code:
Sub ShowFolderList(folderspec)    Dim fso, objFolder, objFiles, s    Dim iIndex1 As Integer    Set fso = CreateObject("Scripting.FileSystemObject")    Set objFolder = fso.GetFolder(folderspec)    Set objFiles = objFolder.Files    For iIndex1 = 1 To objFiles.Count        Set objFile = objFiles.Item(iIndex1)        s = s & objFile.Name        s = s & vbCrLf    Next iIndex1    MsgBox sEnd Sub


Thanks heaps,
Ben

Browsing Into Zip Files And Finding Specific Files ?
I found a module that has ZIP functionality features - but it's got no comments on how to pass an argument or request to it...

What I'm trying to do is:
> Find all *.zip files in a directory (*.zip in (say) C:MyFolder)
> Browse into each zip file and search for specific files (find any files that end in (say) *.txt)
> Load those files into a list box


I'd really appreciate any help - and espically the location of a zip functionality module that has comments or insturctions on how to use it.

Thanks!

Print/create Postscript Files From Pdf Files
The problem: Many files in any formats (doc, xls, rtf, PDF) must converted by a program (VB) to postscript format without an file name question dialog. For MS-Office-files it's no problem, it works very good, but for pdf:
I've found no way to do it. The Acrobat function "save as" has no API (it's right ? i have read the SDK) and there is no way to give the name of the output file to the Adobe postscript printer driver (using the AcroExch object).
Can you help me ?

Need Help With Taking Data From 15,000+ Files And Storing It In 6 CSV Files
I would like to create a DB of baseball players and their stats. I have about 15,000+ files, one for each player. Each file is an SHTML file and has stats for player in about 6 sections, each section having about 20 columns and each row for every year they played or appeared in a game.

What is the best way for me to import these files and stats in to about 6 CSV files, one for each section, or an Access DB? MS Access does not recognize SHTML files as valid html files. Is writing a VB program my only hope? I not good with writing my own programs but do understand code and will learn on my own if pointed in the right direction.

Here is what one of those 15,000+ files looks like: http://www.baseballprospectus.com/dt/cobbty01.shtml

Display Files All Files In A Folder, Except For .asp Page Itself
I have a question of which i have no idea if it can be accomplished.
The following script shows me all files that are in the folder "/here/okido/", as link on an .asp page.

Quote:

<%
dim IISFOLDER
IISFOLDER = Server.MapPath("/Here/okido/")
Dim fso, folder, File, Files, sFileDetails
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(IISFOLDER)
Set Files = folder.Files
For Each File in Files
%>
  <b>
    <a href = '/Partitions/Joucomatic/<%= File.Name %>' target = '_blank'>       <%= File.Name %>
    </a>
  </b>
  <br />
<%
Next
Set folder = Nothing
Set fso = Nothing
%>

Unquote

I have 2 problems:

1.: Each time i wish to use this page in another folder, i have to manually change the folders location ("here/okido/") in the script.
Is there a way to have it automatically show the files of the folder that it is in, without having to change the script all the time?

2.: if i put the asp page in the folder i wish to view the files from, it shows itself in between the files.  Can this script be adjusted so it doesn't display the asp page itself?

Thanks in advance for your help

Importing Excel Files Or Text Files
When I attempt to import any excel file or text file into access, I receive an error message "Active X component can't create object". Now before I have done this function several times with complete success. However something has changed in my program which is now preventing from acclomplishing this function. Help.

Recusively Deleting Files/files Within Subfolders Using FSO
Hi. I'm relatively new to VB, and the FSO is a totally new subject to me. I'm writing a program that is somewhat like Disk Cleanup, but lets the user choose the folders to clean. I've tried using a sub called 'Nuke', that I found somewhere on the MSDN site, but it only deletes files on the OS' drive. I have a function which uses the FSO to recursively set the files' attributes, which works fine even on the other drives, so I figured there must be a way to delete them using the same method. Any help would be appreciated, thanks

Read PDF Files / Extract Data From PDF Files
I wondering IF it's possible to read data from pdf files?

This because I would like to write a sub for pdf files like below:

Code:

Text = ReadWordDocument("C:TempTest.doc")

Public Function ReadWordDocument(strFileName As String) As String

Set oWordApp = CreateObject("Word.Application")
If oWordApp Is Nothing Then Exit Function

Set oWordDoc = oWordApp.Documents.Open(strFileName)

oWordApp.Selection.WholeStory
ReadWordDocument = oWordApp.Selection.Text

oWordApp.Quit

Set oWordDoc = Nothing
Set oWordApp = Nothing

End Function

How To Merge 2 Mpe Files To Make Single MP3 Files
Hi,
 Cananyone Help me ???
 I want to merge 2 mp3 files into a single mp3 file.

Is this possible.
Imran

Create .txt Files Form .doc Files By Code
I'm sorry about my last thread, I was not enough clear about my matter....

I looking to create .txt files form .doc files by code.
I'm creating an App that opens pictures and comments related to the pictures basing upon a DB that contains the Path of the files to open. For the picture it's all ok, but the comments are all in .doc files and i would use a rich text box to make them visible in the form, so i would find a mode to
1) read the text of the .doc file and write it in another one .txt by code

OR

2) create a .txt file from a .doc one


This because by using OLE i could not scroll the .doc document without opening the Object by double clicking, (I think).

For CPUWizard: you would excuse me for my uncomplete thread

How Modify Shortcut Files (*.lnk Files)?
Hi all,

I am a little more than a begginner in VB6.

I am trying to to use VB6 to change the target on a shortcut file (*.lnk).

I was able to assign the lnk-file to a File object variable, and this lets me access some of the properties such as date modifed. But it does not seem to allow me to access the target.

Thanks

Convert .msg Files To Clean .txt Files
Hi all,

I have many (hundreds) of .msg files saved in a directory. What I need is some code to convert these files to plain text files to get rid of all that lovely outlook formatting gibberish. Something along the lines of programmatically opening up each message and using the SaveAs plain text option.

Any help will be appreciated.

Regards
J.

Save TextBoxes' Files Into TXT Files
I want to know what code I should to use to save textboxes' text into a *.txt file. Help me if you can!

Running Non Executable Files (eg VBS Files)
Normally, to run an outside program from your visual basic program, you'd use the SHELL (..) function. However, this only works with files with the extension of EXE.

If I want to run a file, or say, a script like a VBS script file, how would I go about doing this?

Open Files, Close Files
In the cmdProcess Procedure I have the Close_Files so I can force the Generate_Size_Report to be written to the txt.file. But when i put the Open_files in the Procedure it clears the txt.file so How can I make the files be written to the txt.file while the program is still running. And i need to keep the file as Output.



Private Sub cmdProcess_Click()
Generate_Size_Report
Close_Files 'I think The Problem is Right Here
Open_Files 'Or right here
End Sub

Private Sub Generate_Size_Report()
Print #2, "Extra Large: ", ELarge_Accum
Print #2, "Large: ", Large_Accum
Print #2, "Medium: ", Medium_Accum
Print #2, "Small: ", Small_Accum
End Sub

Private Sub Close_Files()
Close #1
Close #2
End Sub

Private Sub Open_Files()
Open "a:jimspizza.txt" For Append As #1
Open "a:jimsSizeReport.txt" For Output As #2
End Sub

Rename Files, Delete Files
Hi

I am relatively new to VB, but I have written a program than generates a report, I won't get into all the details, it's actually for an assignment for this course, but anyways, I have made it so that the report gets generated into a temp file. Then I want to give an option (probably in the form of a button) to either save the file, or discard.

For the save, I suppose I could either rename the tmp file and move it to the save location, or copy the contents of the tmp file into the filename specified by the end user and then delete the temp file.

I don't know the code for any of the possibilities mentioned in the previous paragraph, if someone could help me out with the code it would be much appreciated.

Thanks

HELP! Open Files, Find Files...
How to open an entire file without having quotes at the start and end?

How to make my app. locate a file?

How to tell the app. where it was launched from?

Combining Files To Together (TEXT Files)
Hi, guys got a small problem, were I need to combine all these text files in a specific folder into one big text file, using visual basic. The names of these text files vary eg. "01Dec.08.00" or "03Dec.16.00", as you may see they will be all .00 files. I would like with the push of a command button, combine all these .00 files (no matter how many files or actual names, they will always be .00 files though!) in this specific folder into one .asc file or .txt file to be saved in another specific folder.
Currently i have a batch file that can do this and its code for it is as follows if it helps at all:


Code:
copy c:aaComGodata.00 c:aaComGodataA.00
copy c:aaComGodataA.00 +c:aaComS1*.*
COPY c:aaComGOdataA.00 c:aaComGOdataA.asc


Form the code above, all the combined data is saved into dataA.asc.
Ive tried to explain my situation as much as possible, if neccassary will provide more information, but if anyone can help it would be very much appreciated
Thnx, Boz

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