|
-
Nov 24th, 2009, 01:00 AM
#1
Thread Starter
New Member
[RESOLVED] help need for creating interface
Hello everybody....
I am very new to VB6 and more over belongs to Mechanical department...
can any one solve my problem?
Code:
Sub getMatrix()
Dim newFile As String
Dim i As Integer, j As Integer
fHndl = 1
Form1.ofd.Filter = "Text file (*.txt)|*.txt"
Form1.ofd.ShowSave
newFile = Form1.ofd.FileName
Open newFile For Output As fHndl
'Write #1, "File = " & swModel.GetPathName
Write #fHndl, "Components Used:::"
Write #fHndl, ""
For i = 1 To cnt
Write #fHndl, " ->" & strPart(i)
Next i
For i = 1 To cnt - 1
For j = i + 1 To cnt
Form2.Label1.Caption = strPart(i) & " - " & strPart(j)
Form2.Show
Next j
Next i
Close #fHndl
Shell "notepad.exe " & newFile, vbNormalFocus
End Sub
Sub writeMatrix()
Write #fHndl, " +x : " & Form2.Text1
Write #fHndl, " +y : " & Form2.Text2
Write #fHndl, " +z : " & Form2.Text3
Write #fHndl, " -x : " & Form2.Text4
Write #fHndl, " -y : " & Form2.Text5
Write #fHndl, " -z : " & Form2.Text6
Unload Form2
End Sub
Here strPart will get some part names from CAD file e.g.- part1, part2, part3, etc..... from that part names I have to form pairs(i am sure about what it called) like {part1, part2}, {part1,part3}, {part2,part3}.....etc.....
and for those pairs generated i have to give(input) six different integer vaalues in the form2..........i couldnt find the mistake in this code.........
pls anyone rectify the problem
with regards
BORAD
NITW
Last edited by si_the_geek; Nov 24th, 2009 at 05:24 AM.
Reason: added code tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|