|
I have about 400 zip files contained in a folder for a project at work and I need to get the csv files out. Is there a way to extract them all at once or will I have to get someone to do it!
What I would Ideally like to do is try and get it all automated as I will have to manipulate the csv files afterwards and load them into a database. Someone will have to do this every month and it sure aint gonna be me.
Many Thanks
The FoZ
|
|
|
|
|
You could unzip these things using the command line options of WinZip, or whatever you're using for .ZIP files, and write a DOS batch file to enumerate the files in the folder where they are stored. This batch file would use a FOR statement to grab each filename in the directory and launch WinZip with the correct command line parameters to unpack the files.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks for the reply Dave. Looks like I had better learn batch files quickly.
Thanks Again
The FoZ
|
|
|
|
|
Hi all,
I am trying to figure out how to make a presskey event fire.
The thing is I receive a message trough the serial port which i capture with datareceived event, then i parse the message and depending on the data i need to fire the presskey event. Like i may get the message left arrow key pressed -> how write a code that the application will act the same as if I would press the button on my keyboard.
Hope I was clear with my problem.
PS: I tried SendKeys.Send("{LEFT") but that doesn't work, i guess its becouse application is for smart device windows ce 5.0.
Thanks in advance
Greg
|
|
|
|
|
Are you able to process the received message correctly? Or do you need the key press from your keyboard to go back to the sending application? If the former you could simply call whatever method it is you need to run after processing the received message (if I've understood you correctly).
|
|
|
|
|
Hey,
yes I can receive message trough serial port I parse it and call sendkeys.send({DOWN}) ....
Btw: sendkeys works for smartdevice too but you need to download opennetCF... and reference the dll.
on active form the control from one button to another moves so the sendkeys works, but now i am having problem how to catch which key was sent trough sendkeys to active form...for example if lets say ESC key will be sent i need to do something...if I would be using keyboard i would use Keypressed event ...and if e.keys = ESC then
do something....
but how to catch this when i send which key is pressed trough sendkeys.send???
hope i am not to complicating but this is essential for my app.
Thanks
greg
|
|
|
|
|
i am using a extensibility-shared add-in project in which i show a form when the power point slide show starts
Private Sub pptApplication_SlideShowNextSlide(ByVal Wn As Interop.PowerPoint.SlideShowWindow) Handles pptApplication.SlideShowNextSlide
Form1.show()
End Sub
I accept the key events and mouse evets on this form and when i press a right arrow key the form should remain visible and focus should come on the powerpoint slide so that when i press the right arrow key again it should fire the powerpoint's slideshownext event. but i am not able to remove the focus from the form and hence the slideshow next event is not getting fired. can any1 please help ?
Chakor
|
|
|
|
|
You'd have to use the Win32 API functions FindWindow and SetForegroundWindow to activate the application then you use SendKeys[^] to send the keystrokes you want to send to the PowerPoint window.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello All,
Is there any way to extract signer info(certificate details) programmetically from p7s file? I am ready to use CryptoAPI,CAPICOM,FRX 2.0.
I know its possible because double clicking p7s file opens "Certificates MMC" on my windows XP SP2 box and shows me signer's certificate details(Issued To, Expiry,Issued by).
Thanks,
Priyank
|
|
|
|
|
Hi all,
I downloaded a code from codeproject(Vb.net) ,which is used to make a phone call from PC to any number.It is working only One side,i.e. when I dial a number the listener is unable to hear my voice but I am listenig to him.Can anybody tell me the Reason why it is Not working.
Thanking U.
|
|
|
|
|
You cannot talk to someone through a modem as if it were a phone. Not unless the modem you ahve specifically has this capability, which I seriously doubt. After the modem dials the phone number, you have to pickup the phone!
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi
maybe you can help me:
i want to make a password to be seen.
i want to replace these ***** with letters.
thanks
|
|
|
|
|
Are you trying to hack an application? If you are you won't find any help here. If you are develping some code and aren't sure there is a passwordChar field if you set it to 0 then the * go away. You would have to re-compile the app then the password should be visible.
Ben
|
|
|
|
|
|
Thanks for the one vote guys If the article wasn't somewhat legal it wouldn't of been allowed to be uploaded/posted.
|
|
|
|
|
I need to create browser compatability applications. And i need to disable forward and backward buttons. Is there any solution for this?
D.Willington
|
|
|
|
|
That depends on what you mean by a "browser compatability applications". What is this app supposed to do?
Disabling the buttons has to be done upon the creation of a new browser window. You cannot just disable the buttons on the currently open window.
These questions are better asked in the Web Development or ASP.NET Forums. Nothing in this question has anything to do with VB.NET.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I want two tables Customer and Employee.Customer has two fields CustId and Name while Employee has one field CustId.CustId is the primary key in both tables and CustId in Customer table acts as foreign key.
What i want to do is programatically create tables that satisfies the above relationship.How can i do this?
Otherwise please provide me link on creating database tables which involves foreign key relationships.
X
|
|
|
|
|
xbiplav wrote: What i want to do is programatically create tables that satisfies the above relationship.How can i do this?
You can write virtually any SQL you like in the SqlCommand. So long as you have the rights to create the tables you can doing by passing the relevant commands through to the database.
|
|
|
|
|
Hello!!! I'm currently modifying a program VB .net using SQL Server 2000. The problem is: How can i store a picture to the database. Through browsing the JPEG file and automatically view in picturebox, but i cant save it directly to the database. Is anybody help me. Is there any idea regarding this matter.
Daysee
|
|
|
|
|
Convert the source image stored by the PictureBox to a byte array, then store it in an image column in the database (you're going to need a parameterised query for that, unless you fancy converting the raw bytes to hex).
To get the picture out again, you will get a column which is a byte array. You can then convert that into a Bitmap which you can assign to your PictureBox .
|
|
|
|
|
I already view the picture in picturebox but when i click save button, it doesn't work. Something wrong with my coding. Below is my current program code!!!
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click<br />
Dim SQLHelper As New SQL<br />
Dim tmpAFOS As String<br />
tmpAFOS = cboAFOS.SelectedText<br />
Select Case tmpBOS<br />
Case rrdoAF.Text : tmpRank = cboPAF.Text<br />
Case rrdoNA.Text<br />
tmpRank = "N/A"<br />
tmpAFOS = "N/A"<br />
Case rrdoNP.Text : tmpRank = cboPNP.Text<br />
Case rrdoPM.Text : tmpRank = cboPM.Text<br />
Case rdoPA.Text : tmpRank = cboPA.Text<br />
Case rdoPN.Text : tmpRank = cboPN.Text<br />
End Select<br />
<br />
Dim USERParameters(16) As SqlClient.SqlParameter<br />
USERParameters(0) = New SqlClient.SqlParameter("@last_name", txtLastName.Text)<br />
USERParameters(1) = New SqlClient.SqlParameter("@first_name", txtFirstName.Text)<br />
USERParameters(2) = New SqlClient.SqlParameter("@middle_name", txtMiddleName.Text)<br />
USERParameters(3) = New SqlClient.SqlParameter("@rank", tmpRank)<br />
USERParameters(4) = New SqlClient.SqlParameter("@serial_number", txtSerial.Text)<br />
USERParameters(5) = New SqlClient.SqlParameter("@afos", tmpAFOS)<br />
USERParameters(6) = New SqlClient.SqlParameter("@branch_of_service", tmpBOS)<br />
USERParameters(7) = New SqlClient.SqlParameter("@group_id", 1)<br />
USERParameters(8) = New SqlClient.SqlParameter("@status", "For Approval")<br />
USERParameters(9) = New SqlClient.SqlParameter("@birth_date", dtpBirthDate.Value)<br />
USERParameters(10) = New SqlClient.SqlParameter("@phone", txtPhone.Text)<br />
USERParameters(11) = New SqlClient.SqlParameter("@address", txtAddress.Text)<br />
USERParameters(12) = New SqlClient.SqlParameter("@email", txtEmail.Text)<br />
USERParameters(13) = New SqlClient.SqlParameter("@maxallowed", 1)<br />
USERParameters(14) = New SqlClient.SqlParameter("@registered_by", "")<br />
USERParameters(15) = New SqlClient.SqlParameter("@password", txtPassword.Text)<br />
Dim nStr As String = Me.Label23.Text.Substring(Me.Label23.Text.LastIndexOf("\") + 1)<br />
USERParameters(16) = New SqlClient.SqlParameter("@fname", sqldbtype.nvarchar).value=nstr<br />
<br />
Dim ms As New MemoryStream<br />
Me.PictureBox1.Image.Save(ms, Me.PictureBox1.Image.RawFormat)<br />
Dim arrayImage() As Byte = ms.GetBuffer<br />
ms.Close() ' Closes the Memory Stream<br />
<br />
USERParameters(17) = New SqlClient.SqlParameter("@pic", SqlDbType.Image).Value = arrayImage<br />
Dim result = SQLHelper.ExecuteQueryString("usp_users_insert", USERParameters)<br />
<br />
If result <> "" Then<br />
'MessageBox.Show("Image Saved Into the DataBase")<br />
MessageBox.Show("TRANSACTION COMPLETED:" + vbCrLf + "You have successfully submitted your registration details." + vbCrLf + "Your user id is : " + Integer.Parse(result).ToString("0000"), "Transaction Error", MessageBoxButtons.OK, MessageBoxIcon.Information)<br />
Else<br />
MessageBox.Show("TRANSACTION ERROR:" + vbCrLf + "The system is unable to process your request. Please try again later or contact the librarian.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)<br />
End If<br />
If GlobalProgramLevel = "LIBRARIAN" Then<br />
frmLibrarianModule.Show()<br />
Else<br />
frmUserLogInModule.Show()<br />
End If<br />
Me.Hide()<br />
End Sub
|
|
|
|
|
Hi all,
I am using MS ACCESS database for my applicaion, in that i have an field to store system time and it's datatype is datetime.
When i store an record it stores correctly like this 4:24:16 PM. But whn i retrive the record in my application, the data retrived as 12/30/1899 12:00:00 AM.
My question is I want to compare this time with my current system time, for this i want to remove the date. I used convert() function, but this supports only sql not in MS ACCESS.
Plz any one kindly help me.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
More of a discussion topic than a question. Thought of posting this in the lounge but decided to save myself from getting flamed
I got this[^] (as I'm sure most of you have as well) with the regular MSDN Flash newsletter & was a bit puzzled by the idea of implicitly typed local variables. It looks like an interesting idea but to my mind it may be opening a whole huge door for bugs. Although this kind of type inference saves a few key strokes & has advantages in preventing late binding is it really worth it? I dunno.
The rest of the article is pretty cool & I'm looking forward to playing with some of the features but I can't seem to wrap my head around this type inference thing (in that I think it'll allow newbies to create software of a poorer quality).
Am I wrong? Why am I wrong?
|
|
|
|