|
Sagar Mishra wrote: Once we done with copying the files, we have to intimate the users.
Sagar Mishra wrote: no monitors will be there.
I see two ways:
1.
put a sticker "when your USB stick stops flashing, files got loaded; now wait 5 seconds and remove it."
(this is assuming your USB stick has a busy LED, I haven't seen any without LED yet).
2.
put a red LED on top of each USB receptacle; connect it to the PC, and switch it on when you detected the device presence, and off again when done copying plus 5 second wait.
This[^] may help if your system has a parallel port; a few LEDs can also be controlled through the control lines of a serial port.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Sagar Mishra wrote: Just to let you guys know, no monitor will be there and once we copy the files to USB it should intimate the User.
Marty's loud speakers works very well
Seriously probably a light/LED light connected to PCI slot should work, or through speaker.
Your next problem probably is how to tell the user an error has occurred, some files are not found on server, or the USB is full.
|
|
|
|
|
Yeah, do NOT email people to get a problem solved. I didn't answer because Luc's answers were already there and the best answer you're going to get.
In my humble opinion, basing things on the existance and filename of a text file on the stick is a bad idea. It's just too easy to accidentally delete/move/rename the text file.
|
|
|
|
|
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi,
I am very new to coding, and have purchased training videos on VB6, but I've not completed them as yet. I live in the United Arab Emirates, and everything runs under one proxy . This being a muslim country, they block all sorts of content, including some sites that have tools that I need. I have some sample code to create an internet browser, and was wondering if I could code into it to hide my IP while browsing? Any help would be appreciated, and I look forward to becoming a pro and helping n00bs like myself on this site.
Jannie the n00b.
|
|
|
|
|
raggabox wrote: have purchased training videos on VB6
You just wasted your money. VB6 has long since been dead. VB.NET 2008 Express Edition is free and can be found here[^].
raggabox wrote: wondering if I could code into it to hide my IP while browsing?
There is no such thing. If you could hide the IP, how then would the server figure out where to send the page your downloading?
There is no way to completely prevent someone from finding you. And nothing you can do to make it harder to find you by writing code into your browser.
|
|
|
|
|
Oh I know, I have Vstudio 2008 installed and trying to watch the vids and use VB8 to code. Not easy, but getting there.
|
|
|
|
|
Soooooo, you're trying to use VB.NET 2008 code in VB6?? Yeah, good luck with that. You're going to need it.
|
|
|
|
|
No I think you misunderstood. I am watching the VB 6 videos, but I have 2008 installed. So i am trying the code they show me in vb6 on the vb8 installation. Very different I know. Most of it does work though(vb6 theory in VB8)
|
|
|
|
|
VB6 and VB.net are 2 very different things.
Your better off learning VB.net... Watching a VB6 video and trying to code in VB.net will only confuse you.
|
|
|
|
|
Thanks for the reply. Guess its back to the drawing baord
|
|
|
|
|
No, not really. The point is if you're using the VB6 IDE, compiler, and/or technqiues, you're really wasting your time. VB6 is not an OOP-compliant language. You're really teaching yourself a lot of bad habits by using it and making your job harder learning the true OOP techniques of VB.NET.
|
|
|
|
|
I am currently creating a plugin for Visual Studio .NET. This plugin is to help database entry. When the plugin is running I want to be able to select a file, right click it, and have a menu of options to be able to do with this particular file. Any suggestions on helping how to do this? I am using the MVP model for coding.
|
|
|
|
|
hello all,
Finally I could able to save my dynamic array data into text file. But it is not formated it is saving as a big line. I want to format my data into
9 X 9. Can anyone help me please.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
Dim cellValue As String, i As Integer
Dim returnValue As Boolean
Dim FileWriter As StreamWriter
Dim results As DialogResult
results = SaveFileDialog1.ShowDialog
If results = DialogResult.OK Then
FileWriter = New StreamWriter(SaveFileDialog1.FileName, False)
For r As Integer = 1 To 3
For rr As Integer = 1 To 3
For c As Integer = 1 To 3
For rc As Integer = 1 To 3
cellValue = xx(r, c).rec(rr, rc).Text
returnValue = String.IsNullOrEmpty(cellValue)
If returnValue = True Then
FileWriter.Write("00 ")
Else
FileWriter.WriteLine(cellValue + " ")
End If
Next
i += 1
Next
Next
Next
FileWriter.Close()
End If
Me.Close()
End Sub
I am getting my output like this
8
00 00 00 00 00 00 00 00 00 7
00 13
00 17
00 21
00 00 00 1
00 53
00 51
00 00 00 3
00 00 00 00 00 27
00 00 00 79
00 00 00 49
00 00 00 75
00 00 00 00 00 31
00 00 00 73
00 45
00 47
00 00 00 67
00 63
00 41
00 35
00 00 00 00 00 00 00 00 00 00
but I want to format like
00 00 00 00 00 00 00 00 00
00 07 00 13 00 17 00 21 00
00 00 01 00 53 00 51 00 00
00 03 00 00 00 00 00 27 00
00 00 79 00 00 00 49 00 00
00 75 00 00 00 00 00 31 00
00 00 73 00 45 00 47 00 00
00 67 00 63 00 41 00 35 00
00 00 00 00 00 00 00 00 00
modified on Thursday, September 17, 2009 9:33 AM
|
|
|
|
|
so choose carefully between Write() and WriteLine().
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
If I wrote both write() I am getting a big horizontal line
It I choose writeline() I am getting a vertical line
I don't know how to write a break line for output format
|
|
|
|
|
there are basically two ways for starting a new line:
- outputting a string containing Environment.NewLine
- using WriteLine with some argument; even an empty string would work.
Did you loose all the documentation? Is google defective? how about reading an introductory book on programming?
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Ok, everyone is complaining about you not knowing how to use Write() and WriteLine(), when the real problem is a simple tweak to the algorithm.
1) Get rid of the WriteLine() part in the innermost block... Only use Write() there
2) Right before the second-to-last next (As the last statement in the "For rr" loop, add FileWriter.WriteLine() . That's where you start processing the next line, so that's where you want the line break.
|
|
|
|
|
Thank you very much especially to Ian shlasko you made my day Have a nice day
|
|
|
|
|
Hi all,
I've been researching how to upload a file to a web server. I've found lots of articles about it (most here at CodeProject), but I'm having some problems with my code. Everytime I run the code I get the following error:
The remote server returned an error: (404) Not Found.
My Code:
Dim responseArray As Byte()
Try
Dim WC As New System.Net.WebClient
responseArray = WC.UploadFile("http://someserver/Uploads/upload.aspx", "POST", "\myfile.doc")
txtResponce.Text = "Check the file at " + Encoding.ASCII.GetString(responseArray)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
What I don't understand is what "upload.aspx" is there for. There is never any code to go with it, so I'm not sure what it's there for.(MSDN has this same example, no code to upload.aspx). I've taken the "upload.aspx" out and I get the same error.
I've given the ASPNET and ISS user accounts read/write access to the folder, so I'm sure it's not a permission problem. Can ANYONE explain what I'm doing wrong?
|
|
|
|
|
upload.aspx would be the webpage that would accept your file.
The 404 error means you are trying to communicate to a server (or a document on a server) that does not exist.
|
|
|
|
|
Ok, I finally figured it out. There is a property called Request.Files , It holds all of the data on the files that are being uploaded to that page. You can then loop through it and save the files to the web server.
Code for anyone interested:
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Me.Request.Files.Count <> 0 then
Dim I As Integer
For I = 0 To Me.Request.Files.Count - 1
Me.Request.Files.Item(I).SaveAs("C:\some\path\Uploads\" & Me.Request.Files.Item(I).FileName)
Next
End If
End Sub
End Class
I'm not sure that's the best way to go about it, but it works! I think I may write up an article about this as I couldn't find this information easily ANYWHERE.
|
|
|
|
|
Hi all,
I have written code as
Dim Plist() As System.Diagnostics.Process
Plist = System.Diagnostics.Process.GetProcesses("MySystemName")
Plist(0).Handle.ToString() is saying "Access Denied"
if I use
Plist = System.Diagnostics.Process.GetProcesses("127.0.0.1")
it is saying that "Feature is not supported for remote machines."
How to get the Handle of the each Process ?
Ramesh Sambari
Knowledge is like honey.
Collect it, to make life sweet.
|
|
|
|
|
You may not have sufficient rights. Try to run this code under an account with administrative rights and it will run fine.
Tosch
modified on Thursday, September 17, 2009 8:21 AM
|
|
|
|
|
Hi all,
I want to Know if there is a built in function that takes two dates and retun full date ex(01/02/2000 - 01/01/2000 = 0/1/0)
thanks for help
|
|
|
|