vb 程序实例 适合初学者学习 在VB6.0中,每个应用程序都是从窗体(Form)开始的,窗体是构成用户接口的所有控件的容器。录活运用窗体的各项属性和操作,可以为用户设计出赏心悦目的操作界面。 1.窗体以当前屏幕分辨率全屏显示 在应用程序的编制调试过程中,用于经常用到菜单、工具条和工具框等辅助工具,一般不将窗体设为全屏显示,以便于操作;另外,当屏幕分辨率改变时,窗体可能不能正常显示,可以在窗体的Load事件中插入下列代码,即可使窗体启动时以当前屏幕分辨率全屏显示: Private Sub F
映射网络驱动器程序(VB6.0源代码编写) WNetConnectionDialog Me.hwnd, &H1,Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Set DX = New DirectX7 '建立DirectX对象 Set DI = DX.DirectInputCreate() '建立DirectInput对象 Set DI_Keyboard = DI.CreateDevice("GUID_SysKeyboard") '建立DirectInput的键盘对象 DI_Keyboard.SetCommonDataFormat DIFORMAT_KEYBOARD '设置数据格式 DI_Keyboard.SetCooperativeLevel M
VB打开POS机钱箱,源码.使用VB的MSComm控件. Private Sub cmdExit_Click() Unload Me End Sub Private Sub cmdOpen_Click() Dim sTmp As String '打开钱箱命令 sTmp = Chr(2) & Chr(77) OpenBox sTmp End Sub Private Sub cmdOpen1_Click() Dim sTmp As String '打开钱箱命令chr(27)+chr(112)+ch
内有设计窗体的图片,和运行效果图 该窗体由全图片构造,包括,标题栏,最大化、最小化、关闭按钮,一下为部分代码, Private Sub Form_load() Dim retValue As Long Image5.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") Image6.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") Image7.Picture = LoadPicture("D:
Option Explicit '函数声明 Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, _ ByVal Y As Long) As Long Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, _ ByVal hRgn As Long, ByVal bRedraw As Boolea
由于使用了一些新的函数,本程序必须在Windows2000下运行。 Option Explicit Public Declare Function GetObjectAPI Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long Public Declare Function DeleteObject Lib "gdi32" (ByVal hObj
hMenu = hMenu And Not (WS_MINIMIZEBOX) '使最小化按钮变灰 'hMenu = hMenu And Not (WS_MAXIMIZEBOX) '使最大化按钮变灰 hMenu = SetWindowLong(Me.hWnd, GWL_STYLE, hMenu) '删除MDI父窗体菜单中的最大化菜单、最小化菜单和关闭菜单
Option Explicit Dim Resolution As String '延时 Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) '电脑音量 Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" _ (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wP
VB6 100经典案例程序(源码) 1 让最大化和最小化按钮消失 声明: Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ByVal hwnd As Long ByVal nIndex As Long ByVal dwNewLong As Long As Long Private Declare Function GetWindowLong Lib &q
映射网络驱动器程序(VB6.0源代码编写) WNetConnectionDialog Me.hwnd, &H1,Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long