|
发表于 28-8-2006 01:33 PM
|
显示全部楼层
原帖由 咖啡豆 于 28-8-2006 12:18 PM 发表
哇~~~台湾?太好了!不需要管那里的政治啦,管管你的五脏庙吧,不要错过那里的美食,还有一定要去吃炸鸡排哟!
但有机会还是要去看看他们的示威一下哈哈,工作时间应该是吃饭盒而已,而且我是去台中
原帖由 程家伟 于 28-8-2006 12:55 PM 发表
那些的pixer我已经在photoshop里调到最低了。。如果更低的话。。。图案变得很不好看了。 然后其余的会在下次updated是更改。。。
因为这是免费的。。。粗造的设计先用。。。因为没有install micr ...
加油哦 |
|
|
|
|
|
|
|
发表于 29-8-2006 05:53 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 29-8-2006 05:54 PM
|
显示全部楼层
原帖由 咖啡豆 于 28-8-2006 11:12 AM 发表
贴在美食烹饪 » 美食天堂里,提醒食客勿在上当。
我已经post在三个地方了,再post可不可以的? |
|
|
|
|
|
|
|
发表于 29-8-2006 06:07 PM
|
显示全部楼层
回复 #901 max5007 的帖子
台中?嘿嘿嘿。。。太阳饼一定要吃哦,问当地的人吧那里买老字号的太阳饼。 |
|
|
|
|
|
|
|
发表于 29-8-2006 06:14 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 30-8-2006 09:27 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 30-8-2006 11:48 AM
|
显示全部楼层
上班没事就上网闲聊。
明天假期,我得在家大扫除,整理些柜橱及文件。
还有写 Quotation 给顾客。
反而更忙。 |
|
|
|
|
|
|
|
发表于 30-8-2006 12:45 PM
|
显示全部楼层
你们明天可以休息,但我刚刚到了台湾,没的休息,现在这里的天气和MALAYSIA一样热-。-!!等下要开会了,所以上来聊聊一下,还有死明讯不能帮我SET CALL DIVERT,也没有AUTO ROAMING |
|
|
|
|
|
|
|
发表于 30-8-2006 01:04 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 30-8-2006 04:23 PM
|
显示全部楼层
请问一下,有谁会看这个coding。。。goatstudio兄介绍我看的。。我现在一头雾水了。。这是个如何怎样的把数目的digit转换去数目的text。。希望可以得到答案    
Function ConvertCurrencyToEnglish (ByVal MyNumber)
Dim Temp
Dim Dollars, Cents
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' Convert MyNumber to a string, trimming extra spaces.
MyNumber = Trim(Str(MyNumber))
' Find decimal place.
DecimalPlace = InStr(MyNumber, "."
' If we find decimal place...
If DecimalPlace > 0 Then
' Convert cents
Temp = Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2)
Cents = ConvertTens(Temp)
' Strip off cents from remainder to convert.
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
' Convert last 3 digits of MyNumber to English dollars.
Temp = ConvertHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
' Remove last 3 converted digits from MyNumber.
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
' Clean up dollars.
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
' Clean up cents.
Select Case Cents
Case ""
Cents = " And No Cents"
Case "One"
Cents = " And One Cent"
Case Else
Cents = " And " & Cents & " Cents"
End Select
ConvertCurrencyToEnglish = Dollars & Cents
End Function
Private Function ConvertHundreds (ByVal MyNumber)
Dim Result As String
' Exit if there is nothing to convert.
If Val(MyNumber) = 0 Then Exit Function
' Append leading zeros to number.
MyNumber = Right("000" & MyNumber, 3)
' Do we have a hundreds place digit to convert?
If Left(MyNumber, 1) <> "0" Then
Result = ConvertDigit(Left(MyNumber, 1)) & " Hundred "
End If
' Do we have a tens place digit to convert?
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & ConvertTens(Mid(MyNumber, 2))
Else
' If not, then convert the ones place digit.
Result = Result & ConvertDigit(Mid(MyNumber, 3))
End If
ConvertHundreds = Trim(Result)
End Function
Private Function ConvertTens (ByVal MyTens)
Dim Result As String
' Is value between 10 and 19?
If Val(Left(MyTens, 1)) = 1 Then
Select Case Val(MyTens)
Case 10: Result = "Ten"
Case 11: Result = "Eleven"
Case 12: Result = "Twelve"
Case 13: Result = "Thirteen"
Case 14: Result = "Fourteen"
Case 15: Result = "Fifteen"
Case 16: Result = "Sixteen"
Case 17: Result = "Seventeen"
Case 18: Result = "Eighteen"
Case 19: Result = "Nineteen"
Case Else
End Select
Else
' .. otherwise it's between 20 and 99.
Select Case Val(Left(MyTens, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
' Convert ones place digit.
Result = Result & ConvertDigit(Right(MyTens, 1))
End If
ConvertTens = Result
End Function
Private Function ConvertDigit (ByVal MyDigit)
Select Case Val(MyDigit)
Case 1: ConvertDigit = "One"
Case 2: ConvertDigit = "Two"
Case 3: ConvertDigit = "Three"
Case 4: ConvertDigit = "Four"
Case 5: ConvertDigit = "Five"
Case 6: ConvertDigit = "Six"
Case 7: ConvertDigit = "Seven"
Case 8: ConvertDigit = "Eight"
Case 9: ConvertDigit = "Nine"
Case Else: ConvertDigit = ""
End Select
End Function |
|
|
|
|
|
|
|
发表于 30-8-2006 04:44 PM
|
显示全部楼层
VB 编码,
ConvertCurrencyToEnglish(1234.56) 就转换成 One Thousand Two Hundred Thirty Four And Fifty Six Cents |
|
|
|
|
|
|
|
发表于 30-8-2006 04:49 PM
|
显示全部楼层
回复 #910 程家伟 的帖子
vb6的,对吗?
我正要编写这个东西。。。。嘻嘻,有现成的,可以直接抄了,不用我费力想。。。 |
|
|
|
|
|
|
|
发表于 30-8-2006 05:40 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 31-8-2006 07:20 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 1-9-2006 10:26 AM
|
显示全部楼层
Private Sub cmdConvert_Click()
txtResult = NumToText(Val(txtNumber))
txtNumber.SelStart = 0 <---这一段出现了问题
txtNumber.SelLength = Len(txtNumber)
txtNumber.SetFocus
End Sub
Private Function NumToText(dblVal As Double) As String
Static Ones(0 To 9) As String
Static Teens(0 To 9) As String
Static Tens(0 To 9) As String
Static Thousands(0 To 4) As String
Static bInit As Boolean
Dim i As Integer, bAllZeros As Boolean, bShowThousands As Boolean
Dim strVal As String, strBuff As String, strTemp As String
Dim nCol As Integer, nChar As Integer
'Only handles positive values
Debug.Assert dblVal >= 0
If bInit = False Then
'Initialize array
bInit = True
Ones(0) = "zero"
Ones(1) = "one"
Ones(2) = "two"
Ones(3) = "three"
Ones(4) = "four"
Ones(5) = "five"
Ones(6) = "six"
Ones(7) = "seven"
Ones(8) = "eight"
Ones(9) = "nine"
Teens(0) = "ten"
Teens(1) = "eleven"
Teens(2) = "twelve"
Teens(3) = "thirteen"
Teens(4) = "fourteen"
Teens(5) = "fifteen"
Teens(6) = "sixteen"
Teens(7) = "seventeen"
Teens(8) = "eighteen"
Teens(9) = "nineteen"
Tens(0) = ""
Tens(1) = "ten"
Tens(2) = "twenty"
Tens(3) = "thirty"
Tens(4) = "forty"
Tens(5) = "fifty"
Tens(6) = "sixty"
Tens(7) = "seventy"
Tens(8) = "eighty"
Tens(9) = "ninety"
Thousands(0) = ""
Thousands(1) = "thousand" 'US numbering
Thousands(2) = "million"
Thousands(3) = "billion"
Thousands(4) = "trillion"
End If
'Trap errors
On Error GoTo NumToTextError
'Get fractional part
strBuff = "and " & Format((dblVal - Int(dblVal)) * 100, "00" & "/100"
'Convert rest to string and process each digit
strVal = CStr(Int(dblVal))
'Non-zero digit not yet encountered
bAllZeros = True
'Iterate through string
For i = Len(strVal) To 1 Step -1
'Get value of this digit
nChar = Val(Mid$(strVal, i, 1))
'Get column position
nCol = (Len(strVal) - i) + 1
'Action depends on 1's, 10's or 100's column
Select Case (nCol Mod 3)
Case 1 '1's position
bShowThousands = True
If i = 1 Then
'First digit in number (last in loop)
strTemp = Ones(nChar) & " "
ElseIf Mid$(strVal, i - 1, 1) = "1" Then
'This digit is part of "teen" number
strTemp = Teens(nChar) & " "
i = i - 1 'Skip tens position
ElseIf nChar > 0 Then
'Any non-zero digit
strTemp = Ones(nChar) & " "
Else
'This digit is zero. If digit in tens and hundreds column
'are also zero, don't show "thousands"
bShowThousands = False
'Test for non-zero digit in this grouping
If Mid$(strVal, i - 1, 1) <> "0" Then
bShowThousands = True
ElseIf i > 2 Then
If Mid$(strVal, i - 2, 1) <> "0" Then
bShowThousands = True
End If
End If
strTemp = ""
End If
'Show "thousands" if non-zero in grouping
If bShowThousands Then
If nCol > 1 Then
strTemp = strTemp & Thousands(nCol \ 3)
If bAllZeros Then
strTemp = strTemp & " "
Else
strTemp = strTemp & ", "
End If
End If
'Indicate non-zero digit encountered
bAllZeros = False
End If
strBuff = strTemp & strBuff
Case 2 '10's position
If nChar > 0 Then
If Mid$(strVal, i + 1, 1) <> "0" Then
strBuff = Tens(nChar) & "-" & strBuff
Else
strBuff = Tens(nChar) & " " & strBuff
End If
End If
Case 0 '100's position
If nChar > 0 Then
strBuff = Ones(nChar) & " hundred " & strBuff
End If
End Select
Next i
'Convert first letter to upper case
strBuff = UCase$(Left$(strBuff, 1)) & Mid$(strBuff, 2)
EndNumToText:
'Return result
NumToText = strBuff
Exit Function
NumToTextError:
strBuff = "#Error#"
Resume EndNumToText
End Function
有谁可以帮个忙。。。问题是讲着 “ You Cannot reffence a property or menthod for a control unless the control has the focus ” |
|
|
|
|
|
|
|
发表于 1-9-2006 10:44 AM
|
显示全部楼层
原帖由 程家伟 于 1-9-2006 10:26 AM 发表
Private Sub cmdConvert_Click()
txtResult = NumToText(Val(txtNumber))
txtNumber.SelStart = 0 <---这一段出现了问题
txtNumber.SelLength = Len(txtNumber)
...
刚才的问题我把它撤除了,会影响到全部的codingrunning 吗? |
|
|
|
|
|
|
|
发表于 1-9-2006 11:37 AM
|
显示全部楼层
哇哈哈哈哈~。。这个CODING 终于完成了。。。可以开口大笑了。。这几天来真的是彻夜难眠。。。就是为了这个CONVERTER FUNCTION CODING。 现在这个问题决绝了。。。现在这里谢谢GOAT STUDIO 大大,和各位前辈/后辈的解释。。。。 |
|
|
|
|
|
|
|
发表于 1-9-2006 12:14 PM
|
显示全部楼层
我有的是 VFP 的编码,转换成中文的网上有,转换成马来文要改编下就行,我能力做得到。 |
|
|
|
|
|
|
|
发表于 1-9-2006 01:10 PM
|
显示全部楼层
在这里的日子比较忙碌了,所以没时间上来这里^^
这是台中公司的外景

他们双层的carpark很省位置哦
 |
|
|
|
|
|
|
|
发表于 1-9-2006 03:13 PM
|
显示全部楼层
这一次好难搞,写着compilir error: Member already exists in an object module from which this object module derives
Private Sub Preview_PO_Exit(Cancel As Integer)
txtResult = ConvertCurrencyToEnglish(Val(TotalAfterPercentDiscount))
End Sub
Function ConvertCurrencyToEnglish(ByVal MyNumber) <--- 在这里又出现问题了,没法子怎样改. 有何高见,麻烦大家了
Dim Temp
Dim Dollars, Cents
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' Convert MyNumber to a string, trimming extra spaces.
MyNumber = Trim(Str(MyNumber))
' Find decimal place.
DecimalPlace = InStr(MyNumber, ".")
' If we find decimal place...
If DecimalPlace > 0 Then
' Convert cents
Temp = Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2)
Cents = ConvertTens(Temp)
' Strip off cents from remainder to convert.
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
' Convert last 3 digits of MyNumber to English dollars.
Temp = ConvertHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
' Remove last 3 converted digits from MyNumber.
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
' Clean up dollars.
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
' Clean up cents.
Select Case Cents
Case ""
Cents = " And No Cents"
Case "One"
Cents = " And One Cent"
Case Else
Cents = " And " & Cents & " Cents"
End Select
ConvertCurrencyToEnglish = Dollars & Cents
End Function
Private Function ConvertHundreds(ByVal MyNumber)
Dim Result As String
' Exit if there is nothing to convert.
If Val(MyNumber) = 0 Then Exit Function
' Append leading zeros to number.
MyNumber = Right("000" & MyNumber, 3)
' Do we have a hundreds place digit to convert?
If Left(MyNumber, 1) <> "0" Then
Result = ConvertDigit(Left(MyNumber, 1)) & " Hundred "
End If
' Do we have a tens place digit to convert?
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & ConvertTens(Mid(MyNumber, 2))
Else
' If not, then convert the ones place digit.
Result = Result & ConvertDigit(Mid(MyNumber, 3))
End If
ConvertHundreds = Trim(Result)
End Function
Private Function ConvertTens(ByVal MyTens)
Dim Result As String
' Is value between 10 and 19?
If Val(Left(MyTens, 1)) = 1 Then
Select Case Val(MyTens)
Case 10: Result = "Ten"
Case 11: Result = "Eleven"
Case 12: Result = "Twelve"
Case 13: Result = "Thirteen"
Case 14: Result = "Fourteen"
Case 15: Result = "Fifteen"
Case 16: Result = "Sixteen"
Case 17: Result = "Seventeen"
Case 18: Result = "Eighteen"
Case 19: Result = "Nineteen"
Case Else
End Select
Else
' .. otherwise it's between 20 and 99.
Select Case Val(Left(MyTens, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
' Convert ones place digit.
Result = Result & ConvertDigit(Right(MyTens, 1))
End If
ConvertTens = Result
End Function
Private Function ConvertDigit(ByVal MyDigit)
Select Case Val(MyDigit)
Case 1: ConvertDigit = "One"
Case 2: ConvertDigit = "Two"
Case 3: ConvertDigit = "Three"
Case 4: ConvertDigit = "Four"
Case 5: ConvertDigit = "Five"
Case 6: ConvertDigit = "Six"
Case 7: ConvertDigit = "Seven"
Case 8: ConvertDigit = "Eight"
Case 9: ConvertDigit = "Nine"
Case Else: ConvertDigit = ""
End Select
End Function |
|
|
|
|
|
|
| |
本周最热论坛帖子
|