User: Sign In
Mobile
Can
11,832 photos 2014: 311 2013: 827 | 2012: 730
Tempe
Arizona
Sedona
Search Sum
Minis Special
Exif Wide
1
5
10
12
Navigator
1.* Photos *
|
2.Best/Pano/Minis
|
3.My Adventures
|
4.Travels
|
5.Questions/Answers
|
6.Prog
|
7.Maps
|
8.Cool
Programming
1.Unix
|
2.* Perl *
|
3.PHP
|
4.ASP.NET
|
5.ASP
|
6.Visual C++
|
7.Visual Basic
|
8.JavaScript
|
9.HTML
|
10.CSS
|
11.CGI, bin and Perl
|
12.Cygwin
|
13.Linux
|
14.mySQL
|
15.Python
|
16.robertbody C++ & *.BAT
|
17.Unix Notes (live)
|
18.Perl Notes (live)
(Navigator)
1.* Photos * | 2.Best/Pano/Minis | 3.My Adventures | 4.Travels | 5.Questions/Answers | 6.Prog | 7.Maps | 8.Cool

Programming

1.Unix | 2.* Perl * | 3.PHP | 4.ASP.NET | 5.ASP | 6.Visual C++ | 7.Visual Basic | 8.JavaScript | 9.HTML | 10.CSS |
11.CGI, bin and Perl | 12.Cygwin | 13.Linux | 14.mySQL | 15.Python | 16.robertbody C++ & *.BAT |
17.Unix Notes (live) | 18.Perl Notes (live)

Visual Basic

-  +


1. Set Windows Clipboard
The Visual Basic (VB) code below reads a file and copies it to Windows clipboard.
usage: set-clip.exe FILENAME
Download executable -- set-clip.exe ............. 16,384 bytes
Attribute VB_Name = "MainModule"
Sub Main()

'##############################################################
'#     name: set-clip.bas   (Visual Basic code for Windows)
'# modified: 2003-09-20 10:48
'#  assumes: command line argument is valid -- file exists
'#   output: copies contents of file to Windows clipboard
'#    usage:    set-clip.exe  FILENAME
'##############################################################

  Dim cmdLine As String
  Dim myString As String
  Dim iFileNum As Integer
  
  'read command line
  cmdLine = Command()
  myString = ""
  
  '--------------------------------------------------
  '  read from file, adding  after each line
  '--------------------------------------------------
  iFileNum = FreeFile
  Open cmdLine For Input As #iFileNum
    'If (Err.Number = 0) Then
       Do While (Not EOF(iFileNum))
           Line Input #iFileNum, S
           myString = myString & S & vbCrLf
       Loop
    'End If
  Close #iFileNum
     
  'clear clipboard
  Clipboard.Clear
  
  'set clipboard
  Clipboard.SetText myString

End Sub
        

Counter:
Last Updated: Thu, September 1, 2005 20:09