

                         VBForums -    ̳ 


                         .       
               


         VBForums-̳: HTTP://hzsoft.yeah.net
            
                  ύʼ: VBForums@usa.net?Subject=VBForums

            нϵ: ympang@bigfoot.com



֪:
    VB5¶˿ڶдʡ
    http://202.102.15.149/~person/yangming/myport32.htm
                                - dafeng

:
    VBȡORACLE7ݣ
    ODBCʾDLLǺDLLʵ
                                - 

ڵһ:

    λ֣
         VBѧߣ볢VB5.0+ACCESS97дһ֧Ʊӡ.
    һ:νİתĽд,"123.00"ת
    "Ҽ۷ʰԪ"?
         ⻹һЩ,ϣλEMAILҽû
    ҪĳķܹҲο
                     ʤм
                                - sya


:
    Sya,㡣

    Dim Num_To_Chinese(10) As String

    Sub Init_Chinese()
  
    Num_To_Chinese(0) = ""
    Num_To_Chinese(1) = "Ҽ"
    Num_To_Chinese(2) = ""
    Num_To_Chinese(3) = ""
    Num_To_Chinese(4) = ""
    Num_To_Chinese(5) = ""
    Num_To_Chinese(6) = "½"
    Num_To_Chinese(7) = ""
    Num_To_Chinese(8) = ""
    Num_To_Chinese(9) = ""

    End Sub

    Function Get_Chinese(ByVal m As Currency) As String

    Dim Pre As integer
    Dim Had_Frist_Num As Boolean
    Dim temp As String

    Init_Chinese

    Pre = 0

    re:
    Select Case m
    Case Is >= 10000000 And m < 100000000
        Had_Frist_Num = True
        temp = Num_To_Chinese(Int(m / 10000000)) & "ǧ"
        Pre = 1
        m = m - Int(m / 10000000) * 10000000
        GoTo re
    Case Is >= 1000000 And m < 10000000
        Had_Frist_Num = True
        temp = temp & Num_To_Chinese(Int(m / 1000000)) & ""
        Pre = 2
        m = m - Int(m / 1000000) * 1000000
        GoTo re
    Case Is >= 100000 And m < 1000000
        If Not Had_Frist_Num Then
          temp = Num_To_Chinese(Int(m / 100000)) & "ʰ"
        ElseIf Pre <> 2 Then
           temp = temp & "" & Num_To_Chinese(Int(m / 100000)) & "ʰ"
        Else
           temp = temp & Num_To_Chinese(Int(m / 100000)) & "ʰ"
        End If
        Had_Frist_Num = True
        Pre = 3
        m = m - Int(m / 100000) * 100000
        GoTo re
    Case Is >= 10000 And m < 100000
        If Not Had_Frist_Num Then
         temp = Num_To_Chinese(Int(m / 10000)) & ""
        ElseIf Pre <> 3 Then
         temp = temp & "" & Num_To_Chinese(Int(m / 10000)) & ""
        Else
         temp = temp & Num_To_Chinese(Int(m / 10000)) & ""
        End If
        Had_Frist_Num = True
        Pre = 4
        m = m - Int(m / 10000) * 10000
        GoTo re
  Case Is >= 1000 And m < 10000
        If Not Had_Frist_Num Then
          temp = temp & Num_To_Chinese(Int(m / 1000)) & "ǧ"
        ElseIf Pre <> 4 Then
         temp = temp & "" & Num_To_Chinese(Int(m / 1000)) & "ǧ"
        Else
         temp = temp & Num_To_Chinese(Int(m / 1000)) & "ǧ"
        End If
    
        Had_Frist_Num = True
        Pre = 5
        m = m - Int(m / 1000) * 1000
        GoTo re
    
   Case Is >= 100 And m < 1000
        If Not Had_Frist_Num Then
          temp = temp & Num_To_Chinese(Int(m / 100)) & ""
        ElseIf Pre <> 4 And Pre < 4 Then
         temp = temp & "" & Num_To_Chinese(Int(m / 100)) & ""
        ElseIf Pre <> 5 Then
          temp = temp & "" & Num_To_Chinese(Int(m / 100)) & ""
        Else
        temp = temp & Num_To_Chinese(Int(m / 100)) & ""
        End If
        Had_Frist_Num = True
        Pre = 6
        m = m - Int(m / 100) * 100
        GoTo re
  Case Is >= 10 And m < 100
        If Not Had_Frist_Num Then
          temp = temp & Num_To_Chinese(Int(m / 10)) & "ʰ"
        ElseIf Pre <> 4 And Pre < 4 Then
          temp = temp & "" & Num_To_Chinese(Int(m / 10)) & "ʰ"
        ElseIf Pre <> 6 Then
          temp = temp & "" & Num_To_Chinese(Int(m / 10)) & "ʰ "
        Else
         temp = temp & Num_To_Chinese(Int(m / 10)) & "ʰ"
        End If
        Had_Frist_Num = True
        Pre = 7
        m = m - Int(m / 10) * 10
        GoTo re
  Case Is >= 1 And m < 10
        If Not Had_Frist_Num Then
          temp = temp & Num_To_Chinese(Int(m)) & "Ԫ"
        ElseIf Pre <> 4 And Pre < 4 Then
         temp = temp & "" & Num_To_Chinese(Int(m)) & "Ԫ"
        ElseIf Pre <> 7 Then
          temp = temp & "" & Num_To_Chinese(Int(m)) & "Ԫ"
        Else
         temp = temp & Num_To_Chinese(Int(m)) & "Ԫ"
        End If
        Had_Frist_Num = True
        Pre = 8
        m = m - Int(m)
        GoTo re
   Case Is >= 0.1  
        If Not Had_Frist_Num Then
          temp = temp & Num_To_Chinese(Int(m * 10)) & ""
        ElseIf Pre <> 4 And Pre < 4 Then
            temp = temp & "" & Num_To_Chinese(Int(m * 10)) & ""
        ElseIf Pre <> 8 Then
          temp = temp & "Ԫ" & Num_To_Chinese(Int(m * 10)) & ""
        Else
           temp = temp & Num_To_Chinese(Int(m * 10)) & ""
        End If
        Pre = 9
        m = m - Int(m * 10) / 10
        GoTo re:
  Case Is >= 0.01 
        If m <> 0 Then
         If Not Had_Frist_Num Then
           temp = temp & Num_To_Chinese(Int(m * 100)) & ""
         ElseIf Pre <> 4 And Pre < 4 Then
          temp = temp & "" & Num_To_Chinese(Int(m * 100)) & ""
         ElseIf Pre <> 8 And Pre <> 9 Then
          temp = temp & "Ԫ" & Num_To_Chinese(Int(m * 100)) & ""
         Else
         temp = temp & Num_To_Chinese(Int(m * 100)) & ""
         End If
        End If
        Pre = 10
    End Select
    temp = Trim(temp)
    Get_Chinese = temp
End Function

    Ʒ
    øʽGet_Chinese( m as currency)
    ൽǧ򣬺䡣
    Ok?
                               -----zxf 98/05/21


VBС

                          ʹWin95Ķ

                               ̷    

----Windows 95ϵͳоһWindows 3.x߱ԨDDֶ֧Ĺļ
Windows 95Ŀ¼еCursorsĿ¼¿ЩĹļǾչ
*.ANIڳʹӦĶܹظƳۣĽ
Visual BasicӦóʹWindows 95Ķļ 

ʹöļ

----ҪVisual BasicӦóʹWindows 95Ķ꣬Ҫʹ
Windows Ӧó̽ӿڣAPI 

     LoadCursorFormFileڴӴļ 
     ClipeCursorڽһ̶ľڣ 
     GetWindowRectڻȡþоǳı 
     SetClassLongúȡݣʹ걻ʾڴϣ 
     GetClassLong˳Ӧó֮ǰҪӦóȱʡûسִ
     ǰĹ꣬ҪڳʱȶǰĹ״̬бݣɸú
     ɣ 
     DestroyCursorȷʾ˹֮ҪʹøúȡĹꡣ 



----ڴʾC:\WIN95\CURSORSĿ¼µAPPSTART.ANI
ļWindows 95·ͬĻҪ޸ȷʾꡣ 

  1.Visual BasicпʼһµḶ́ȱʡķForm1 
  2.Form1ϴһťؼȱʡķCommand1Caption
     Ϊʾꡱ 
  3.Form1ϴڶťؼȱʡķCommand2Caption
     Ϊָȱʡꡱ 
  4.һµģ飬ȱʡķModule1.Basµͺͳ
     ӵModule1.BasͨУ 

     Option Explicit
     Type RECT
             Left As Long
             Top As Long
             Right As Long
             Bottom As Long
     End Type
     Public Const GCL_HCURSOR = (-12)
     Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
     Declare Function DestroyCursor Lib "user32" (ByVal hCursor As Long) As Long
     Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA"
      (ByVal lpFileName As String) As Long
     Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, 
      lpRect As RECT) As Long
     Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" 
      (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
     Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" 
      (ByVal hwnd As Long, ByVal nIndex As Long) As Long

     עҪдһڡ

  5.µӵForm1ͨУ 

     Option Explicit
     Dim mhBaseCursor As Long
     Dim mhAniCursor As Long

  6.µĴӵForm1Form_Load¼У 

     Private Sub Form_Load()
         Dim lResult As Long
         
         mhBaseCursor = GetClassLong((Me.hwnd), GCL_HCURSOR)
     End Sub

  7.µĴӵCommand1ĵ¼У 

     Private Sub Command1_Click()
         Dim lResult As Long
         Dim RT_FormArea As RECT
         
         mhAniCursor = LoadCursorFromFile("c:\win95\cursors\appstart.ani")
         
         lResult = SetClassLong((Me.hwnd), GCL_HCURSOR, mhAniCursor)
         
         lResult = GetWindowRect((Me.hwnd), RT_FormArea)
         
         lResult = ClipCursor(RT_FormArea)
     End Sub

  8.µĴӵCommand2ĵ¼У 

     Private Sub Command2_Click()
         Dim lResult As Long
         Dim RT_ScreenArea As RECT
         
         RT_ScreenArea.Top = 0
         RT_ScreenArea.Left = 0
         RT_ScreenArea.Bottom = Screen.Height \ Screen.TwipsPerPixelX
         RT_ScreenArea.Right = Screen.Width \ Screen.TwipsPerPixelY
         lResult = ClipCursor(RT_ScreenArea)
         lResult = SetClassLong((Me.hwnd), GCL_HCURSOR, mhBaseCursor)
         lResult = DestroyCursor(mhAniCursor)
     End Sub

     ----ͨF5иó򣬵ʾꡱťڴķΧ
     ΪAPPSTART.ANI꣬ҹ걻ڴķΧڡָȱʡ
     ꡱťеĹ걻ָΪȱʡĹꡣע⣬˳֮ǰ
     Ҫָȱʡꡱť򽫲ϵͳȷ 

                    й˾Ȩ

˶ http://server.com/WebApps/mail-list-unsubscribe.cgi?id=4093


