tnfh.net
当前位置:首页 >> vB调用 >>

vB调用

可以利用show函数,具体格式如下:(假设打开Form1,关闭Form2) Private Sub Command1_Click() Form1.Show Unload Form2 End Sub 望采纳~有问题加Q798105509

VB 调用资源文件例子: Option Explicit Dim AppEXE() As Byte Dim FileNum As Long Private Sub Test() '将自定义资源中101号资源读入数组 AppEXE = LoadResData(101, "CUSTOM") FileNum = FreeFile '以二进制方式写(生成)temp1.exe到当前目...

private sub dingyi() '在此写入自定义的程序 end sub private sub command1_click() '在此调用过程 call dingyi end sub

1.定义一个加法函数 Private Function addition(a As Double, b As Double) As Double addition = a + b End Function 2.在command1单击事件中触发,先在窗体中加入2个文本框和一个按钮command1 Private Sub Command1_Click() Debug.Print addit...

Public Class cTest Public Function cTestAdd(ByVal a As Integer, ByVal b As Integer) As Integer cTestAdd = a + b End Function End Class Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Syste...

Private Sub Command1_Click() Dim HEXstr As String, OCTstr As String Dim i As Integer, B As integer DO HEXstr = InputBox("请输入一个16进制数据") B=0 For i = 1 To Len(HEXstr) Select Case UCase(Mid(HEXstr, i, 1)) Case "0" To "9", ...

在form1中加一个命令按钮,写代码: Private Sub Command1_Click() Form1.Hide Form2.Show End Sub

你是说Public过程吗?直接call +过程名 你添加一个模块,里面写个过程,例如: Public Sub dddd() MsgBox "sss"End Sub然后在其他模块里用 call dddd 来调用

你可以用SHELL函数。如调用Windows“计算器”程序: Dim RetVal RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) 说明:①将第二个参数值设成 1,可让该程序以正常大小的窗口完成,并且拥有焦点。 ②第二个参数可为下列值: 0 窗口被隐藏,且焦点会移到隐...

被调用的过程函数和变量必须是Public定义的(就像模块一样) 调用时先写窗体名,如: 窗体名是Form1,用Public定义的过程函数和变量分别是: Public x As Long Public Sub F1() Public Function Func2() As Long 则在模块和其它窗体中引用上述定...

网站首页 | 网站地图
All rights reserved Powered by www.tnfh.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com