|
71 | 06 เม.ย.55 21:04น. |
|
105 | 30 มี.ค.55 09:06น. |
|
169 | 04 มี.ค.55 10:09น. |
|
112 | 04 มี.ค.55 10:08น. |
|
112 | 04 มี.ค.55 09:51น. |
| ตอบล่าสุด | รายการล่าสุด | อ่าน |
ตอบ |
โพสต์โดย |
| » 12 พ.ค.55 10:32น. | 3 |
|||
| » 13 ธ.ค.54 09:46น. | 2 |
|||
| » 27 ม.ค.55 08:39น. | 17 |
|||
| » 15 ต.ค.54 23:56น. | 5 |
|||
| » 19 ก.พ.55 10:49น. | 37 |
|||
| » 01 เม.ย.55 17:56น. | 23 |
|||
| » 08 ต.ค.54 13:40น. | 1 |
|||
| » 10 ต.ค.54 12:49น. | 4 |
|||
| » 07 ต.ค.54 14:44น. | 1 |
|||
| » 06 ต.ค.54 14:07น. | 1 |
|||
ReqTestHarness
The PrintForm method sends an image of the current form to the default printer.
The sample application prints the image of the form shown below without the command buttons:
The code for this application is quite sparse (as it does not actually perform any calculations).
The Form_Load event contains code to center the form on the screen and to format the Date and Time labels:
The code for this application is quite sparse (as it does not actually perform any calculations).
The Form_Load event contains code to center the form on the screen and to format the Date and Time labels:
Private Sub Form_Load()
'center the form:
Me.Top = (Screen.Height - Me.Height) / 2
Me.Left = (Screen.Width - Me.Width) / 2
'display date & time
lblDate.Caption = Format
(Date, "m/d/yyyy")
lblTime.Caption = Format
(Time, "h:nn AM/PM")
End Sub
The Click event for the Print button (cmdPrint_Click) hides the two command buttons (by setting their Visible properties to False), issues the PrintForm statement, then makes the buttons visible again:
Private Sub cmdPrint_Click()
cmdPrint.Visible = False
cmdExit.Visible = False
PrintForm
cmdPrint.Visible = True
cmdExit.Visible = True
End Sub
The Click event for the Exit button (cmdExit_Click) ends the program by issuing the End command.
Private Sub cmdExit_Click()
End
End Sub
Download the project files for this sample application here.
... เพิ่มเติม
creditline,
rate,
period) {
crate = (
rate / 12) /100;
cperiod =
period ;
var1 = (
creditline *
crate);
var2 = 1- (1/pow((1+
crate),
cperiod));
pmt =
var1 /
var2; return (
pmt) ; }function get_payment(
creditline,
rate,
period) {if(!(
creditline <= 0 ||
period <= 0 ||
rate <= 0)) {
payment = 0;
payment = cal_payment(
creditline,
rate,
period); }
Payment[0] = round(
payment * 100) / 100;
Payment[1] = (
payment * 100) / 40;
Payment[2] = round(
Payment[1]*100)/100; return
Payment[0];}
ฟังชั่นคำนวนเงินต้นครับเรียกใช้ด้วยคำสั่ง
get_payment("วงเงิน", "ดอกเบี้ย", "งวด")
... เพิ่มเติม