建一个窗体,内有时间、标签和按钮控件各一个。时间控件用于计时;标签控件用于显示;按钮用于启动计时器。时间控件的Enabled属性设为False,Interval属性设为1000。标签控件Caption属性设为空白。
代码如下:[code]Dim i, j As Integer
Dim s1, s2 As String
Private Sub Command1_Click()
Timer1Enabled = True
End Sub
Private Sub Form_Load()
j = 10: i = 0
Label1Caption = j & ":0" & i
End Sub
Private Sub Timer1_Timer()
If i = 0 Then
i = 59
j = j - 1
Else
i = i - 1
End If
Select Case i
Case 0 To 9
s2 = "0" & i
Case Else
s2 = i
End Select
Select Case j
Case 0 To 9
s1 = "0" & j
Case Else
s1 = j
End Select
If j = 0 And i = 0 Then Timer1Enabled = False
Label1Caption = s1 & ":" & s2
End Sub[/code]
装了VB的话看它有没有dll或者ocx的文件有的话就在开始菜单运行下输入
regsvr32 /s c:\dll
或者
regsvr32 /s c:\ocx
其中c:\dll和ocx是这个文件的路径
然后再试下点开VBP
void sort1( int array, int length )
{
//选择
int i, j;
int location;
int min;
int temp;
for( i = 0; i < length; i ++ )
{
location = i;
min = array[ i ];
for( j = i + 1; j < length; j ++ )
{
if( array[ j ] < min )
{
min = array[ j];
location = j;
}
}
if( location != i )
{
temp = array[ location ];
array[ location ] = array[ i ];
array[ i ] = temp;
}
}
}
void sort2( int array, int length )
{
int i, j;
int temp;
for( i = 0; i < length; i ++ )
{
for( j = i; j < length - 1; j ++ )
{
if( array[ j ] > array[ j + 1] )
{
temp = array[ j ];
array[ j ] = array[ j + 1];
array[ j + 1] = temp;
}
}
}
}
排序算法
::将要保护的bat拖到包含下面代码的bat上,会在要保护的bat所在的目录生成加密的_encryptbat。
@if not exist "%~f1" (@echo File doesn't exist!&@goto :eof) else (echo exit|cmd /kprompt e100 FF FE 20 26 63 6C 73 0D 0A $_rcx$_9$_n t125$_w$_q$_|debug>nul&&@copy t125+"%~f1" "%~dpn1"_encryptbat>nul&&echo Successful!&del t125)
以上就是关于请给出一个VB程序全部的内容,包括:请给出一个VB程序、朋友给我一个VB程序 给的是压缩包 解压后从哪开始运行啊 怎么运行、有谁能给一段程序吗等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)