dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Make this project but i do know how can this help me

  1. #1
    Join Date
    Apr 2014
    Posts
    5

    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 pictureName:  schoolsheetp1.JPG
Views: 151
Size:  33.9 KBName:  schoolsheetpage2.JPG
Views: 154
Size:  37.2 KBName:  schoolsheet.jpg
Views: 152
Size:  41.8 KB
    Last edited by 2kaud; September 15th, 2018 at 02:55 AM. Reason: Added code tags

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,516

    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++17 Compiler: Microsoft VS2017 (15.9.4)

  3. #3
    Join Date
    Oct 2018
    Posts
    1

    Re: Make this project but i do know how can this help me

    Quote Originally Posted by 2kaud View Post
    [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-mewritemyessaytoday
    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)