Here is an example that will read a text file and output it to a text box You will need a command button, a textbox and text file in your project's folder. You will also need to add the reference Microsoft Scripting Runtime to your project (Click Project->Reference) Private Sub Command1_Click()
' Declarations
Dim obj_fso As New FileSystemObject
Dim obj_file As Variant
Dim str_data As String
Dim str_array
Dim i As Integer
' Intialize the File System Object
Set obj_fso = CreateObject("Scripting.FileSystemObject")
' Specify the file to read from
Set obj_file = obj_fso.OpenTextFile(App.Path & "\file.txt")
' Reads the text file and stores it as a string
str_data = obj_file.ReadAll
' Inserts each line the string into an Array
str_array = Split(str_data, vbCrLf)
' Loop thru the array and output each line to the text box
For i = 0 To UBound(str_array)
Text1.Text = Text1.Text & str_array(i) & vbCrLf
Next
End Sub I hope this helps you. Cheers, Kobra
Try using Microsoft internet controlin vb. It is in the components list. Its is very easy to use.
give print then select print to file give the file name that file may prn file by
To remove a virus using VB programs, you can create a basic antivirus scanner that scans files for known virus signatures. You can use file system operations to read through directories and compare file hashes or contents against a database of known virus patterns. Once a virus is detected, you can either delete the infected file or quarantine it to prevent further damage. However, developing an effective antivirus solution requires extensive knowledge of malware behavior and is a complex task beyond simple VB programming.
You will need a PDF server running somewhere that can be accessed by your VB code. It will need to be called from the code through the server and get the PDF file in return. I did that with Tweak PDF Converter, an pdf editor for converting pdf file to word form.
.vb
Databases are related in that you can have a database connected to a VB application and able to read/write from it.
If you know c# or vb net you can do using that. It's actually the only way I can think of.
write a vb program to find the magic square
VB is a programming language and can be used to create any application. In theory it would be possible to produce an advanced picture editor using VB.
vb called visual basic where as c the third letter of english alphabet so the basic advantage is the spelling of vb is very large as compared to c although both are bekar language but still attendence demands completion of file n completion of file demands a good friend who helps in writing a file and for helping that friend we have to search such a "goody goody" questions like this so it is the major disadvantage of vb practical over c practical.
Yes, You can show the railway reservation mini project using the oracle and vb 6.0.
My.Computer.FileSystem.RenameFile("C:\mydocs\oldfile.xls", "newfile.xls")