若能感知你吧 关注:46贴子:950
  • 13回复贴,共1


1楼2013-01-07 16:18回复
    2086979752


    5楼2013-01-07 16:19
    回复
      2190824075


      8楼2013-03-02 23:55
      回复
        9楼2013-03-04 13:39
        回复
          Private Sub Command1_Click()
          Label1.Visible = False
          Text1.Visible = False
          Command1.Visible = False
          Label2.Visible = True
          Command2.Visible = True
          Command3.Visible = True
          Label2.Caption = Text1.Text + "同学,你好!祝你学好VB程序设计"
          Label2.FontSize = 16
          Label2.ForeColor = vbRed
          Label2.FontBold = True
          End Sub Private Sub Command2_Click()
          Label1.Visible = True
          Text1.Visible = True
          Command1.Visible = True
          Label2.Visible = False
          Command2.Visible = False
          Command3.Visible = False End Sub Private Sub Command3_Click()
          End
          End Sub Private Sub Form_Load()
          Label2.Visible = False
          Command2.Visible = False
          Command3.Visible = False End Sub


          10楼2013-03-07 17:34
          回复
            《蜀相》
            曲:林俊杰
            词:雨霁天青
            胸怀锦绣破万卷
            万里江山隽秀在你眉间
            或许今生最安处
            卧龙岗下半亩田
            说好要归去 为何你一去 便不返
            待早梅发斜窗前
            踏白雪三顾蹄声频繁
            满腔碧血当酬知己
            隆中对出天下宽
            丈夫生此世 兴邦继绝世 风云翻
            宏论傲惊三吴江川
            火生东南焚尽千帆
            纵庙堂舌灿珠莲 生灵涂炭 几时安
            酒奠故人当风临岸
            三千青丝任江涛拍乱
            风流如云烟过眼
            青史简书添几转
            握山河旧豪杰换
            荆州入彀蜀道蜿蜒连绵
            夷陵岸连营烧断
            白帝城高月色寒
            半世君臣分 中道绝分 哽难言
            识幼主孱朝堂变
            整伦常按剑只手回天
            平南疆初策马扬鞭
            七擒七纵若等闲
            出师一表显 问千载谁堪 伯仲间
            街亭恨败旌麾血染
            至交新斩泪洒军前
            养生息厉兵秣马
            再遣征鞍度祁山
            出师未捷魂梦杳然
            动地悲风过五丈荒原
            志未竟此生犹憾
            身后无人可**
            诫子书存宁静致远
            千秋道义题祠上匾
            谁又道宽严皆误
            自古知兵非好战
            兴衰存亡独担双肩
            斯人不复令英雄扼腕
            行路难我自清廉
            忠名长不没人间
            回眸但笑江湖远 功过后人传


            12楼2013-05-12 19:39
            回复
              Private Sub Form_Load()
              TxtFile = "": txtFilename = ""
              Combol.AddItem "*.Txt"
              Combol.AddItem "*.Dat"
              Combol.Text = "*.Txt"
              End Sub
              Private Sub Dir1_Change()
              File1.Path = Dir1.Path
              End Sub Private Sub Drive1_Change()
              Dir1.Path = Drive1.Drive
              End Sub
              Private Sub File1_Click()
              If Right(File1.Path, 1) = "\" Then
              txtFilename = File1.Path & File1.FileName
              Else
              txtFilename = File1.Path & "\" & File1.FileName
              End If
              End Sub Private Sub Combo1_Change()
              File1.Pattern = Combol1.Text
              End Sub


              13楼2013-05-30 17:21
              回复

                Private Sub Command1_Click()
                Dim InputStr As String
                TxtFile = ""
                If txtFilename <> "" Then
                Open txtFilename For Input As #1
                Do While Not EOF(1)
                Line Input #1, InputStr
                TxtFile = TxtFile & InputStr & Chr(13) & Chr(10)
                Loop
                Close #1
                End If
                End Sub


                14楼2013-05-30 17:28
                回复

                  Private Sub Command2_Click()
                  Open txtFilename For Output As #1
                  Print #1, TxtFile
                  Close #1
                  File1.Refresh
                  End Sub
                  Private Sub Command3_Click()
                  Kill txtFilename
                  txtFilenanme.Text = ""
                  TxtFile = ""
                  File1.Refresh End Sub


                  15楼2013-05-30 17:32
                  回复
                    Private Sub Form_Load()
                    On Error Resume Next
                    Dim Handle As Integer, Filetext As String
                    Handle = FreeFile
                    Open "C:\MYDIR\DATA.TXT" For Binary As #Handle
                    Filetext = Space(LOF(Handle))
                    Get #Handle, , Filetext
                    Close #Handle '读取文件
                    Dim A As Long, B As Long
                    A = FileLen("C:\MYDIR\DATA.TXT")
                    B = Len(Replace(Filetext, "$", ""))
                    '计算差值
                    Handle = FreeFile
                    Open "C:\Mydir\res.txt" For Output As #Handle
                    Print #Handle, A - B
                    Close #Handle
                    '保存
                    End Sub


                    16楼2013-05-30 17:38
                    回复

                      Private Sub Form_Load()TxtFile = "": txtFilename = ""End SubPrivate Sub Dir1_Change()File1.Path = Dir1.PathEnd SubPrivate Sub Drive1_Change()Dir1.Path = Drive1.DriveEnd SubPrivate Sub File1_Click()If Right(File1.Path, 1) = "\" ThentxtFilename = File1.Path & File1.FileNameElsetxtFilename = File1.Path & "\" & File1.FileNameEnd IfEnd Sub
                      Private Sub Combo1_Change()File1.Pattern = Combol1.TextEnd SubPrivate Sub Command1_Click()Dim InputStr As StringTxtFile = ""If txtFilename <> "" ThenOpen txtFilename For Input As #1Do While Not EOF(1)Line Input #1, InputStrTxtFile = TxtFile & InputStr & Chr(13) & Chr(10)LoopClose #1End IfEnd SubPrivate Sub Command2_Click()Open txtFilename For Output As #1Print #1, TxtFileClose #1File1.RefreshEnd SubPrivate Sub Command3_Click()Kill txtFilenametxtFilenanme.Text = ""TxtFile = ""File1.RefreshEnd Sub


                      17楼2013-05-30 21:13
                      回复
                        Option Explicit
                        Private Sub Drive1_Change()
                        Dir1.Path = Drive1.Drive
                        End SubSub dirl_Change()
                        File1.Path = Dir1.Path
                        End Sub
                        Private Sub File1_Click()
                        Dim st As String, Fpath As StringText1.Text = ""
                        If Right(Dir1.Path, 1) = "\" Then
                        Fpath = Dir1.Path & File1.FileNameElse
                        Fpath = Dir1.Path & "\" & File1.FileName
                        End If
                        Open Epath For Input As #1
                        Do While Not EOF(1)
                        Line Input #1, st
                        Text1.Text = Text1.Text + st + vbCrLfLoopClose #1
                        End Sub
                        Private Sub From_Load()
                        CboType.AddItem "所有文件"
                        CboType.AddItem "窗体文件"
                        CboType.AddItem "文本文件"
                        CboType.ListIndex = 2
                        End Sub
                        Private Sub cboType_Click()
                        Dim FileType As String
                        Select Case CboType.TextCase "所有文件(*.*)"
                        FileType = "*.*"
                        Case "窗体文件(*.*)"
                        FileType = "*.Frm"
                        Case "文本文件(*.Txt)"
                        FileType = "*.Txt"
                        End Select
                        File1.Pattern = FileType
                        End Sub


                        18楼2013-05-30 22:23
                        回复
                          Option Explicit
                          Private Sub Drive1_Change()
                          Dir1.Path = Drive1.Drive
                          End Sub
                          Sub Dir1_Change()
                          File1.Path = Dir1.Path
                          End Sub
                          Private Sub File1_Click()
                          Dim st As String, Fpath As StringText1.Text = ""
                          If Right(Dir1.Path, 1) = "\" Then
                          Fpath = Dir1.Path & File1.FileNameElse
                          Fpath = Dir1.Path & "\" & File1.FileName
                          End If
                          Open Fpath For Input As #1
                          Do While Not EOF(1)
                          Line Input #1, st
                          Text1.Text = Text1.Text + st + vbCrLfLoopClose #1
                          End Sub
                          Private Sub From_Load()
                          CboType.AddItem "所有文件"
                          CboType.AddItem "窗体文件"
                          CboType.AddItem "文本文件"
                          CboType.ListIndex = 2
                          End Sub
                          Private Sub cboType_Click()
                          Dim FileType As String
                          Select Case CboType.TextCase "所有文件(*.*)"
                          FileType = "*.*"
                          Case "窗体文件(*.*)"
                          FileType = "*.Frm"
                          Case "文本文件(*.Txt)"
                          FileType = "*.Txt"
                          End Select
                          File1.Pattern = FileType
                          End Sub


                          19楼2013-05-30 22:41
                          回复
                            Private Sub Form_Click()
                            Dim INPUTDATA As String, COUNT As Integer
                            Open "C;\MYDIR\RES.TXT" For Input As #1
                            Do While Not EOF(1)
                            INPUTDATA = Input(1, #1)
                            If INPUTDATA = "S" Then
                            COUNT = COUNT + 1
                            End If
                            Loop
                            Close #1
                            Open "C;\MYDIR\RES.TXT" For Output As #1
                            End Sub


                            20楼2013-05-31 12:57
                            回复