-
September 15th, 2018, 01:20 AM
#1
Make this project but i do know how can this help me
Hello all,
i create school project but some work i not understand
i draw some items ( text , label , listview , command button )
picture show ( Page 1 )
i also create txt file who name is ( resultknowledge.txt ) and save c: Drive
picture show ( Page 2 )
i used this code open txt file in text1 ( whose visible are hidden )
Code:
Private Sub Form_Load()
filenamex = "C:\resultknowledge.txt"
Dim iFile As Long
Dim strFilename As String
Dim strTheData As String
iFile = FreeFile
Open filenamex For Input As #iFile
strTheData = StrConv(InputB(LOF(iFile), iFile), vbUnicode)
Close #iFile
Text1.Text = strTheData
End Sub
i want when form1 are run or load
First roll # show in ( label1 )
and
Second roll # show in ( label2 , label3 and label4 )
next work
when student or parents enter the roll# in textbox and click find button
i used this code Find the result and enter the result in listview1
( code working good )
Code:
Private Sub Command1_Click()
If InStr(Text1.Text, Text2.Text) > 0 Then
Text3(0).Text = Text2.Text
Text3(1).Text = "Pass"
Else
Text3(0).Text = Text2.Text
Text3(1).Text = "Fail"
End If
Call Command2_Click
End Sub
Private Sub Command2_Click()
With ListView1.ListItems.Add(, , Text2.Text)
.SubItems(1) = Text3(1).Text
.SubItems(2) = Label1(4).Caption
End With
End Sub
roll # and result show good
BUT
i want when student or parents enter the roll# in textbox and click find button
Result show in listview1
roll # Result number
number show for example First , Second and Third
how can this i used code
i also attachments picture
Last edited by 2kaud; September 15th, 2018 at 02:55 AM.
Reason: Added code tags
-
September 15th, 2018, 02:56 AM
#2
Re: Make this project but i do know how can this help me
[When posting code, please use code tags so that the code is readable. Go Advanced then select the formatted code and click '#'].
Note also posted here http://www.vbforums.com/showthread.p...n-this-help-me
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
October 31st, 2018, 07:37 AM
#3
Re: Make this project but i do know how can this help me
Originally Posted by 2kaud
Thank you! Definitely helped me a lot!
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
|