The example code I provided (the first response above) makes use of the File System Object -- note that the FSO is invoked by the first Dim statement.
On your VB menu bar, click Project, then click References...this will cause the References form to appear. Select "Microsoft Scripting...
Dim oFileSystem As New FileSystemObject
Dim oFile As TextStream
Dim sText As String
Dim sChar As String
Set oFile = oFileSystem.OpenTextFile("MyFile.INI", ForReading)
While Not oFile.AtEndOfStream
sText = oFile.ReadLine
sChar = Left$(sText, 1)
Select...
I have to agree with the above criticism of my "clumsy" solution. However, it was the best I could come up with in attempting a direct response to the question -- how to pass a parameter during form invocation.
In truth, there is not a direct way to do this in VB6. While my solution...
Here is one way to simulate passing a parameter into a form (let's refer to the form as "MyForm"):
1. On MyForm, create a label called ParamLabel, then set the MyLabel.Visible property to false.
2. Now, let's say you want to pass the value "ABCD" to MyForm as a parameter...
Regsvr32 has a /u command line parameter that un-registers. Try this in a DOS window (substitute "MyThing" with the name of your DLL):
regsvr32 /u MyThing.dll
Hope this helps -- WB
Ken --
Parameters can be passed into a VB application from the command line. You can do this either by starting your program from the Windows run dialog, or you can alter the "Target" property in the Windows shortcut.
For example, the Target property in the shortcut for one of my...
1. On the form that you want to call (let's call it MyForm), create a label, and name it lblParameter. Set the lblParameter.Visible property to false.
2. Place the following statement in the code that will call the form:
MyForm.lblParameter.Tag = "ValueToPass"
This will...
Sorry...I omitted the "Me" qualifier. The "If" statement should look like this:
If UCase$(TypeName(Me.Controls(llSub1))) = "TEXTBOX" then
Or, you could use With...EndWith.
Try something like this:
Dim llSub1 As Long
For llSub1 = 0 To Me.Controls.Count - 1
If UCase$(TypeName(.Controls(llSub1))) = "TEXTBOX" then
'
'<--- do whatever...
'
End IF
Next
Hope this helps -- WB
Note that although VFP 6.0 is part of Visual Studio 6.0, it is also sold separately.
VFP 7.0 will be available very soon (July, I think), but will ONLY be marketed as a separate be product -- it will no longer be sold as part of the Visual Studio suite.
If you are referring to the SQL SELECT statement, then try using SELECT DISTINCT, not DISTINCTROW.
If you have been using SQL commands in Access, you will find some differences in how similar commands are used in VFP. VFP uses a more standard syntax than Access does. In other words, VRP's SQL...
I should have read more carefully. Sunaj actually offered 2 solutions, and both will work. The 2nd solution is the one I referred to above. The 1st solution would be an alternative to using a SELECT CASE statement.
Able --
Sunaj's solution is a good one, as long as you can answer "Yes" to the following questions:
Q1. Do all of your text boxes belong to the same control array?
Q2. Does the sequence of your text boxes (within the control array) match the sequence of lines in your text file?
If...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.