⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 日本秋月电子采用PIC16F877a单片机的PICNIC以太网适配器VB6演示程序
💻 FRM
字号:
VERSION 5.00
Object = "{65729F96-7CF3-11D4-9C0A-0090CCA09F35}#1.0#0"; "PICOCX.ocx"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1944
   ClientLeft      =   48
   ClientTop       =   324
   ClientWidth     =   7296
   LinkTopic       =   "Form1"
   ScaleHeight     =   1944
   ScaleWidth      =   7296
   StartUpPosition =   3  'Windows 偺婛掕抣
   Begin VB.TextBox Text1 
      Height          =   312
      Left            =   5640
      TabIndex        =   27
      Text            =   "10001"
      Top             =   180
      Width           =   912
   End
   Begin VB.Frame rb 
      Caption         =   "RB7"
      Height          =   972
      Index           =   7
      Left            =   300
      TabIndex        =   23
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   7
         Left            =   120
         TabIndex        =   25
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   7
         Left            =   120
         TabIndex        =   24
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB6"
      Height          =   972
      Index           =   6
      Left            =   1140
      TabIndex        =   20
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   6
         Left            =   120
         TabIndex        =   22
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   6
         Left            =   120
         TabIndex        =   21
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB5"
      Height          =   972
      Index           =   5
      Left            =   1980
      TabIndex        =   17
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   5
         Left            =   120
         TabIndex        =   19
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   5
         Left            =   120
         TabIndex        =   18
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB4"
      Height          =   972
      Index           =   4
      Left            =   2820
      TabIndex        =   14
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   4
         Left            =   120
         TabIndex        =   16
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   4
         Left            =   120
         TabIndex        =   15
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB3"
      Height          =   972
      Index           =   3
      Left            =   3660
      TabIndex        =   11
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   3
         Left            =   120
         TabIndex        =   13
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   3
         Left            =   120
         TabIndex        =   12
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB2"
      Height          =   972
      Index           =   2
      Left            =   4500
      TabIndex        =   8
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   2
         Left            =   120
         TabIndex        =   10
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   2
         Left            =   120
         TabIndex        =   9
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB1"
      Height          =   972
      Index           =   1
      Left            =   5340
      TabIndex        =   5
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   1
         Left            =   120
         TabIndex        =   7
         Top             =   240
         Width           =   612
      End
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   1
         Left            =   120
         TabIndex        =   6
         Top             =   540
         Width           =   612
      End
   End
   Begin VB.Frame rb 
      Caption         =   "RB0"
      Height          =   972
      Index           =   0
      Left            =   6180
      TabIndex        =   2
      Top             =   720
      Width           =   792
      Begin VB.OptionButton rb_off 
         Caption         =   "OFF"
         Height          =   312
         Index           =   0
         Left            =   120
         TabIndex        =   4
         Top             =   540
         Width           =   612
      End
      Begin VB.OptionButton rb_on 
         Caption         =   "ON"
         Height          =   312
         Index           =   0
         Left            =   120
         TabIndex        =   3
         Top             =   240
         Width           =   612
      End
   End
   Begin PICOCXLib.PICOCX PICOCX1 
      Left            =   6720
      Top             =   120
      _Version        =   65536
      _ExtentX        =   677
      _ExtentY        =   677
      _StockProps     =   0
      IP              =   "192.168.0.200"
      LcdPort         =   0
      ParallelPort    =   10001
      SerialPort      =   0
      Timeout         =   3
      BaudRate        =   9600
   End
   Begin VB.TextBox ip 
      Height          =   324
      Left            =   1800
      TabIndex        =   1
      Text            =   "192.168.0.200"
      Top             =   180
      Width           =   1812
   End
   Begin VB.Label Label2 
      Caption         =   "僷儔儗儖億乕僩斣崋"
      Height          =   252
      Left            =   3840
      TabIndex        =   26
      ToolTipText     =   "PICNIC偺僷儔儗儖俬乛俥億乕僩傪愝掕偟傑偡丅"
      Top             =   240
      Width           =   1572
   End
   Begin VB.Label Label1 
      Caption         =   "俬俹傾僪儗僗"
      Height          =   252
      Left            =   480
      TabIndex        =   0
      Top             =   240
      Width           =   1212
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    For i = 0 To 7
        If PICOCX1.GetDirp(PortB, i) = 1 Then ' 擖椡
            rb(i).Enabled = False
            rb_on(i).Enabled = False
            rb_off(i).Enabled = False
        Else    ' 弌椡
            rb(i).Enabled = True
            rb_on(i).Enabled = True
            rb_off(i).Enabled = True
        End If

    Next i
End Sub

Private Sub ip_Change()
    PICOCX1.ip = ip.Text
End Sub

Private Sub rb_off_Click(Index As Integer)
    PICOCX1.Outp PortB, Index, Low
End Sub

Private Sub rb_on_Click(Index As Integer)
    PICOCX1.Outp PortB, Index, High
End Sub

Private Sub Text1_Change()
    PICOCX1.ParallelPort = Text1.Text
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -