VB 6.0

  • Thread starter Thread starter Binu C
  • Start date Start date
B

Binu C

hi all

i have 2 forms (say A & B). form A has an open dialog box. plz tell me
how to capture the whole path of the selected file into a string.Also,
i need to use that string in form B.so how to retain the value of that
string in form B.

also, how to get the complete path of the file from Save As dialog box.

also, how to print a string(not an array) char by char.

plz reply.......
 
As pointed out, this is a newsgroup for VB .NET, not VB 6.0, but here you
go:
i have 2 forms (say A & B). form A has an open dialog box. plz tell me
how to capture the whole path of the selected file into a string.

I assume you mean a CommonDialog control, right? A CDC has a "FileName"
property that returns a string containing the entire path of the selected
file.
Also, i need to use that string in form B.so how to retain the value of
that
string in form B.

Then declare the variable that is going to hold the file path as public in a
public module that loads before your forms do.
also, how to get the complete path of the file from Save As dialog box.

The CommonDialog control is called that because it provides 6 different
dialogs via just one control (Open, Save As, Print, Color, Font, Help).
Since the difference between the Open and the Save As dialogs are minimal,
the same "FileName" property works in both places.
also, how to print a string(not an array) char by char.

This loop will grab each char (one at a time) and squeez a space in between
them.

Dim s As String
s = "scott"
Dim i As Integer
For i = 1 To Len(s)
Label1.Caption = Label1.Caption & Mid(s, i, 1) & " "
Next i
 
thanks buddy...............

As pointed out, this is a newsgroup for VB .NET, not VB 6.0, but here you
go:


I assume you mean a CommonDialog control, right? A CDC has a "FileName"
property that returns a string containing the entire path of the selected
file.


Then declare the variable that is going to hold the file path as public in a
public module that loads before your forms do.


The CommonDialog control is called that because it provides 6 different
dialogs via just one control (Open, Save As, Print, Color, Font, Help).
Since the difference between the Open and the Save As dialogs are minimal,
the same "FileName" property works in both places.


This loop will grab each char (one at a time) and squeez a space in between
them.

Dim s As String
s = "scott"
Dim i As Integer
For i = 1 To Len(s)
Label1.Caption = Label1.Caption & Mid(s, i, 1) & " "
Next i
 
Back
Top