Home All Groups Group Topic Archive Search About
Author
25 Oct 2006 4:40 PM
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.......

Author
25 Oct 2006 5:33 PM
The Grim Reaper
This is a .NET newsgroup, not VB v6.

Show quoteHide quote
"Binu C" <binucme***@gmail.com> wrote in message
news:1161794441.791551.274630@b28g2000cwb.googlegroups.com...
>
> 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.......
>
Author
25 Oct 2006 7:05 PM
Scott M.
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
Author
26 Oct 2006 1:12 PM
Binu C
thanks buddy...............


Scott M. wrote:
Show quoteHide quote
> 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