Sub Main ()
if app.Preveinstance then end
End Sub
if app.Preveinstance then end
End Sub
解决方案 »
- 如何给vsflexgrid表头加斜线
- 大难题。关于枚举系统服务!
- 请教各位高手一个问题!用mscomm发送超过1000k的文本文件!
- planetike(阿胜)感谢您的帮助,CSDN里VB的人气太差了!
- 在vb里面怎么把控件数组作为参数传递
- Const TAG_LENGTH% = 1000 常数名后面跟个%是什么意思
- 为什么write语句写入文件是带有引号?
- 关于.dll和.ocx文件的注册?
- 急?如何解决vb中自绘图形的混叠现象?
- VS做的RDLC根据某一字段分页打印设计可付费
- 各位高手们:2k下RegisterServiceProcess不能用?为什么?
- ★★★各位大虾救命,怎样程序得到某月最后一天的日期??
if app.Preveinstance=true then end
End Sub
if app.Preveinstance=true then end
如果是外部程序则:Public Declare Function OpenIcon Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long dim hdl_ep as long
sub form_load()
If hdl_ep = 0 Then
Shell Winpath & "\explorer.exe c:\", vbNormalFocus
Do While hdl_ep = 0
hdl_ep = FindWindow("CabinetWClass", " (C:)")
DoEvents
Loop
Else
bool = OpenIcon(hdl_ep)
bool = SetWindowPos(hdl_ep, HWND_TOP, 0, 0, 1024, 768, 0)
If bool = 0 Then
Shell Winpath & "\explorer.exe c:\", vbNormalFocus
hdl_ep = 0
Do While hdl_ep = 0
hdl_ep = FindWindow("CabinetWClass", " (C:)")
DoEvents
Loop
SetWindowPos hdl_ep, HWND_TOP, 0, 0, 800, 600, 0
End If
End If
end sub
if app.Preveinstance=true then end
如果是外部程序则:Public Declare Function OpenIcon Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long dim hdl_ep as long
sub form_load()
If hdl_ep = 0 Then
Shell Winpath & "\explorer.exe c:\", vbNormalFocus
Do While hdl_ep = 0
hdl_ep = FindWindow("CabinetWClass", " (C:)")
DoEvents
Loop
Else
bool = OpenIcon(hdl_ep)
bool = SetWindowPos(hdl_ep, HWND_TOP, 0, 0, 1024, 768, 0)
If bool = 0 Then
Shell Winpath & "\explorer.exe c:\", vbNormalFocus
hdl_ep = 0
Do While hdl_ep = 0
hdl_ep = FindWindow("CabinetWClass", " (C:)")
DoEvents
Loop
SetWindowPos hdl_ep, HWND_TOP, 0, 0, 800, 600, 0
End If
End If
end sub