Develop
2003.04.23 00:04
[vb] 비주얼 베이직 173페이지
Views 54923 Comment 0
DefSng A-Z
Dim a(5), b(5) As String, c(5), d(5), e(5), f(5), g(5), h(5) As String, pc, tmp As Variant
Dim a1(5), b1(5) As String, c1(5), d1(5)
Private Sub Command1_Click()
pc = pc + 1
a(pc) = Text1.Text
b(pc) = Text2.Text
c(pc) = Text3.Text
d(pc) = Text4.Text
a1(pc) = Text1.Text
b1(pc) = Text2.Text
c1(pc) = Text3.Text
d1(pc) = Text4.Text
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
End Sub
Private Sub Command2_Click()
For i = 1 To pc - 1
For j = i + 1 To pc
If a(i) > a(j) Then
tmp = a(i): a(i) = a(j): a(j) = tmp
tmp = b(i): b(i) = b(j): b(j) = tmp
tmp = c(i): c(i) = c(j): c(j) = tmp
tmp = d(i): d(i) = d(j): d(j) = tmp
End If
Next j
Next i
For i = 1 To pc
Select Case b(i)
Case "L": h(i) = "경차": e(i) = 500 + (c(i) * 0.8)
Case "M": h(i) = "중형": e(i) = 1800 + (c(i) * 0.8)
Case "B": h(i) = "버스": e(i) = 3000 + (c(i) * 0.8)
Case "T": h(i) = "화물": e(i) = 2000 + (c(i) * 0.8)
End Select
Select Case e(i)
Case Is <= 800: f(i) = e(i) + d(i) + 0
Case Is <= 1200: f(i) = e(i) + d(i) + 15
Case Is <= 1800: f(i) = e(i) + d(i) + 30
Case Is <= 2000: f(i) = e(i) + d(i) + 40
Case Is >= 2000: f(i) = e(i) + d(i) + 60
End Select
g(i) = f(i) * 0.5 + 11
Next i
Form1.Hide
Form2.Show
Form2.Print "고객번호", "차종", "자차부담금", "차량가격", "총금액", "보험료"
For i = 1 To pc
Form2.Print a(i), h(i), d(i), e(i), f(i), g(i)
Next
Form2.Print ""
Form2.Print ""
Form2.Print "입력자료"
For i = 1 To pc
Form2.Print a1(i), b1(i), c1(i), d1(i)
Next
End Sub
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
13 | Develop | [iphone] performSelector:withObject:afterDelay: 에 대한 내용 | hooni | 2013.04.23 | 65908 |
12 | Develop | [ios] Random Thoughts: Rand() vs. arc4random() | hooni | 2013.10.31 | 68128 |
11 | Develop | [android] keytool을 사용하여 키스토어 생성 | hooni | 2013.04.23 | 69582 |
10 | Develop |
[json] 종결자 (설명과 웹, C/C++/C# 프로그램 샘플 코드)
![]() |
hooni | 2013.04.23 | 72050 |
9 | Develop |
[android] 점심 해결 앱 소스 코드 ㅋㅋ
![]() |
hooni | 2013.04.23 | 76507 |
8 | Develop | [C#] MD5, SHA1 해시 & 인코딩 | hooni | 2013.04.23 | 77976 |
7 | Develop |
[c#] Hashtable <-> Json (dll 포함)
![]() |
hooni | 2013.04.23 | 80733 |
6 | Develop |
레고 마인드스톰 NXT 수도쿠, 큐브 소스코드..
20 ![]() |
hooni | 2013.04.23 | 81605 |
5 | Develop |
[android] 만화 어플 소스코드
![]() |
hooni | 2013.04.23 | 92927 |
4 | Develop |
[ios] Start developing your navigation app for CarPlay without enrollment
![]() |
hooni | 2020.02.22 | 125620 |
3 | Develop | [ios] 언어, 지역, 국가 설정 가져오기 | hooni | 2014.05.12 | 272408 |
2 | Develop | 자주 쓰는 Docker 명령어 alias | hooni | 2020.01.10 | 273078 |