Here is some code that I wrote but I am not sure if it is right.
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
Timer1.Enabled = True
Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
Timer1.Enabled = False
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'Check if the event log exists
If Not Diagnostics.EventLog.SourceExists("MyService") Then
Diagnostics.EventLog.CreateEventSource("MyService", "Myservice Log")
EventLog.Source = "MyService"
'Write to the log
Diagnostics.EventLog.WriteEntry("MyService Log", "This is log on " & _
Private Sub SearchFiles(ByVal FileType As String)
Dim FilePath As String = "c:\"
Dim rootDi As New DirectoryInfo(FilePath)
Dim Di As DirectoryInfo
For Each Di In rootDi.GetDirectories
Am I using the code above correctly? I am trying to search for files using windows service in vb.net 2005. I want to be able to specify which file type I am searching for. Please help.
HI,(all in vb 6.0)
i have an dll with a form and some public functions. i add reference of this dll in new project and try to change the command button's picture from calling project.the function gets executed smoothly but i didn't get the result(change in
command button's image).
Any help or hint is greatly appericiated.
i tried using button.refresh but no output.
i also try to sendmessage api to change text using setwindotext and now i can change the caption of the button.
But i need to change the picture of button where i'm in trouble.
Please let me know any suggestion /links.
my project was working good but till when i change its icons ,its giving error when i press F5
Error 1 Unable to write to output file 'C:\Documents and Settings\Windows XP 2005\My Documents\Visual Studio 2005\Projects\*******\obj\Debug\*******.exe': The specified image file did not contain a resource section.
i got where is the problem....the problem occured when i change the icon of the application in "my project properties".
I have a two toolbars on my MDI form. both have 28 * 28 image size. now the icon which I attach with the toolbar button loose its image quality on load . Can any one help me that how can I fix this.
I am facing some problem while reading from CSV file and updating database from the data available in csv file. My problem is that CSV files are too large having atleast 5000 rows and while updating database for each row I need to query database for atleast four times. It means I have to query the database for atleast 200,000 for a single file. This is retarding my application's processing speed and increasing load on machine as well as on database server. Please suggest me how to cope up with this problem?
You should be using DTS (Data Transformation Services) for this, it would drastically bring down the time you would be spending in importing this data. The package can contain conditions and code to suit the business logic.
I have a textbox that was firing Text_changed event when the user press Enter.but now it is not firing any more.But the handler for this event is executed when a postback occur(for example when I click a button).
Could any one tell me how to solve this problem and make it working as before(when the user press Enter)?
The TextChanged event is a server event, so it can only fire during a postback.
When you press enter, it can either be caught by the focused control (if it is a textarea, a select or a button) or by the form. If the form catches it, it will act as if the first button in the form was clicked.
if u r asking for binding the combo box then here's the code
dim con as new oledbconnection("connsctionsting")
dim ds as new dataset
dim ad as new oledbdataadapter("query",con)
Select Datagridview. Now Click on smart tag which is on top Right corner then select Option "Edit Column".Now select the column from selected column list which is of combo box type. Now Select Property Items(collection Type) and Press the associated button button.