|
|
Viết bởi: Noname 03-09-10, 06:34 PM Chuyên mục: Thư viện thủ thuật - Không có hồi đáp |

Function totalDayOfMonth(m As Integer, y As Integer) As Integer
totalDayOfMonth = Day(DateSerial(y, m + 1, 0))
End FunctionPrivate Sub Command0_Click()
Dim m As Integer, y As Integer
m = 2
y = 2010
MsgBox "thang " & m & " nam " & y & " co " & totalDayOfMonth(m, y) & " ngay "
End Sub
|
|
Viết bởi: Noname 02-09-10, 03:20 PM Chuyên mục: Thư viện thủ thuật - Không có hồi đáp |
'reads the value for the registry key i_RegKey
'if the key cannot be found, the return value is ""
Function RegKeyRead(i_RegKey As String) As String
Dim myWS As Object
On Error Resume Next
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'read key from registry
RegKeyRead = myWS.RegRead(i_RegKey)
End Function'returns True if the registry key i_RegKey was found
'and False if not
Function RegKeyExists(i_RegKey As String) As Boolean
Dim myWS As Object
On Error GoTo ErrorHandler
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'try to read the registry key
myWS.RegRead i_RegKey
'key was found
RegKeyExists = True
Exit Function
ErrorHandler:
'key was not found
RegKeyExists = False
End Function'sets the registry key i_RegKey to the
'value i_Value with type i_Type
'if i_Type is omitted, the value will be saved as string
'if i_RegKey wasn't found, a new registry key will be created
Sub RegKeySave(i_RegKey As String, _
i_Value As String, _
Optional i_Type As String = "REG_SZ")
Dim myWS As Object
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'write registry key
myWS.RegWrite i_RegKey, i_Value, i_Type
End Sub'deletes i_RegKey from the registry
'returns True if the deletion was successful,
'and False if not (the key couldn't be found)
Function RegKeyDelete(i_RegKey As String) As Boolean
Dim myWS As Object
On Error GoTo ErrorHandler
'access Windows scripting
Set myWS = CreateObject("WScript.Shell")
'delete registry key
myWS.RegDelete i_RegKey
'deletion was successful
RegKeyDelete = True
Exit Function
ErrorHandler:
'deletion wasn't successful
RegKeyDelete = False
End Function[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"'UniKey"="D:\\Soft\\UniKey4.0\\unikey40RC2-1101-win32\\UniKeyNT.exe"Dim key as String, v as String
key="[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
'UniKey'"
v="D:\\Soft\\UniKey4.0\\unikey40RC2-1101-win32\\UniKeyNT.exe"
RegKeySave key,v
|
|
Viết bởi: Noname 02-09-10, 11:50 AM Chuyên mục: Tin Học Văn Phòng - Không có hồi đáp |
![[Hình: lanico.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/lanico.jpg)
![[Hình: lanprop.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/lanprop.jpg)
![[Hình: tcpipi.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/tcpipi.jpg)
![[Hình: opendns.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/opendns.jpg)
![[Hình: dnsGoogle.png]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/dnsGoogle.png)
![[Hình: opendns.jpg]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/opendns.jpg)
![[Hình: dnsVnn.png]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/dnsVnn.png)
![[Hình: dnsFPT.png]](http://i39.photobucket.com/albums/e193/duytuan2002/Access/dnsFPT.png)
|
|
Viết bởi: haquocquan 01-09-10, 09:40 AM Chuyên mục: Report - Bài trả lời (1) |
|
|
Viết bởi: Noname 01-09-10, 09:27 AM Chuyên mục: Tương tác Chương trình ngoài - Bài trả lời (7) |

Sub getPicture(url As String)
Set WinHttpReq = New WinHttpRequest
' Tạo một mảng chứa dữ liệu trả về
Dim d() As Byte
' Mở 1 thủ tục một yêu cầu lấy dữ liệu
WinHttpReq.Open "GET", url, False
' Gửi yêu cầu đó tới server
WinHttpReq.Send
' Lấy về tiến trình tải về .
Text1.Value = WinHttpReq.Status & " - " & WinHttpReq.StatusText
' Đưa dữ liệu nhận được vào mảng đã khai báo với file tạm là temp.gif trong bộ nhớ
Open "temp.jpg" For Binary As #1
d() = WinHttpReq.ResponseBody
Put #1, 1, d()
Close
' gán file vào giá trị đối tượng picture tạo sẵn
Picture1.Picture = "temp.jpg"
End SubPrivate Sub Command1_Click()
getPicture "http://i39.photobucket.com/albums/e193/duytuan2002/Access/Thuthuataccess.jpg"
End Sub
| Chủ đề Mới nhất |
| Quản lý quầy thuốc nhỏ lẻ -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: chuvanthom-08-12-25, 09:12 PM- » Bài trả lời: 2- » Lượt xem: 3,260 |
| Demo - Tra cứu thông tin ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: ongke0711-16-11-25, 07:03 PM- » Bài trả lời: 26- » Lượt xem: 4,127 |
| Quản lý kho bằng Accesss -Chuyên mục: Thảo Luận Access-Đăng bởi lần cuối: hoandokhai-18-10-25, 04:48 PM- » Bài trả lời: 70- » Lượt xem: 5,947 |
| Thơ Nhạc Nhất Lang - Cảm ... -Chuyên mục: Góc Thơ -Đăng bởi lần cuối: Nguyễn Thành Sáng-09-10-25, 03:12 PM- » Bài trả lời: 1- » Lượt xem: 66 |
| Quản Lý Phòng Khám Tư Nhâ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: tt1212-09-09-25, 05:03 PM- » Bài trả lời: 32- » Lượt xem: 7,340 |
| Thử nghiệm upload hình -Chuyên mục: Phòng thử nghiệm-Đăng bởi lần cuối: Noname-29-08-25, 09:44 AM- » Bài trả lời: 2- » Lượt xem: 750 |
| Quản Lý Công Văn -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: Adung-23-07-25, 10:05 AM- » Bài trả lời: 8- » Lượt xem: 13,051 |
| (Update v.1.0.85 - 30/06/... -Chuyên mục: Thảo Luận Access-Đăng bởi lần cuối: Adung-22-07-25, 10:46 AM- » Bài trả lời: 270- » Lượt xem: 114,475 |
| Video Tự học Access ( Cơ ... -Chuyên mục: Thư Viện Giáo Trình-Đăng bởi lần cuối: Nguyễn Đình Thọ-21-07-25, 10:42 AM- » Bài trả lời: 7- » Lượt xem: 9,237 |
| E chia sẽ Quản lý nhà trọ -Chuyên mục: Forms-Đăng bởi lần cuối: hoaithanh-18-07-25, 02:28 PM- » Bài trả lời: 0- » Lượt xem: 293 |
| Diễn đàn Thống kê |
|
» Thành viên: 8,045 » Thành viên mới nhất: 789pcenteritcom1 » Các chủ đề diễn đàn: 9,898 » Các bài viết diễn: 48,828 Thống kê đầy đủ |