首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看VB.net
Dim W1() As Long
Dim Idx1 As Double
Dim LB1 As Double
W1 = Array(0.433, 0.572, 0.65, 0.724, 0.75, 0.866, 0.95, 1.008, 1.108, 1.157, 1.22, 1.302, 1.41, 1.5, 1.524, 1.553, 1.63, 1.65, 1.732, 1.747, 1.78, 1.8, 1.9, 2, 2.02, 2.032, 2.12, 2.217, 2.35, 2.36, 2.45, 2.5, 2.595, 2.73, 2.886, 2.995, 3.09, 3.177, 3.3, 3.468, 3.56, 3.58, 3.666, 3.9, 4.091, 4.4, 4.773, 5.35, 5.525, 5.7, 6.007, 6.3, 6.9, 6.91, 7.55, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 13, 14, 16, 20)
For LB1 = 1 To UBound(W1)
If Abs(B1 - W1(LB1)) < Abs(B1 - W1(Idx1)) Then Idx1 = LB1
Next
阅读全部 | 朱龙飞 贴于 2019年12月7日 10:33     hide bbsi
Dim Lockappid As String
        Dim Lockmchid As String
        Dim Idkey As String
        Dim IdkeyLock As Integer
        Dim TotalFee As String
        Dim OrdNum As String
        Dim AuthCode As String
        Dim outinf As IntPtr
        Dim real As Integer

        Lockappid = Trim(WXGZH.Text)                            '加密后的微信公众账号
        Lockmchid = Trim(WXSFH.Text)                            '加密后的商户号
......................
阅读全部 | zhangjin7422 贴于 2019年9月21日 09:37     hide bbsi
Sub cal_24k()
Dim sheet_name As String
Dim r1, flag As Integer

sheet_name = InputBox("please input sheetname")
flag = 0

For i = 1 To Sheets.Count
 If sheet_name = Sheets(i).Name Then
 flag = 1
  Exit For
  End If
......................
阅读全部 | qunxingw 贴于 2019年8月28日 10:02     hide bbsi
Public Class frmLogin
    Dim cnt As Integer
    Dim fd As Integer

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cbotype.SelectedIndexChanged

    End Sub

    Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: 这行代码将数据加载到表“VB.userinformation”中。您可以根据需要移动或删除它。
        Me.UserinformationTableAdapter.Fill(Me.VB.userinformation)
        Cbotype.SelectedIndex = 0
......................
阅读全部 | 李胜男 贴于 2019年6月20日 22:56     hide bbsi
Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: 这行代码将数据加载到表“VB.userinformation”中。您可以根据需要移动或删除它。
        Me.UserinformationTableAdapter.Fill(Me.VB.userinformation)
        Cbotype.SelectedIndex = 0
        If userid = "" Then
            cnt = 0
            txtuser.Text = "李浩波"
            txtpwd = ""
        End If
    End Sub
阅读全部 | 李胜男 贴于 2019年6月20日 22:56     hide bbsi
Private Sub Command l_ClickO
Dim key As String
Dim a As Integer, s As Integer, ans As Integer, ch As String
key = Textl .Text
i=l
Do While i<=Len(key)
ch=Mid(key, i ,1)
If ch >= "0" And ch <= "9,, Then
                                                        
Else
Exit Do 
End If
......................
阅读全部 | h2918228916 贴于 2019年6月7日 20:06     hide bbsi
Dim Rs As Integer, R0 As Integer, La As Integer, Lb As Integer, Lc As Double, Rb As Double, Z As Double
Rs = 9: R0 = 16: La = 22: Lb = 38: Lc = 38.992: Rb = 16.5: Z = -0.781
Const Pi = 3.1415926
Const Hmax = 8.78 / (13.5 ^ 2 / 2 / 8.5 ^ 2)

Dim W0 As Double, B0 As Double, Bd As Double, Wd As Double, Rd As Double, Kd As Double, Ymax As Double
W0 = Pi / 2 - Atn(((La ^ 2 + Lc ^ 2 - (R0 + Rs) ^ 2) / (2 * La * Lc)) / Sqr(1 - ((La ^ 2 + Lc ^ 2 - (R0 + Rs) ^ 2) / (2 * La * Lc)) ^ 2))
B0 = Atn(((Rb + Z) / Lb) / Sqr(1 - ((Rb + Z) / Lb) ^ 2))
Bd = Atn(((Rb + Z - Hmax) / Lb) / Sqr(1 - ((Rb + Z - Hmax) / Lb) ^ 2))
Wd = W0 + (B0 - Bd)
Rd = Sqr(La ^ 2 + Lc ^ 2 - 2 * La * Lc * Cos(Wd))
Kd = Pi / 2 - Atn(((Rd ^ 2 + Lc ^ 2 - La ^ 2) / (2 * Rd * Lc)) / Sqr(1 - ((Rd ^ 2 + Lc ^ 2 - La ^ 2) / (2 * Rd * Lc)) ^ 2))
......................
阅读全部 | VB小萌新 贴于 2018年7月26日 10:56     hide bbsi
本人新手,这是一个登录界面,ado控件已经连接数据库用户表,下面是我的代码
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from 用户表 where 用户账号 ='" & Text1.Text & "' and 用户密码 ='" & Text2.Text & "'"
Adodc1.Refresh
 If Adodc1.Recordset.RecordCount = 1 Then
 Form1.Hide
 Form2.Show
 Else
 MsgBox ("请确认账号或密码!")
 End If
End Sub
运行的时候总显示
......................
阅读全部 | huluoB 贴于 2018年1月5日 13:53     hide bbsi
Sub 常见属性()

MsgBox Application.Version
ActiveCell.Value = 250
阅读全部 | 江小白 贴于 2017年9月2日 23:09     hide bbsi
上一页 2 3 4 5 6 7 8 9 10 11 下一页