Click here to Skip to main content
15,886,799 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow code to Print a Bit map image to pos printer via comport in VB6 Pin
Member 149097158-Aug-20 0:25
Member 149097158-Aug-20 0:25 
AnswerRe: How code to Print a Bit map image to pos printer via comport in VB6 Pin
Richard MacCutchan8-Aug-20 0:46
mveRichard MacCutchan8-Aug-20 0:46 
AnswerRe: How code to Print a Bit map image to pos printer via comport in VB6 Pin
Eddy Vluggen22-Aug-20 10:07
professionalEddy Vluggen22-Aug-20 10:07 
QuestionGeoreferencing Pin
Benniit7-Aug-20 20:50
Benniit7-Aug-20 20:50 
AnswerRe: Georeferencing Pin
OriginalGriff7-Aug-20 20:51
mveOriginalGriff7-Aug-20 20:51 
AnswerRe: Georeferencing Pin
Richard MacCutchan7-Aug-20 21:51
mveRichard MacCutchan7-Aug-20 21:51 
AnswerRe: Georeferencing Pin
Eddy Vluggen22-Aug-20 10:09
professionalEddy Vluggen22-Aug-20 10:09 
QuestionFile System Watcher for remote folders? Pin
ForeverSoftware6-Aug-20 3:47
ForeverSoftware6-Aug-20 3:47 
Hi all. I've seen how to do a file system watch on a local folder. Is it possible to watch a remote folder on an ftp site?

Code for local folder:

VB
gfswWatchFolder = New System.IO.FileSystemWatcher()

'This is the path we want to monitor
gfswWatchFolder.Path = "C:\My Documents\Temp2"

'Add a list of Filters we want to specify, making sure
'you use OR for each Filter as we need to all of those
gfswWatchFolder.NotifyFilter = IO.NotifyFilters.DirectoryName
gfswWatchFolder.NotifyFilter = gfswWatchFolder.NotifyFilter Or IO.NotifyFilters.FileName
gfswWatchFolder.NotifyFilter = gfswWatchFolder.NotifyFilter Or IO.NotifyFilters.Attributes

'Add the handler to each event
AddHandler gfswWatchFolder.Changed, AddressOf LogChange
AddHandler gfswWatchFolder.Created, AddressOf LogChange
AddHandler gfswWatchFolder.Deleted, AddressOf LogChange

'Add the rename handler as the signature is different
AddHandler gfswWatchFolder.Renamed, AddressOf LogChange

'Set this property to true to start watching
gfswWatchFolder.EnableRaisingEvents = True


and

VB
<pre>    Private Sub LogChange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs)

        'Form_Load: System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = False

        If e.ChangeType = IO.WatcherChangeTypes.Changed Then
            TextBoxMultiLine1.Text = "File " & e.FullPath & " has been modified." & vbCrLf
        End If
        If e.ChangeType = IO.WatcherChangeTypes.Created Then
            TextBoxMultiLine1.Text = "File " & e.FullPath & " has been created." & vbCrLf
        End If
        If e.ChangeType = IO.WatcherChangeTypes.Deleted Then
            TextBoxMultiLine1.Text = "File " & e.FullPath & " has been deleted." & vbCrLf
        End If
        If e.ChangeType = IO.WatcherChangeTypes.Renamed Then
            TextBoxMultiLine1.Text = "File " & e.FullPath & " has been renamed." & vbCrLf
        End If

    End Sub


I know how to open a remote folder using
VB
<pre>Dim request As FtpWebRequest = DirectCast(WebRequest.Create(mstrFTPUri & strRemoteApplicationFolder), FtpWebRequest)


etc. etc. but how do I combine the two? Thanks in advance.
AnswerRe: File System Watcher for remote folders? Pin
Richard Deeming6-Aug-20 4:00
mveRichard Deeming6-Aug-20 4:00 
QuestionRunning VBA in Shared Mailboxes 365 Pin
Willie_n5-Aug-20 23:20
Willie_n5-Aug-20 23:20 
AnswerRe: Running VBA in Shared Mailboxes 365 Pin
CHill6014-Aug-20 1:38
mveCHill6014-Aug-20 1:38 
QuestionBizarre problem with VBA in an Access Form Pin
Peter R. Fletcher16-Jul-20 12:03
Peter R. Fletcher16-Jul-20 12:03 
AnswerRe: Bizarre problem with VBA in an Access Form Pin
CHill6020-Jul-20 5:30
mveCHill6020-Jul-20 5:30 
AnswerRe: Bizarre problem with VBA in an Access Form Pin
CHill6020-Jul-20 5:44
mveCHill6020-Jul-20 5:44 
GeneralRe: Bizarre problem with VBA in an Access Form Pin
Peter R. Fletcher20-Jul-20 7:43
Peter R. Fletcher20-Jul-20 7:43 
GeneralRe: Bizarre problem with VBA in an Access Form Pin
Dave Kreskowiak20-Jul-20 7:59
mveDave Kreskowiak20-Jul-20 7:59 
GeneralRe: Bizarre problem with VBA in an Access Form Pin
CHill6021-Jul-20 2:21
mveCHill6021-Jul-20 2:21 
GeneralRe: Bizarre problem with VBA in an Access Form Pin
Dave Kreskowiak21-Jul-20 5:00
mveDave Kreskowiak21-Jul-20 5:00 
GeneralRe: Bizarre problem with VBA in an Access Form Pin
CHill6021-Jul-20 5:07
mveCHill6021-Jul-20 5:07 
QuestionVB Script Using Com Interface with Out String Pointer Pin
Thomas Andreas Kocher9-Jul-20 23:40
Thomas Andreas Kocher9-Jul-20 23:40 
AnswerRe: VB Script Using Com Interface with Out String Pointer Pin
Dave Kreskowiak12-Jul-20 14:45
mveDave Kreskowiak12-Jul-20 14:45 
QuestionHow to get one I have multiple objects of the same type at run time with VB 2010 Pin
Member 1487052122-Jun-20 18:01
Member 1487052122-Jun-20 18:01 
AnswerRe: How to get one I have multiple objects of the same type at run time with VB 2010 Pin
Dave Kreskowiak23-Jun-20 13:55
mveDave Kreskowiak23-Jun-20 13:55 
AnswerRe: How to get one I have multiple objects of the same type at run time with VB 2010 Pin
Ralf Meier23-Jun-20 20:47
mveRalf Meier23-Jun-20 20:47 
AnswerRe: How to get one I have multiple objects of the same type at run time with VB 2010 Pin
Member 1487052124-Jun-20 3:54
Member 1487052124-Jun-20 3:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.