|
Gagan.20 wrote: What is the use of .cab files?
How to add these .cab files in deployement projects and how to extract files stored in the .cab files?
Someome help me...
This page should help you[^]
|
|
|
|
|
Hi ,
at runtime i want to add a new row and from the datatable i want to put those values
in to the grid .
In datatabel i have 1 ,2,3,4 i have to make changes to these no.s and assign YES NO like that .
How can i do these things??
|
|
|
|
|
VB 8.0 wrote: how to add a new row to datagridview at runtime.
use Datagridview1.rows.add() statement for add a row
VB 8.0 wrote: In datatabel i have 1 ,2,3,4 i have to make changes to these no.s and assign YES NO like that .
explain this in detail. so we can properly understand your problem and suggest you
|
|
|
|
|
I am Using Vb.net 3.5 as Frontend
I am creating a Windows Application.
I am Using a thread 'ThradSend' that do some work, I am starting thread as 'ThreadSend.Start()' and ending the thread ThreadSend.Abort()
It will work fine in my application but Throws an exception that 'Thread was being aborted. at System.Windows.Forms.dll ...'
This will no hampered my code but still a error a message displayed.
How can I Stop this Problem Or How can I Stop a running Tread . I can't use Thread.suspend() because it says Obsolute.....
AB
|
|
|
|
|
The Abort method stops the thread by throwing a ThreadAbortException in the thread. For this to work properly your thread has to be written to support this. As it doesn't catch the exception and handle the situation, it isn't supporting this.
The easiest way to stop a thread is to make it stop itself. Use a synchronised variable that the thread checks periodically. When you change the variable, the thread should just end it's loop and exit.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello Everyone
Anyone know how to detect plug and play service using vb.net
Assume i plugged Flash drive to my PC. Then Plug and play service detecting a flash drive detected and ready to use.
In vb.NET can i create a program to detect Flash drive or another component?
i need to read staus of Plug and play service.
Please Help...
Lasantha Indrajith
|
|
|
|
|
What do you want your program to do when a plug and play device is detected?
|
|
|
|
|
Hey,
You could count the number of logical drives (using a timer), store that value in a variable and keep comparing the new and the old situation. When it's different, you know a swappable drive was plugged in. Note that this won't work in all situations and that many things cán go wrong
Motivation is the key to software development.
|
|
|
|
|
Hello Dears,
i am a graduate student in computer science. i am doing my project in SNIFFING DETECTION ON ETHERNET. please help me and tell me the "Algo of sniffing detectoin" the "source code" and libraries in VB or Vb.Net
I am Greatly thankfull for this help
my ID is <asim_araeen@yahoo.com>
Thanks
|
|
|
|
|
I don't think anyone here wants to do your project or homework for you. How about starting with a Google search: detect a network sniffer[^]
|
|
|
|
|
asim araeen wrote: please help me and tell me the "Algo of sniffing detectoin"
That is what your graduate adviser is for. Ask him or her for help.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hai all,
if your program store a user password, where you normally tore them?
i.e. registry, ini, text files etc.
|
|
|
|
|
if your program have multiple user then i prefer to store it in database( like MSAccess, SQL Server etc.) or if your program have only single user then you can store in any way like in text file, XML file, registry , database or even in code(bad option). you can also store user name and password in registry in encrypted form
|
|
|
|
|
Hai swami,
Thanks a lot. so i preferre to store it in the registry under my programs key. i have only two other values for my programs. so with the password, then only 3 values. so is it ok to store the password in a value call "user_password" and the data is the 31bit encrypted password.
will this value name "user_password" ok or still i need to put a junk name for the value?
|
|
|
|
|
afridy wrote: o i preferre to store it in the registry under my programs key
choose some different name for key so it seems like the key of Windows OS key
afridy wrote: will this value name "user_password" ok or still i need to put a junk name for the value?
same for here as above
|
|
|
|
|
I'm not sure this is the correct place to post but since I wrote the code in vb I figured I would start here. I have a service that I created that writes to a text file, but it only writes 16 times and then stops. I have not asked it to stop it just does it on it's own. I am using this for testing because I have a bigger project that I need to create as a Window service and the timer wasn't working in it. So I created this small testing project and still can't get the timer to work correctly. Could some one please give me some clues as to what might be wrong with the code? I copied below what I am using.
Public Class AuthorLog
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.
Const iTIME_INTERVAL As Integer = 15000 ' 15 seconds.
Dim oTimer As System.Threading.Timer
Dim strline = vbCrLf
System.IO.File.AppendAllText("C:\AuthorLog.txt", "AuthorLogService has been started at " & Now.ToString() & vbCrLf)
Dim tDelegate As Threading.TimerCallback = AddressOf EventAction
oTimer = New System.Threading.Timer(tDelegate, Me, 0, iTIME_INTERVAL)
End Sub
Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
End Sub
Public Sub EventAction(ByVal sender As Object)
System.IO.File.AppendAllText("C:\AuthorLog.txt", "AuthorLogService fires EventAction at " & Now.ToString() & vbCrLf)
End Sub
End Class
Thanks for your assistance in advance.
Carolyn
If you can’t have fun at work, then why go to work?
|
|
|
|
|
It probably stops when the oTimer object get's garbage collected, since it's no longer in scope when your OnStart method gets to End Sub . Using a Timer to run a service is pretty much bad practice. You normally use the OnStart method to setup and start a new Thread containing your service code.
|
|
|
|
|
I am really not understanding the reply. I thought timers were used in services to set how often it should run. Could you explain how a service would be set up? Everything I have researched and looked up on services shows the setup like I have in the code snippet above.
Thank you.
If you can’t have fun at work, then why go to work?
|
|
|
|
|
CARisk3 wrote: I thought timers were used in services to set how often it should run
Wrong. Timers are used in any application to execute code at a specific interval. They are not specific to services, and frankly, when I see a timer in a service, I immediately suspect it's not being used properly, or for the right reasons.
CARisk3 wrote: I am really not understanding the reply.
What's hard to understand? You simply stop the timer at the start of your timer tick handler and restart it at the end. That way, the timer won't call your code again until you're ready for it to do so.
CARisk3 wrote: Everything I have researched and looked up on services shows the setup like I have in the code snippet above.
That's the problem with using other peoples code. You don't know why they're doing something, or if it's even the correct way to do want you want.
|
|
|
|
|
Could you help me understand? I need to have a program run every half hour to check the server to see if new folders have been created. If new folders have been added then I need to update the database with the new folder names. (The reason I am doing this is we have a content management system and if the users add new folders to the server then the cms doesn't recognize them. The users are putting content into the folders and then linking to files within the new folders from cms.) To my understanding this should be a service.
I created the routine in Visual Studio 2005 and when I run it manually, it does what I need it to do. It adds the folders and permissions correctly. The problem is I don't want to have to remember to run the application every half hour. Plus our users could be adding content at any time of the day or night.
I really need to understand how services work and how to set them up correctly as my supervisor is wanting me to automate some other routines. If you don't have time to explain, could you point me in the direction of a book or website with a good explanation and examples. I've been trying to get this to work for a couple of months.
If you can’t have fun at work, then why go to work?
|
|
|
|
|
Normally, you'd use the OnStart event of the server to start a new thread. This thread, in your case, would setup a FileSystemWatcher and sit there, waiting for events. The FileSystemWatcher fires a Created event whenever a file or folder is created in the directory it's watching. This is where you'd do you database update.
You wouldn't use a Timer to do this at all.
Try looking at this[^] and this[^].
|
|
|
|
|
Thank you very much. I didn't know about the file watch feature. I will read through the two links and see if I can apply them.
Do you know of any good books or websites that explain how to set up services that aren't file watchers? We are also wanting to set up some services that will synchronize data between a bought system and our in house systems.
Once again thank you very much for taking the time to respond to my questions and pointing me in the right direction.
If you can’t have fun at work, then why go to work?
|
|
|
|
|
I used VS 2008 to develop and deploy a small VB web project. The sample app has two buttons. One button will create a xml file and the other button will create a text file, see code below. Unfortunately, when I press either button on the web page, I get an “HTTP Error 404 - File or directory not found.”.
Any ideas on what the problem might be. The project works as advertised locally. By the way, how does VS (using a WEB project) handle calls to local drives? Let’s say that I am placing a file in the folder located at “C:\customers”. Does that translate to web, meaning the www.root folder?
Dim xmlFileName As String = "SampleWebApplication.xml" 'ensure each session is unique<br />
<br />
Using writer As XmlWriter = XmlWriter.Create(xmlFileName, settings)<br />
writer.WriteStartDocument()<br />
<br />
writer.WriteStartElement("Application")<br />
<br />
writer.WriteStartElement("Accept_Date")<br />
writer.WriteValue(Date.Now())<br />
writer.WriteEndElement()<br />
<br />
writer.WriteEndDocument()<br />
<br />
writer.Flush()
Using sw As StreamWriter = New StreamWriter("TestFile.txt")<br />
sw.WriteLine("This is a test")<br />
sw.WriteLine(DateTime.Now)<br />
sw.Close()
cab3
|
|
|
|
|
Ask this question in the ASP.NET forum.
I will tell you that one of the problems you're having is you're not specifying a full path to the files you're trying to write. Your code assumes the current directory is the directory your web pages are being served from. You can't do that. It's always good practice to build fully qualified path names to files. In order to do that in an ASP.NET app, I think you have to look into the Server.MapPath method.
|
|
|
|
|
Thanks very much. Yes you are right, and that fixed the problem.
cab3
|
|
|
|