易截截图软件、单文件、免安装、纯绿色、仅160KB

vb操作sql数据库的典型例子

本程序有一菜单开始,里面有查询,删除,修改,添加,程序不一一列出,只写出基本的过程,连接数据库采用标准模块:
'Public publicstr As String
Public conn As ADODB.Connection
Public rs As ADODB.Recordset
Public Sub main()     '数据库连接共享函数
  Set conn = New ADODB.Connection
  conn.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=plgl;Initial Catalog=plgl"
  'publicstr = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=plgl;Initial Catalog=plgl"     '共享连接字符串
  main_pfm.Show
End Sub
添加程序:
  Set rs = New ADODB.Recordset
  If Trim(Text1(0).Text) = "" Then
    smeg = "配方号不能为空!!!"
    MsgBox smeg, vbOKCancel + vbExclamation, "警告"
    Text1(0).SetFocus
  Else
  If Not IsNumeric(Text1(0).Text) Then
          smeg = "A添加剂非数字!!!"
          MsgBox smeg, vbOKCancel + vbExclamation, "警告"
          Text1(0).Text = ""
          Text1(0).SetFocus
    Else
    If Trim(Text1(1).Text) = "" Then
      smeg = "配方名称不能为空!!!"
      MsgBox smeg, vbOKCancel + vbExclamation, "警告"
      Text1(1).SetFocus
    Else
      If Trim(Text1(2).Text) = "" Then
        smeg = "A添加剂不能为空!!!"
        MsgBox smeg, vbOKCancel + vbExclamation, "警告"
        Text1(2).SetFocus
      Else
        If Not IsNumeric(Text1(2).Text) Then
      &n


相关文档:

求注释VB程序,只要大概整句意思即可,急用!!!

Option Explicit
Private rsMain As ADODB.Recordset
Private rsTerm As ADODB.Recordset
Private strSql As String
Private Sub cmdAbout_Click()
        frmAbout.Show
End Sub
Private Sub cmdAddObject_Click() '程序段
         ......

VB显示透明FLASH效果

VB显示透明FLASH效果
  演示效果:
 
    代码如下:
公共声明区域
Option Explicit
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetW ......

VB实现“木马”式隐形运行程序

程序隐形的原理
  对于一个隐形程序而言,最基本的要求是:
  1. 不在桌面出现界面;
  2. 不在任务栏出现图标;
  3. 程序名从任务管理器名单中消失。
Public Declare Function GetCurrentProcessId Lib “kernel32” () As Long
’获得当前进程ID函数的声明
Public Declare Functio ......

vb shell 应用程序

就这么一个函数就解决了那位仁兄3天多的工作
唉~!真被一个函数玩死了
这里顺便帖出来吧
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Microsoft.VisualBasic.Shell( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号