vb ´òÓ¡
Private Sub PrintTxt(txt As String, ConWidth As Long, LeftPosition As Long)
Dim str As String
Dim str1 As String
Dim len1 As Long
str = txt
len1 = ConWidth
Do While Len(str) > 0
str1 = str
Do While len1 > 0 And Printer.TextWidth(str1) - ConWid > len1
str1 = Left(str1, Len(str1) - 1)
Loop
Printer.CurrentX = LeftPosition
Printer.Print str1 '´òÓ¡
If Len(str1) = 0 Then Exit Do '²»Æ¥Åä
str = Mid(str, Len(str1) + 1) '½Ø¶Ï£¡
Loop
End Sub
Private Sub PrintBC(prectl As Control)
Dim I As Integer
Dim str As String
Dim str1 As String
Dim len1 As Long
len1 = prectl.Width
If prectl.BorderStyle = 0 Then
ConWid = 90
Else
ConWid = -90
End If
Printer.CurrentX = prectl.Left
Printer.CurrentY = prectl.Top
Printer.Font.Name = prectl.Font.Name
Printer.Font.Size = prectl.Font.Size
'Printer.ForeColor = prectl.ForeColor
str = prectl
For I = 1 To Len(str)
If I > Len(str) Then Exit For
If Asc(Mid(str, I, 1)) = 13 Then
 
Ïà¹ØÎĵµ£º
ת×Ô£ºhttp://www.52arm.com/Article_Show.asp?ArticleID=186
×÷Õߣºweidian ---±¾Õ¾Ô´´ µã»÷Êý£º4721 ·¢±íʱ¼ä£º2008-5-7 ±à¼£ºsanzang
Winsock¿Ø¼þ½¨Á¢ÔÚTCP¡¢UDPÐÒéµÄ»ù´¡ÉÏ£¬Íê³ÉÓëÔ¶³Ì¼ÆËã»úµÄ ......
Õâ¶Îʱ¼äÔÚÒÆÖ²ÏîÄ¿µÄ¹ý³ÌÖУ¬Æð³õÎÒÏëÅжÏÒ»¸ö×Ö·û´®ÖÐÊÇ·ñ´æÔÚij×Ö·û£¨´®£©£¬Ö±½ÓµÄʹÓ÷½·¨ÊÇÓÃinstr£¨start£¬string1£¬string2£¬VB compare£©£¬µ«¾¹ý·ÖÎöÔÚVBÖпÉÒÔÖ»ÓÃһϷ½·¨À´Åжϣ¡
1.³£ÓõÄINStr·½·¨
Function InStr([Start], [String1], [String2], [Compare A ......
¿ªÊ¼Ê¹ÓÃvbµÄʱºòϲ»¶ÓÃÊÖ»³öÄǸö¿Ø¼þµÄλÖÃ.È»ºóÒ»¸öÒ»¸öµÄÍ϶¯,Ò»µãÒ»µãµÄÒÆ¶¯.Ö±µ½¸Ð¾õÂúÒâÁËΪֹ.Èç¹ûÊǿؼþ¶àÁËÕâ¸ö¾ÍºÜÂé·³ÁË
Ò»²»Ð¡ÐÄ¿ÉÄܻὫı¸ö¿Ø¼þÍϵ½Ò»±ßÈ¥
ËùÒÔ,ÎÒÃÇÔÚÒÔºóµÄ×÷Æ·ÖÐ
¾¡Á¿Ê¹ÓôúÂëÀ´¶¨Òå¿Ø¼þλÖÃ,,ÒªÁé»îµÄÕÆÎÕ×ø±êλÖÃ.,¿ÉÒÔʹÓÃ×Ô¶¨Òå×ø±ê.ʹÓÃÏñËØÀ´¸üºÃµÄÀ´·ÖÇøÏÔʾ¿Ø¼þ.
& ......
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EWX_LOGOFF = 0
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4
Private closeTime As String
Sub AdjustTokenPrivilegesForNT()
......
ÎÄÕÂÀ´Ô´:vb´óÊÀ½ç ×÷ÕߣºÍõ¹úÈÙ
¡¸VB ûÓÐÌṩÕâÑùµÄ¹¦ÄÜ£¬ ±ØÐëºô½Ð Windows API¡¹£¬ µ±±ÊÕßÕâÑù»Ø´ð¶ÁÕßÖ®áᣬÓÐЩ¶ÁÕß»áÒªÇó±ÊÕß½éÉÜ Windows API ·½ÃæµÄÊé¼®£¬ ÓÈÆäÊÇÖÐÎÄÊ飬 µ«Êµ¼ÊÉÏ£¬Ä¿Ç°ÊÐÃæÉÏÖ»¿´µ½Ò»±¾ÔÎÄÊé(ZD Press ³ö°æµÄ Visual Basic 5.0 Programming Guide to Win32 API)£¬ ÖÐÎÄÊéÔòδ¼û¹ý£¬ Ϊʲ÷áÃ»Ó ......