²é¿´: 1266  |  »Ø¸´: 13

chelator

ľ³æ (СÓÐÃûÆø)

´úÂëÈçÏÂ
Dim a() As Single
Dim LineNum  As Long

Private Sub Command1_Click()

Dim i, j, k As Long

Dim TextLine As String
Dim EachText() As String
LineNum = 0
Open App.Path & "\data.txt" For Input As #1
Do While Not EOF(1)
   Line Input #1, TextLine
   LineNum = LineNum + 1
Loop
Close #1

ReDim a(LineNum - 1, 2)

Open App.Path & "\data.txt" For Input As #1

i = 0
Do While Not EOF(1)
    Line Input #1, TextLine
    EachText = Split(TextLine, " ", -1, vbTextCompare)
    k = 0
    For j = 0 To UBound(EachText)
        If EachText(j) <> "" Then
            a(i, k) = CSng(EachText(j))
            k = k + 1
        End If
    Next
   i = i + 1
Loop
Close #1

Command2.Enabled = True

MsgBox ("¶ÁÈ¡Êý¾Ý³É¹¦"
End Sub

Private Sub Command2_Click()
Dim Xmax, Xmin, Ymax, Ymin, Zvalue As Single
Dim Count As Long

If IsNumeric(TextXMax.Text) And IsNumeric(TextXMin.Text) And _
IsNumeric(TextYMax.Text) And IsNumeric(TextYMin.Text) And _
IsNumeric(TextZ.Text) Then
    Xmax = CSng(TextXMax.Text)
    Xmin = CSng(TextXMin.Text)
    Ymax = CSng(TextYMax.Text)
    Ymin = CSng(TextYMin.Text)
    Zvalue = CSng(TextZ.Text)
   
    If Xmax < Xmin Then
        MsgBox ("X×î´ó×îСֵÓÐÎó"
        Exit Sub
    End If
   
    If Ymax < Ymin Then
        MsgBox ("Y×î´ó×îСֵÓÐÎó"
        Exit Sub
    End If
   
   
    Open App.Path & "\result.txt" For Output As #1
        For i = 0 To LineNum - 1
            If a(i, 0) <= Xmax And a(i, 0) >= Xmin And _
                a(i, 1) <= Ymax And a(i, 1) >= Ymin And _
                a(i, 2) <> Z Then
                Print #1, a(1, 0) & "  " & a(i, 1) & "  " & a(i, 2)
                Count = Count + 1
            End If
        Next
    Close #1
   
    MsgBox ("ÓÐ" & CStr(Count) & "ÐÐÊä³ö"
Else
    MsgBox ("ÇëÊäÈëÊý×Ö"
End If
End Sub
11Â¥2013-04-11 09:31:38
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

chelator

ľ³æ (СÓÐÃûÆø)

ÆäÖÐ
Xmax = CSng(TextXMax.Text)
    Xmin = CSng(TextXMin.Text)
    Ymax = CSng(TextYMax.Text)
    Ymin = CSng(TextYMin.Text)
    Zvalue = CSng(TextZ.Text)

TextXMax ÊÇÄãµÄTextBox£¬ÎÒÖØÐÂÃüÃûÁË¡£
12Â¥2013-04-11 09:33:27
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

chelator

ľ³æ (СÓÐÃûÆø)

´íÎóÊý¾ÝµÄÐкÅ

1771
2158
3453
4806
5256
5446
8162
8549
9844
12091
12478
13773
13Â¥2013-04-11 09:33:57
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

zjzc511

Òø³æ (СÓÐÃûÆø)

´úÂëÈçÏÂ
Dim a() As Single
Dim LineNum  As Long
Private Sub Command1_Click()
Dim i, j, k As Long
Dim TextLine As String
Dim EachText() As String
LineNum = 0
Open App.Path & "\data.txt" For Input As #1
Do While Not EOF(1)
   Line Input #1, TextLine
   LineNum = LineNum + 1
Loop
Close #1
ReDim a(LineNum - 1, 2)
Open App.Path & "\data.txt" For Input As #1
i = 0
Do While Not EOF(1)
    Line Input #1, TextLine
    EachText = Split(TextLine, " ", -1, vbTextCompare)
    k = 0
    For j = 0 To UBound(EachText)
        If EachText(j) <> "" Then
            a(i, k) = CSng(EachText(j))
            k = k + 1
        End If
    Next
   i = i + 1
Loop
Close #1
Command2.Enabled = True
MsgBox ("¶ÁÈ¡Êý¾Ý³É¹¦"
End Sub
Private Sub Command2_Click()
Dim Xmax, Xmin, Ymax, Ymin, Zvalue As Single
Dim Count As Long
If IsNumeric(TextXMax.Text) And IsNumeric(TextXMin.Text) And _
IsNumeric(TextYMax.Text) And IsNumeric(TextYMin.Text) And _
IsNumeric(TextZ.Text) Then
    Xmax = CSng(TextXMax.Text)
    Xmin = CSng(TextXMin.Text)
    Ymax = CSng(TextYMax.Text)
    Ymin = CSng(TextYMin.Text)
    Zvalue = CSng(TextZ.Text)
   
    If Xmax < Xmin Then
        MsgBox ("X×î´ó×îСֵÓÐÎó"
        Exit Sub
    End If
   
    If Ymax < Ymin Then
        MsgBox ("Y×î´ó×îСֵÓÐÎó"
        Exit Sub
    End If
   
   
    Open App.Path & "\result.txt" For Output As #1
        For i = 0 To LineNum - 1
            If a(i, 0) <= Xmax And a(i, 0) >= Xmin And _
                a(i, 1) <= Ymax And a(i, 1) >= Ymin And _
                a(i, 2) <> Z Then
                Print #1, a(1, 0) & "  " & a(i, 1) & "  " & a(i, 2)
                Count = Count + 1
            End If
        Next
    Close #1
   
    MsgBox ("ÓÐ" & CStr(Count) & "ÐÐÊä³ö"
Else
    MsgBox ("ÇëÊäÈëÊý×Ö"
End If
End Sub
23
14Â¥2014-05-31 21:06:44
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ huzijun888 µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 0703 ÎïÀí»¯Ñ§µ÷¼Á +3 ÎÒ¿ÉÒÔÉϰ¶µÄ¶Ô 2026-03-13 5/250 2026-03-16 10:50 by ÎÒ¿ÉÒÔÉϰ¶µÄ¶ÔÂ
[¿¼ÑÐ] 0856Çóµ÷¼Á +3 ÁõÃÎ΢ 2026-03-15 3/150 2026-03-16 10:00 by houyaoxu
[¿¼ÑÐ] »·¾³¹¤³Ìµ÷¼Á +3 ´ó¿Édigkids 2026-03-16 3/150 2026-03-16 09:09 by DDDddddmm
[¿¼ÑÐ] 326Çóµ÷¼Á +4 Éϰ¶µÄСÆÏ 2026-03-15 5/250 2026-03-16 08:39 by Linda Hu
[¿¼ÑÐ] µ÷¼Á +8 µ÷¼ÁµÄ¿¼ÑÐѧÉú 2026-03-09 8/400 2026-03-15 22:14 by Winj1e
[»ù½ðÉêÇë] ¹ú×Ô¿ÆÃæÉÏ»ù½ð×ÖÌå +4 iwuli 2026-03-12 5/250 2026-03-15 17:07 by ·çÔÆÎÞÀá
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤ 323 Ó¢Ò»+Êý¶þ+Îﻯ£¬Ò»Ö¾Ô¸£º¹þ¹¤´ó ±¾È˱¾¿ÆË«Ò»Á÷ +4 ×ÔÓɵÄ_·ÉÏè 2026-03-13 5/250 2026-03-14 19:39 by hmn_wj
[»ù½ðÉêÇë] ÃæÉϺÍÇà»ùÒ»ÑùÏÞ30Ò³²»ºÏÀí +5 wowsunflower 2026-03-10 7/350 2026-03-14 17:21 by kingkocxr
[¿¼ÑÐ] 308 085701 ËÄÁù¼¶ÒѹýÇóµ÷¼Á +7 ÎÂÇÇÇÇÇÇÇÇ 2026-03-12 14/700 2026-03-14 10:49 by JourneyLucky
[¿¼ÑÐ] ¿¼ÑвÄÁÏÓ뻯¹¤£¬Çóµ÷¼Á +8 Ï·¾«µ¤µ¤µ¤ 2026-03-09 8/400 2026-03-14 01:14 by JourneyLucky
[¿¼ÑÐ] 312Çóµ÷¼Á +6 İå·Ï£ 2026-03-10 6/300 2026-03-14 00:40 by JourneyLucky
[¿¼ÑÐ] 308Çóµ÷¼Á +3 ÊÇLupa°¡ 2026-03-10 3/150 2026-03-14 00:30 by JourneyLucky
[¿¼ÑÐ] 318Çóµ÷¼Á +3 Àîйâ 2026-03-10 3/150 2026-03-14 00:21 by JourneyLucky
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤£¨0856£©304ÇóBÇøµ÷¼Á +6 Çñgl 2026-03-12 7/350 2026-03-13 23:24 by Çñgl
[¿¼ÑÐ] ¡¾¿¼Ñе÷¼ÁÇóÊÕÁô¡¿ +3 Ceciilia 2026-03-11 3/150 2026-03-13 20:18 by JourneyLucky
[¿¼ÑÐ] 310Çóµ÷¼Á +3 ¡¾ÉÏÉÏÇ©¡¿ 2026-03-11 3/150 2026-03-13 16:16 by JourneyLucky
[¿¼ÑÐ] ²ÄÁÏ301·ÖÇóµ÷¼Á +5 Liyouyumairs 2026-03-12 5/250 2026-03-13 14:42 by JourneyLucky
[¿¼ÑÐ] 070303Ò»Ö¾Ô¸Î÷±±´óѧѧ˶310ÕÒµ÷¼Á +3 dÈçÔ¸Éϰ¶ 2026-03-12 5/250 2026-03-13 10:56 by houyaoxu
[¿¼ÑÐ] ¹þ¹¤´ó²ÄÁÏ324Çóµ÷¼Á +6 ãÆÐñ¶« 2026-03-10 8/400 2026-03-10 22:49 by ÐÇ¿ÕÐÇÔÂ
[¿¼ÑÐ] ÊÕµ÷¼Á +7 µ÷¼ÁµÄ¿¼ÑÐѧÉú 2026-03-10 7/350 2026-03-10 17:57 by Âó²èÌÀÔ²
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û