Re: VB 6.0



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



.



Relevant Pages

  • Re: VB 6.0
    ... Scott M. wrote: ... how to capture the whole path of the selected file into a string. ... I assume you mean a CommonDialog control, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB 6.0
    ... 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 ... how to print a stringchar by char. ... plz reply....... ...
    (microsoft.public.dotnet.languages.vb)
  • VB 6.0
    ... 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 ... how to print a stringchar by char. ... plz reply....... ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to add thousand separators
    ... First, this code is obsolete as written, because char is a dead data type and should not ... Note that both of these should be stored as string resources since they might need to be ... 18 digits for any reason. ... you have made a VERY SERIOUS DESIGN ERROR. ...
    (microsoft.public.vc.mfc)
  • Re: what is the best way of passing floats into a string
    ... I do not null-terminate as snprintf takes care of this (according to ... But the easiest way to determine the size needed to format a number, ... int length_of_representation(double n,const char* format){ ... I get a nice result of -10.000000 in my char * string. ...
    (comp.unix.programmer)

Loading