上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: 在网上看到一段程序,没有使用vba编程将sql数据倒入excel表格,速度极快,贴出于大家共赏.其主要思想是:将EXCEL作为一个数据库使用,它的名字就是数据库的名字,工作表就是一张数据库中的表。建立一个工程,引用dao,添加command1,粘贴一下代码'声明API函数Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long' 阅读全文
posted @ 2014-04-03 13:59 Spacecup 阅读(767) 评论(0) 推荐(0) 编辑
摘要: 请看下例:>>步骤1----建立新工程,在窗体上放置一个CommandButton按钮.设置其Caption="打开">>步骤2----编写如下代码:Private Declare Function mciSendString Lib "winmm.dll" Alias _ "mciSendStringA" (ByVal lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength As Long, _ ByVa 阅读全文
posted @ 2014-04-03 13:56 Spacecup 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal ProcessID As Long, ByVal ServiceFlags As Long) As LongPrivate Declare Function GetCurrentProcessId Lib "kernel32" () As Long'请你试试 Ctrl+Alt+Del 是不是你的程序隐藏了Private Sub Command1_Click()i = RegisterServiceProces 阅读全文
posted @ 2014-04-03 13:55 Spacecup 阅读(404) 评论(0) 推荐(0) 编辑
摘要: '--------------------------------------------------------------------------------'把下面放到模块中Option ExplicitPublic Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" _(ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As LongPublic Declare Func 阅读全文
posted @ 2014-04-03 13:54 Spacecup 阅读(683) 评论(0) 推荐(0) 编辑
摘要: '引用控件 Microsoft SysInfo Control 6.0Dim OS As StringWith SysInfo1 Select Case .OSPlatform Case 0: OS = "Win32" Case 1: Select Case .OSVersion Case 4: OS = "Win 95" Case 4.1: OS = "Win 98" Case 4.9: OS = "Wim Me" End S... 阅读全文
posted @ 2014-04-03 13:53 Spacecup 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 通用对话框专辑(全)使用API调用Winodws各种通用对话框(CommonDiaglog)的方法(一)1.文件属性对话框Type SHELLEXECUTEINFOcbSize As LongfMask As Longhwnd As LonglpVerb As StringlpFile As StringlpParameters As StringlpDirectory As StringnShow As LonghInstApp As LonglpIDList As Long '可选参数lpClass As String '可选参数hkeyClass As Long ' 阅读全文
posted @ 2014-04-03 13:52 Spacecup 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 条形码编程实例一、条形码的读取用过键盘口式的扫条码工具的朋友就知道,它就如同在鍵盘上按下数字鍵一样,基本不需任何编程和处理。但如果你使用的是其它接口的话,可能你就要为该设备编写通讯代码了。以下有一段简单的25针串口的条码读取器通讯代码。Option ExplicitDim sData As StringPrivate Sub Form_Load() With MSComm1 .CommPort = 3 '设为COM3,试运行的系统而定,你可提供一个Combox让用户选择。 .PortOpen = True '打开通讯端口 End WithEnd Sub Private Sub. 阅读全文
posted @ 2014-04-03 13:39 Spacecup 阅读(1651) 评论(0) 推荐(0) 编辑
摘要: Option ExplicitPrivate Const DC_MAXEXTENT = 5Private Const DC_MINEXTENT = 4Private Const DC_PAPERNAMES = 16Private Const DC_PAPERS = 2Private Const DC_PAPERSIZE = 3Private Declare Function DeviceCapabilities Lib "winspool.drv" Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As St 阅读全文
posted @ 2014-04-03 13:37 Spacecup 阅读(605) 评论(0) 推荐(0) 编辑
摘要: **********************winsock网络编程**********************二、在服务器端Server工程中也建立一个窗体,加载WinSock控件,称为tcpServer,协议选择TCP,设置其Index值为0,并在工程中添加模块。 内容如下:Private Type ActiveUser ClientIP As String ’记录客户的IP地址 ClientPort As Integer ’记录当前会话的端口 ClientID As Long ’记录客户的ID号码 ClientConnected As Boolean ’客户连接状态,True表示已连接,. 阅读全文
posted @ 2014-04-03 13:35 Spacecup 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 'vb中从域名得到IP及从IP得到域名 Private Const WS_VERSION_REQD = &H101Private Const WS_VERSION_MAJOR = WS_VERSION_REQD \ &H100 And &HFF&Private Const WS_VERSION_MINOR = WS_VERSION_REQD And &HFF&Private Const MIN_SOCKETS_REQD = 1Private Const SOCKET_ERROR = -1Private Const WSADescripti 阅读全文
posted @ 2014-04-03 13:34 Spacecup 阅读(808) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页