|
You can build a windows service that starts a timer which on each tick will check the process list, and log whatever u want to log.
A probably better way to do it is through WMI, you will need to create a callback on WMI when a process starts, that way whenever a process starts, WMI will execute the registered callback.
|
|
|
|
|
|
Sorry for sending blank message
the problem is I'm designing a dataform which is liked with sql server 2000 table , on the table i have tree or more choices and I want the user to choose only one of them ,
how can i Binding data to the radiobutton ,
thanks for all
jooooo
|
|
|
|
|
I am getting an invalid column error from oracle from the following code: I checked the columns and they are ok, any ideas ???
"Select A1.PART_CODE, A1.PO_NUMBER, A1.PO_LINE_NUMBER, A3.RECEIVED_DATE " & _
"from FINPROD.POP_LINES A1, FINPROD.GOODS_RECEIVED_LINES A2, FINPROD.GOODS_RECEIVED_HEADERS " & _
"WHERE A1.PART_CODE = sq(txtBox1.text) " & _
"AND A1.PO_NUMBER = A2.PO_NUMBER " & _
"AND A1.PO_LINE_NUMBER = A2.PO_LINE_NUMBER " & _
"AND A2.GRN_NUMBER = A3.GRN_NUMBER " & _
"ORDER BY A3.RECEIVED_DATE"
silver-gray
|
|
|
|
|
The database is not aware of your text fields. You have to put the value from the text field in the query, not the name of the text field.
---
b { font-weight: normal; }
|
|
|
|
|
There are 3 different table involved here. The table A1 will return many rows since it is the purchase order line items table. the other will return one for each of the rows in A1.
I don't understand your reply. This is a select command were the data in txtBNox1.text is the only field that has enterable data in.
Please explain your reply.
Thanks
silver-gray
|
|
|
|
|
The text is converted via the following function
Public Function SQ(ByVal Textin As String) As String
SQ = "'" & Replace(Textin, "'", "''") & "'"
End Function
silver-gray
|
|
|
|
|
The database is not aware of your function either.
You have placed the function call and the reference to the text box inside the string, that means that it's not code, it's just a part of the string. The string will be sent just as it is to the database, and the database couldn't do anything with it even if it did understand what it was, as it doesn't have access to either your function or your text box.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you. Now I understand
Thanks
silver-gray
|
|
|
|
|
Hi,
Can anyone let me know how can I restrict special character like ', " to be entered by the user in the text box?
Thank you,
Regards,
Deepa
|
|
|
|
|
You could handle the TextChanged event, look for the special characters and strip them out.
|
|
|
|
|
Hi
You could try handling the Textbox.TextChanged Event and check the last character for the characters you want to ignore and remove it if it's illegal.
Kevin
|
|
|
|
|
You can also handle the textbox's KeyDown and KeyPress events to check for, and block, illegal characters. There is an example in the KeyDown[^] docs.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I want to use the class System.io and wonder where I put this class in my code. I put the imports system.io at the assemblyinfo.vb but no success in a form when I try and get some info e.g. my.computer.name or my.application.assemblyinfo.companyname.
The squickally line appears below my.
What simple thing am I doing wrong?
|
|
|
|
|
directred wrote: I want to use the class System.io
That is a namespace, not a class.
directred wrote: I put the imports system.io at the assemblyinfo.vb
Don't. It won't do anything for you there.
directred wrote: What simple thing am I doing wrong?
Put the Imports System.IO at the top of each file that needs to use classes in that namespace. Alternatively, you can use the fully qualified name for each class. e.g. System.IO.FileStream
|
|
|
|
|
Example:
Imports System.IO
Public Class FileSystem
Function FileExists(Byval sFile as String) as Boolean
If File.Exists(sFile) Then
Return True
Else
Return False
End If
End Function
End Class
SMC
|
|
|
|
|
You might prefer to reply to the original poster rather than me. It wasn't me that was looking for help.
|
|
|
|
|
I'm writing an app at the moment that is supposed to compare a folder at intervals and check to see if any new files have been writen. I feel like i'm going the long way round about doing this at the moment, there must be an easier way. So far i've got:
Check files in folder
Create an array of the filepaths
timer()
- check folder again
- create another array with contents in
- compare with original
The problem i'm having is when i want to display the jpg files in a pic box, i can't find out which one is the newest file. Ok i could create a file object for each of the paths in the array, but it seems like there's a really easy answer to this and i figured someone on here would know. All i need really in the end is a list (not bothered what type) of new files that have been created in a particular folder, and then from this list i want to be able to see which one is the newest and open it up in a pic box
Any ideas of how i can do this easier than i've done it would be greatly appreciated, as i'm starting to bang my head on the desk
|
|
|
|
|
Look into a 'filesystemwatcher' you can configure it to fire and even when a new file is created or an file updated or a file deleted, etc. Does all the work for you.
|
|
|
|
|
yeah i was just looking into that, found an article here thanks
|
|
|
|
|
This is what i've got so far
I've included the Filesystemwatcher as a control in design view. I'm not really gonna be changing the settings for it in runtime.
The properties are:
EnableRaisingEvents: True
Filter: *.jpg
GenerateMember: True
IncludeSubdirectories: false
Modifiers: Friend
NotifyFilter: Filename, DirectoryName, LastWrite
Path: c:\temp
so i went into the code view and brought up the mFolderWatch event 'create'
i put a simple msgbox(e.name) in there so i could see how it works, but the event never occurs. I'm copying an existing jpg so maybe that's why, but i've tried creating a jpg from psp and it still doesn't call the event, do i have it set up incorrectly? I think it might have something todo with notifyfilter?
|
|
|
|
|
i changed notifyfilter to just filename, and it seems to work now :S
|
|
|
|
|
I was thinking about how to store the names generated by the filewatcher
does the filewatcher store the filenames for me (that'd be really great!), but i'm guessing it doesn't
Just wondered how other people would go about storing this list. I might have 100 files in a folder that are created.
I was thinking about storing the file list as an array of strings, but then the idea was to load up the latest file in a pic box, so maybe an array of file objects? Does that seem like a backwards way of going forwards? I just wondered if anyone had any ideas of an easier way to store this kind of list of information in vb.net, i've just recently moved from vb6 so you'll have to excuse my dumbness!
|
|
|
|
|
Hi,
I have managed to add WMP to aform in vb.net, however I'm not sure how to get it to play a video of my choosing. What i would like is that when the form opens, the user clicks on play and the video clip thats already on the system begins to play.
how do I do this?
Thanks.
|
|
|
|
|
Have you read the WMP docs ? There's a property, I suspect it's Url, that you set to the path of the file. There's anotehr property called ctl_controls ( from memory ), which has play, stop, etc methods on it.
Christian Graus - C++ MVP
|
|
|
|