Click here to Skip to main content
15,913,055 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: "Declaration expected" Pin
Guffa16-Jan-06 8:45
Guffa16-Jan-06 8:45 
GeneralRe: "Declaration expected" Pin
kenn_rosie16-Jan-06 8:55
kenn_rosie16-Jan-06 8:55 
GeneralRe: "Declaration expected" Pin
Guffa16-Jan-06 10:56
Guffa16-Jan-06 10:56 
GeneralRe: "Declaration expected" Pin
kenn_rosie16-Jan-06 12:19
kenn_rosie16-Jan-06 12:19 
AnswerRe: "Declaration expected" Pin
Guffa16-Jan-06 13:09
Guffa16-Jan-06 13:09 
GeneralRe: "Declaration expected" Pin
kenn_rosie16-Jan-06 13:21
kenn_rosie16-Jan-06 13:21 
AnswerRe: "Declaration expected" Pin
Guffa19-Jan-06 21:34
Guffa19-Jan-06 21:34 
QuestionProblem running Windows Service Pin
luciodandrea16-Jan-06 6:15
luciodandrea16-Jan-06 6:15 
hi, i'm just a vb.net beginner, and i'm developing a resources monitor which runs as a windows service...
before installing it (using the installutil command in the VS command prompt) i test it as a windows application, and everything works fine...there's a button that, when clicked, performs the things i want to...but when i create the service, i paste the code into a timer.elapsed event, but nothing happens...
the timer is enabled in the onstart method of the service, and then disabled in the onstop method...
also, the service install succesfully on the machine...
below is the code i'm trying to run...

Private Sub Timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer.Elapsed

Dim dirs() As String
Dim directorio As String
Dim arch As String
Dim archs() As String
Dim objarch As FileInfo
Dim tamaño As Long
Dim from As String
Dim para As String
Dim mailbody As String
Dim asunto As String

dirs = Directory.GetDirectories("d:\", "ssa*")
For Each directorio In dirs

archs = Directory.GetFiles(directorio, "*.pst")
For Each arch In archs

objarch = New FileInfo(arch)
If objarch.Length > 1073741824 Then

tamaño = objarch.Length / (1024 * 1024) 'MBytes
mailbody = "El usuario debe limpiar sus Personal Folders!!"
asunto = "Archivo .pst grande"
MsgBox("Enviando mail!!")
enviarmail(from, para, mailbody, asunto) 'method for sending mails

End If
Next
Next
End Sub


p/d: also, if i write any other code instead if this one, it works great...just don't know why is this happening!
GeneralRe: Problem running Windows Service Pin
bskirkman16-Jan-06 11:26
bskirkman16-Jan-06 11:26 
GeneralRe: Problem running Windows Service Pin
luciodandrea17-Jan-06 0:36
luciodandrea17-Jan-06 0:36 
GeneralRe: Problem running Windows Service Pin
bskirkman17-Jan-06 0:50
bskirkman17-Jan-06 0:50 
GeneralRe: Problem running Windows Service Pin
luciodandrea17-Jan-06 0:55
luciodandrea17-Jan-06 0:55 
GeneralRe: Problem running Windows Service Pin
bskirkman17-Jan-06 1:01
bskirkman17-Jan-06 1:01 
GeneralRe: Problem running Windows Service Pin
bskirkman19-Jan-06 15:51
bskirkman19-Jan-06 15:51 
GeneralRe: Problem running Windows Service Pin
luciodandrea20-Jan-06 2:39
luciodandrea20-Jan-06 2:39 
GeneralRe: Problem running Windows Service Pin
bskirkman20-Jan-06 2:47
bskirkman20-Jan-06 2:47 
Question[Message Deleted] Pin
GitaWist16-Jan-06 2:08
GitaWist16-Jan-06 2:08 
GeneralRe: help me pls!!! Pin
Guffa16-Jan-06 2:45
Guffa16-Jan-06 2:45 
AnswerRe: help me pls!!! Pin
Steve Pullan16-Jan-06 11:16
Steve Pullan16-Jan-06 11:16 
QuestionSearching a dataset using VB.Net Pin
mayhem_rules16-Jan-06 1:14
mayhem_rules16-Jan-06 1:14 
AnswerRe: Searching a dataset using VB.Net Pin
Robert Rohde16-Jan-06 1:25
Robert Rohde16-Jan-06 1:25 
GeneralRe: Searching a dataset using VB.Net Pin
mayhem_rules16-Jan-06 2:36
mayhem_rules16-Jan-06 2:36 
GeneralRe: Searching a dataset using VB.Net Pin
Robert Rohde16-Jan-06 3:53
Robert Rohde16-Jan-06 3:53 
GeneralRe: Searching a dataset using VB.Net Pin
mayhem_rules16-Jan-06 17:20
mayhem_rules16-Jan-06 17:20 
GeneralRe: Searching a dataset using VB.Net Pin
Robert Rohde16-Jan-06 20:25
Robert Rohde16-Jan-06 20:25 

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.