Advertisement
7_2009-2012 Files/ File Controls/ Input/ Output #218293

DirectoryTreeview

There are no drivelist, dirlist, or filelist controls available in VB.net. This example shows how to use a treeview to display a list of folders to a user, and allow the user to select a file. Compatible with VB 2005.

AI

AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

소스 코드
original-source
'Uncomment the sub and 
'end sub lines to use this in a program.
'Leaving these commented will allow you 
'to run this as a standalone script
'sub SendAttach() 
'Open mail, adress, attach report
dim objOutlk	'Outlook
dim objMail	'Email item
dim strMsg
const olMailItem = 0
'Create a new message
	set objOutlk = createobject("Outlook.Application")
	set objMail = objOutlk.createitem(olMailItem)
	objMail.To = "[email protected]"
	objMail.cc = "" 'Enter an address here to include a carbon copy; bcc is for blind carbon copy's
'Set up Subject Line
	objMail.subject = "I saw your code on Planet Source Code on " & cstr(month(now)) & "/" & cstr(day(now)) & "/" & cstr(year(now))
'Add the body
	
	strMsg = "Your code rocks!" & vbcrlf
	strMsg = strMsg & "I voted and gave you an excellent rating!"
'To add an attachment, use:
	'objMail.attachments.add("C:\MyAttachmentFile.txt")
	objMail.body = strMsg
	objMail.display 'Use this to display before sending, otherwise call objMail.Send to send without reviewing
'Clean up
set objMail = nothing
set objOutlk = nothing
'end sub
Upload
원본 댓글 (3)
Wayback Machine에서 복구됨