NguyenDungAnh > 12-09-18, 10:40 PM
ongke0711 > 13-09-18, 12:23 AM
(12-09-18, 10:40 PM)NguyenDungAnh Đã viết: Bac dan giúp em được không sao cái hàm uniconvert này em copy vào module mà lại không gọi được nó ra ở forms, hay report muốn sử dụng lại phải copy lại hàm uniconvert này vào form ấy mới gọi ra được.
NguyenDungAnh > 21-09-18, 06:09 PM
Option Compare Database
#If VBA7 Then
Private Declare PtrSafe Function GetActiveWindow Lib "user32" () As LongPtr
Private Declare PtrSafe Function MessageBoxW Lib "user32" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As LongPtr
#Else
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function MessageBoxW Lib "user32" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
#End If
Public Function msgBoxUni(ByVal PromptUni As Variant, Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, Optional ByVal TitleUni As Variant = vbNullString) As VbMsgBoxResult
'BStrMsg,BStrTitle : La chuoi Unicode
Dim BStrMsg, BStrTitle
'Hàm StrConv Chuyen chuoi ve ma Unicode
BStrMsg = StrConv(PromptUni, vbUnicode)
BStrTitle = StrConv(TitleUni, vbUnicode)
msgBoxUni = MessageBoxW(GetActiveWindow, BStrMsg, BStrTitle, Buttons)
End Function
' Phat bieu de hien thong bao tieng viet
'MsgBoxUni UNC("Chµo c¸c b¹n"), vbInformation, _
UNC("TCVN3")
'MsgBoxUni VNI("Chaøo caùc baïn"), vbInformation, _
VNI("VNI")
ongke0711 > 21-09-18, 07:14 PM
NguyenDungAnh > 21-09-18, 11:11 PM
NguyenDungAnh > 21-09-18, 11:30 PM
NguyenDungAnh > 22-09-18, 12:28 AM
NguyenDungAnh > 22-09-18, 12:36 AM
ongke0711 > 22-09-18, 12:29 PM
NguyenDungAnh > 22-09-18, 12:40 PM