|
You cannot just save a file as a .wav file. You have to convert it.
Have you tried playing your new Wave file in a different media player?
|
|
|
|
|
Yes I tried playing it in another player and got an error with that too.
What do you mean by converting it? I included the header information for it.
thanks you for your help.
|
|
|
|
|
MikeMarq wrote: What do you mean by converting it? I included the header information for it.
You cannot just save files, you must convert them. I'm not sure if this will help, but try looking here.
|
|
|
|
|
MikeMarq wrote: Yes I tried playing it in another player and got an error with that too.
In that case, your file is obviously corrupt.
Christian Graus - C++ MVP
|
|
|
|
|
If you treat that data as the header, and the rest as data, you have clearly corrupted the file.
That is the header (12 bytes), the "fmt " chunk (26 bytes) and half of the "fact" chunk (6 of 12 bytes).
---
b { font-weight: normal; }
|
|
|
|
|
Yes my header is 44 bytes long and includes all that information you meantioned. And the original file that I am filtering had the exact same header and was produced by another program and has no problems.
ps the commas are not actually in the header I just added them automatically when I read the data from the wav file.
thanks for your help
Mike
|
|
|
|
|
MikeMarq wrote: Yes my header is 44 bytes long
No, it's not. The header is 12 bytes long. What you have there is the header and one and a half data chunk. If you treat the rest of the file as sound data, you will be corrupting the other half of the second chunk and all the other chunks in the file, including the chunk that contains the actual sound data.
You should read up on the file format before you try to use it. The file is not at all arranged the way that you think it is.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you that would explain why I have been having problems. I must be reading the wrong websites because that's where I got the 44 bytes from.
thanks,
Mike
|
|
|
|
|
I see. Yes, there is a 44 byte "header" that you can use when converting raw sample data into a wav file, but you can not assume when you read a wav file that it uses that exact format.
The 44 byte "header" consists of a 12 byte header, a 24 byte 'fmt ' chunk, and the first 8 bytes of the 'data' chunk. The rest of the 'data' chunk is the sound data, so by appending that you complete the 'data' chunk.
---
b { font-weight: normal; }
|
|
|
|
|
I have a program whereby the user adds items to a checked list box. Slowly the checkbox fills up with items. What I want to know is, when the program is shutdown, how do i save all the items in the list box to a setting or a location or a text file or something. My exit button is btnExit, the checkedlistbox is called clblist.
Thanks in advance for your help.
Posted by The ANZAC
|
|
|
|
|
One way would be to write code for this on the ButtonClick or FormClosing event or something similar. You could save the items to an app.config file (which I think may prove to be unwieldly) or to a plain old xml file.
|
|
|
|
|
I know about the event. I could save to xml but i'd rather save as a string collection in the settings, problem is, i don't know how to go about it.
Posted by The ANZAC
|
|
|
|
|
Which version of .NET are you using? 1.0, 1.1 or 2.0?
|
|
|
|
|
I'm using 2.0. Anyway thanxs for your help, i figured it out using a string collection setting, on load it fills the listbox with the collections items and on closing it removes all checked items then saves the rest to the collection. thanx again for your help.
Posted by The ANZAC
|
|
|
|
|
Hello,
I have just had a error deploying a clickonce application. The error is below and has been solved
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {10020200-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80040154.
The above problem caused me hours to solve. However, was solved my simply by doing the following: regsvr32 sqldmo.dll. to register the dll on the client machine.
I have created a deployment using the MSI, and never had this problem. But clickOnce does cause this problem if the dll does not exist and is not registered on the client machine.
Is there any way that you can use clickone to add this dll on the client's machine, so I don't have to go to trouble of registering manually.
When I publish this file I have added all the required dlls.
This is what I have done:
1. In the solution explorer | references | properties | set the sqldmo local copy to true
2. On the publish tab | Application File | set the publish status for the sqldmo.dll to include and required
3. Prereqisities | Added the .net framework, CR Reports .Net, MS Data Access components.
VB 2005 & SQL Server 2005.
Many thanks for any help,
Steve
|
|
|
|
|
anyone know how to pass some information from datagrid to EXCEL?? which from the row 1 of the datagrid to the last row.
|
|
|
|
|
I can be somthing like this:
Private Sub cmdCreateXLTemplate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCreateXLTemplate.Click
Dim ColHeadings() As String = {"warehouse", "product", "alpha"}
Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook
Dim Row As Integer = 1
Dim Col As Integer
xlBook = xlApp.Workbooks.Add
xlBook.Sheets(2).Name = "ErrorData"
'Column Headings
For Col = 1 To ColHeadings.GetUpperBound(0)
xlBook.Sheets(1).cells(2, Col) = ColHeadings(Col - 1)
Next
'Actual Data
For j As Integer = 0 To Me.dgExcelData.RowCount - 1
xlBook.Sheets(1).cells(j+1, 1) = Me.dgExcelData.Item(0, j).ToString
Next
'Saving The Excel File
Dim Filename As String
Filename = Application.StartupPath & "\Import.xls"
Dim i As Integer = 1
Do While IO.File.Exists(Filename)
Filename = "C:\Import" & i & ".xls"
Loop
Dim Save As New SaveFileDialog
Save.FileName = Filename
Dim Result As DialogResult
Result = Save.ShowDialog
If Result = Windows.Forms.DialogResult.OK Then
xlBook.SaveAs(Filename)
End If
xlBook.Close()
xlBook = Nothing
xlApp.Quit()
xlApp = Nothing
GC.Collect()
End Sub
|
|
|
|
|
good day to everyone... again i badly needed your help...
i encountered problem in hiding one of my tabpages in the tabcontrol. This is the code that i put:
TabControl1.TabPages(1).Hide()
it did not hide the tabpages(1)....
pls i need your help very badly, i know its so basic for you guys but for me i already wasted two days for nothing.... pls help the simple mind....
thanks
nothing is impossible.....
|
|
|
|
|
I believe there's a visible property, which you want to set to false.
If that doesn't work, I have another vague feeling that perhaps you need to remove the tab page from the tab control to hide it.
Christian Graus - C++ MVP
|
|
|
|
|
Sir,
i also tried this one tabcontrol1.tabpages.item(1).hide.... still doesnt work....
visible property is only applied for the tabcontrol but for its tabpages it is not applicable...
Is there other ways to hide a tabpage? how?
thanks Sir Christian
nothing is impossible.....
|
|
|
|
|
sounds like my second recollection is on the money. You need to remove the page from the tab control.
Christian Graus - C++ MVP
|
|
|
|
|
Sir,
Thank you for you idea... i did remove first the tabpage when the form load, then i insert a command to reload the tabpage in an event.... and all the controls are still there...
Thank you for your kindness.... Your help is highly appreciated... Thank you again sir Christian...
simple minds creates impossible things....
nothing is impossible.....
|
|
|
|
|
You can disable the tab page but it does not disable the tab itself. It does disable all controls on that tab page.
The best way is to remove the page compeletely.
|
|
|
|
|
Hi I am using this treeview in web browser populated via a database.
when i select a node i pass a url parameter and filter a datagrid on the right hand side of same page.
eg.
---
nodeAutoCat.NavigateUrl = "Index.aspx?CatId=" + Server.UrlEncode(CType(rowAutoCat("CatId"), String))
---
but i cant maintain the view state of treeview it collaspe everytime i do postback.
can some body help me how to retain the state of treeview upon postback
cheers
PS: I am using visual studio 1.1 and database is sql server 2000
|
|
|
|
|
Does anyone have an idea what i am talking about or its not clear? Or it is not a good idea to used treeweb control. in aspx the tag looks like
<iewc:treeview id="TreeView1" runat="server" target="_self">
have some one faced similar problem and fixed it?
|
|
|
|