'สวัสดีครับ วันนี้ผมขอเสนอระบบวันเดือนปี ภาษาไทย (พ.ศ.) และ ภาษาอังกฤษ (ค.ศ.) เอามาโชว์ในฟอร์มเดียวกันได้เลย สามารถทำได้ดังนี้ครับ
Imports System.Globalization 'ต้อง Import เข้าระบบก่อนจึงใช้งานได้
Public Class Form1
Private EnCulture As System.Globalization.CultureInfo
Private ThCulture As System.Globalization.CultureInfo
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
EnCulture = System.Globalization.CultureInfo.GetCultureInfo("en-US") 'ระบบภาษาอังกฤษ
ThCulture = System.Globalization.CultureInfo.GetCultureInfo("th-TH") 'ระบบภาษาไทย
Label1.Text = Now.ToString("dd-MM-yyyy", EnCulture) 'วัน เดือน ปี ภาษาอังกฤษ (ค.ศ.)
Label2.Text = Now.ToString("dd-MM-yyyy", ThCulture) 'วัน เดือน ปี ภาษาไทย (พ.ศ.)
End Sub
End Class
พีเอ็ม คอม แหล่งรวบรวมสาระความรู้ แบ่งปัน และน้ำใจ ในการให้ความรู้ทางด้านคอมพิวเตอร์ อยากรู้อะไรเข้ามาสอบถามได้เลย โปรแกรมฟรี Open Source และอื่น ๆ อีกมากมาย
24 กุมภาพันธ์ 2559
11 กุมภาพันธ์ 2559
โปรแกรมที่ใช้ เปิด สร้าง แก้ไข ไฟล์ .SVG
ใช้โปรแกรม InkScape ครับ ตัวนี้เอาไว้สร้างไฟล์กราฟฟิคแบบเว็คเตอร์ได้สวยมากๆและใช้ง่ายด้วย
ที่สำคัญ ฟรี ครับ
https://inkscape.org
ที่สำคัญ ฟรี ครับ
https://inkscape.org
10 กุมภาพันธ์ 2559
22 มกราคม 2559
Delete User then Lose File. ลบผู้ใช้งานใน Windows แล้วไฟล์หายไป
1. หากคุณเลือก Keep File หมายถึงเก็บไฟล์ไว้ แสดงว่าไฟล์นั้นไม่ได้หายไปใหนครับ มันไปอยู่ที่ Desktop ของ Admin ครับ
2. หากคุณไม่ได้เลือก Keep File นั่นแสดงว่าไฟล์ของคุณถูกลบไปแล้ว ให้ใช้โปรแกรมเรียกคืนไฟล์ เช่น Recuva ครับ โดยเลือกที่จะเรียกคืนไฟล์จากโฟลเดอร์ C:\users\
2. หากคุณไม่ได้เลือก Keep File นั่นแสดงว่าไฟล์ของคุณถูกลบไปแล้ว ให้ใช้โปรแกรมเรียกคืนไฟล์ เช่น Recuva ครับ โดยเลือกที่จะเรียกคืนไฟล์จากโฟลเดอร์ C:\users\
06 มกราคม 2559
Calculate Age (VB.NET) ฟังก์ชั่นคำนวณอายุเป็น ปี เดือน ครับ
'ฟังก์ชั่นคำนวณอายุเป็น ปี เดือน ครับ
'How to Calcuate Aeg ....Year....Month
Function CalculateAge(ByVal YYYYMMYY As String)
Dim AgeYear As Integer
AgeYear = Now.Year - CInt(Mid(YYYYMMYY, 1, 4))
Dim MyMonth As Integer
Dim AgeMonth As Integer
MyMonth = CInt(Mid(YYYYMMYY, 5, 2))
If MyMonth > Now.Month Then
AgeMonth = (12 - CInt(Mid(YYYYMMYY, 5, 2))) + Now.Month
AgeYear = AgeYear - 1
Else
AgeMonth = Now.Month - CInt(Mid(YYYYMMYY, 5, 2))
End If
Return (AgeYear & " Year " & AgeMonth & " Month")
End Function
'How to Calcuate Aeg ....Year....Month
Function CalculateAge(ByVal YYYYMMYY As String)
Dim AgeYear As Integer
AgeYear = Now.Year - CInt(Mid(YYYYMMYY, 1, 4))
Dim MyMonth As Integer
Dim AgeMonth As Integer
MyMonth = CInt(Mid(YYYYMMYY, 5, 2))
If MyMonth > Now.Month Then
AgeMonth = (12 - CInt(Mid(YYYYMMYY, 5, 2))) + Now.Month
AgeYear = AgeYear - 1
Else
AgeMonth = Now.Month - CInt(Mid(YYYYMMYY, 5, 2))
End If
Return (AgeYear & " Year " & AgeMonth & " Month")
End Function
สมัครสมาชิก:
บทความ (Atom)
