
558
|
Chapter 13: The ‘My’ Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Example
The following example displays an image from the system clipboard if it contains an
image. This example assumes that your form includes a picture box control named
PictureBox1.
If (My.Computer.Clipboard.ContainsImage( ) = True) Then
PictureBox1.Image = My.Computer.Clipboard.GetImage( )
End If
Related Framework Entries
• Microsoft.VisualBasic.MyServices.ClipboardProxy.GetImage Method
• System.Windows.Forms.Clipboard.GetImage Method
See Also
Clipboard Object, ContainsImage Method, GetAudioStream Method, GetData
Method, GetDataObject Method, GetFileDropList Method, GetImage Method,
GetText Method, SetImage Method
GetName Method
Location
My.Computer.FileSystem.GetName
Syntax
Dim result As String = My.Computer.FileSystem.GetFileName(path)
path (required; String)
The path to be examined
Description
The GetName method examines a valid filename path and returns only the filename
portion, with all drive letters, folders, and directories removed.
Usage at a Glance
The original path must be correctly formatted, but it does not need to refer to an
actual file on the file system.
Related Framework Entries
• Microsoft.VisualBasic.MyServices.FileSystemProxy.GetName Method
• Microsoft.VisualBasic.FileIO.FileSystem.GetName Method
• System.IO.Path.GetFileName Method
See Also ...