Text1.Text到文本 VB高手进

来源:百度知道 编辑:UC知道 时间:2024/05/17 22:42:52
Public r As Integer
Public g As Integer
Public b As Integer
Public rd As Integer
Public gd As Integer
Public bd As Integer
Option Explicit
Private Const STRSERVER As String = Text1.Text
Private Sub CmdCancel_Click()
Unload Me
End Sub

Private Sub CmdOk_Click()
Dim StrOut As String

If InetLogin.StillExecuting Then Exit Sub

StrOut = "user=" & TxtUser.Text & "&password=" & TxtPassword.Text
InetLogin.Execute STRSERVER, "POST", StrOut, "Content-Type: application/x-www-form-urlencoded"
End Sub

Private Sub InetLogin_StateChanged(ByVal State As Integer)
If State = icResponseCompleted Then
Dim StrIn As String

StrIn = InetLogin.GetChunk(0, icString)
If StrIn = "ok" Then
MsgBox "恭喜您登陆成功了快去管理您的服务器吧!", vbInformation
MainS

Const 你懂这个是什么意思吗?const 声明STRSERVER为常量
为常量赋值 就得用 确切的数值 或者 字符串赋值
而text1.text 是文本框的文本属性 具有内容可变性质 不符合语法要求 所以出错~