ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Ãö©ó §å¦¸³ÐÀÉ®× ¤Î §å¦¸Åª¨ú µo¥Í¸Þ²§ªº¨Æ±¡

[µo°Ý] Ãö©ó §å¦¸³ÐÀÉ®× ¤Î §å¦¸Åª¨ú µo¥Í¸Þ²§ªº¨Æ±¡

¥»©«³Ì«á¥Ñ mark15jill ©ó 2013-3-11 16:51 ½s¿è

¸Ü»¡¤µ¤Ñ¬ðµM­n¥Î¨ì§å¦¸³ÐÀɮסA¨Ã¦b¸Ì­±¥[µù¦r²´  µM«á¿ï¾ÜÀÉ®×Ū¨ú
©ó¬O©O ¤p¤p´ú¸Õ¤F¤@¤U
»®µMµo²{ ¤@¥ó¸Þ²§ªº¨Æ±¡
·Ó²z¨Ó»¡  «ç³ÐÀɮתº¡A´NÀ³¸Ó«çŪ¨úÀÉ®×

¨Ò¦p ¤µ¤Ñ¦³10ÀÉ®× ¸ô®|¬°  C:\tp\1.txt ~ C:\tp\10.txt
µ²ªG
³Ð¬O³Ð¦¨¥\¤F
¦p¤U¹Ï


¦ý¬O©O §PÂ_¬O§PÂ_¥X¨Ó¡A«oÅܤÀ¬q¤F....
¦ý¬O µ{¦¡½X¤º¨Ã¨S¦³±N¸ô®|¤À¬qªº²Å¸¹.....



­þ¦ì¤j®v¯àÀ°¸Ñµª= =??
­ì©l¸ô®|
            w = File.CreateText("C:\tp\" & aks & ".txt")

µ{¦¡½X¤º Chr(10) ¥u¦³¨â­Ó¦a¤è
1.ButtonªºText
2.        '        MsgBox("C:\tp\" & "¦¹¼Æ­È¬°¡G" & Me.lis1.Text & ".txt" & Chr(10) & "¦s¦b")


¥H¤U¬° ­ì©l½X

'¥H¤Uµ{¦¡½X¬° VB2010½s¼g¡A¤£½T©wVB6.0 ¬O§_¾A¥Î...
'¦pªG­n¥Îªº¸Ü¡Aª½±µ±N¥H¤Uµ{¦¡½X§¹¾ã½Æ»s
'¤£¥Î¥t¥~³Ð¥ß¤¸¥ó¡A¤w¦bµ{¦¡½X¤º³Ð¥ß
Imports System.IO
Public Class Form1
    Dim aks As String
    Dim bu1 As New Button
    Dim com1 As New ComboBox
    Dim lis1, lis2 As New ListBox
    Dim lab1 As New Label
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With Me
            .Controls.Add(bu1)
            .Controls.Add(com1)
            .Controls.Add(lis1)
            .Controls.Add(lis2)
            .Controls.Add(lab1)
        End With
        With bu1
            .Width = 200
            .Height = 50
            .Location = New Point(Me.Width - 250, 10)
            .Text = "³Ð¥ß+¼g¤J" & Chr(10) & "Ū¨ú+List¦C¥X"
        End With
        With lab1
            .AutoSize = False
            .Location = New Point(bu1.Location.X, (bu1.Location.Y + bu1.Height) + 10)
            .Width = bu1.Width
            .Height = bu1.Height
            .BackColor = Color.Salmon
            .BorderStyle = BorderStyle.Fixed3D
        End With
        With com1
            .Width = 150
            .Height = 50
            .Location = New Point(10, 10)
            .Visible = False
        End With
        With lis1
            .Location = New Point((com1.Width + com1.Location.X) + 10, 10)
            .Height = Me.Height - 100
            .Width = 200
        End With
        With lis2
            .Location = New Point((lis1.Width + lis1.Location.X) + 10, 10)
            .Height = Me.Height - 100
            .Width = 250
        End With
        AddHandler bu1.Click, AddressOf Button1_Click
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        '­YŪ¼g¥\¯à­n¤À¶} Ū°Ï°ì­n¥t¥~+
        'dim kk1 as string

        '¼g°Ï°ì
        Dim w As StreamWriter
        Dim kk1 As String
        For akk = 1 To 500
            aks = "¦¹¼Æ­È¬°¡G" & akk
            com1.Items.Add(aks)
            kk1 = aks
            w = File.CreateText("C:\tp\" & aks & ".txt")
            w.WriteLine(kk1)
            w.Close()
        Next

        'Ū°Ï°ì
        Dim r As StreamReader
        For akk = 1 To 500
            aks = "¦¹¼Æ­È¬°¡G" & akk
            kk1 = aks
            r = New StreamReader("C:\tp\" & aks & ".txt")
            Do While Not r.EndOfStream
                lis1.Items.Add(r.ReadToEnd)
            Loop
            r.Close()
        Next
        AddHandler lis1.SelectedIndexChanged, AddressOf ListBox1_SelectedIndexChanged

    End Sub
    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        'Ū°Ï°ì
        Dim kee As String
        Dim r As StreamReader

        MsgBox(lis1.Text)
        Dim FileExists As Boolean
        'Dim filePath = "C:\tp\" & "¦¹¼Æ­È¬°¡G1" & ".txt"
        Dim filePath = "C:\tp\" & lis1.Text & ".txt"

        FileExists = My.Computer.FileSystem.FileExists(filePath)


        If FileExists = False Then


            lab1.Text = ("C:\tp\" & lis1.Text & ".txt" & "ÀÉ®× ¤£¦s¦b")
        Else
            lab1.Text = ("C:\tp\" & lis1.Text & ".txt" & "ÀÉ®× ¦s¦b")
        End If
        '        If Dir("C:\tp\¦¹¼Æ­È¬°¡G" & Me.lis1.Text & ".txt", FileAttribute.Directory) <> "" Then
        '        MsgBox("C:\tp\" & "¦¹¼Æ­È¬°¡G" & Me.lis1.Text & ".txt" & Chr(10) & "¦s¦b")
        '        End If
    End Sub
End Class

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

¦^´_ 1# mark15jill


    §ä¨ì°ÝÃDÂI.. ¦ý¤]µo²{°ÝÃDÂI= ="

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD