|
|
Hello
I am trying to get my feet wet with I/O.
Basically, I have an MP3 file that I want to "corrupt". At first, I thought merely adding some garbage bytes to the beginning would do the trick, but that doesnt work.
For example,
|
|
|
|
|
Can you explain what you mean by corrupt?
If you mean corrupt it audially then you'll have to understand the mp3 format so that you don't render it unplayable.
If you mean corrupt it so that you can't play it then you should be able to just write random bytes all over the place if you want. Particularly by the headers etc.
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
|
I have .NET 1 WinForms DataGrid bound to DataTable in C#
I need to change column order interactively
like reordering by dragging column
header by mouse.
I tried but DataGrid does not allow this.
Where to find sample which implements column reordering using mouse ?
Andrus
|
|
|
|
|
Hi,
you have two options:
1. Use the DataGridView (.Net 2 upwards only) which natively supports this.
2. Have a look here[^].
Robert
|
|
|
|
|
My aplication needs run in Linux also.
Unfortunately MONO does not support direct windows api calls usied in this code and DataGridVew.
So I cannot use those solutions.
Andrus
|
|
|
|
|
I have WinForms DataGrid bound to DataTable in C#
When new line is added by pressing Down arrow in last row, cursor remains in the current column.
However I need thar first column must become active so user can enter data from begin.
How to implement this ?
To reproduce:
1. Run the code
2. Enter data to second column
3. Press down arrow key
Observed:
Second column in active
Expected:
First column must be active
using System.Windows.Forms;
using System.Data;
static class Program {
static void Main() {
Application.Run(new Frm());
}
}
class Frm: Form {
public Frm() {
DataTable table = new DataTable();
DataColumn column1 = new DataColumn();
DataColumn column2 = new DataColumn();
DataGrid grid = new DataGrid();
table.Rows.Add();
grid.Dock = DockStyle.Fill;
table.Columns.Add(column1);
table.Columns.Add(column2);
Controls.Add(grid);
grid.SetDataBinding(table, "");
}
}
Andrus
|
|
|
|
|
I have C# DataTable bound to WinForms DataGrid.
User edits cell and press Ctrl+S without leaving cell.
Edited data is not saved to database.
When user moves to other row, save works OK.
How to save without leaving cell ?
I have the following code in DataGrid subclass :
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) {
switch (keyData){
case Keys.Control | Keys.S:
((CurrencyManager)BindingContext[
DataSource, DataMember]).EndCurrentEdit();
((BusinessForm)FindForm()).Save();
break;
Andrus
|
|
|
|
|
Debug your code. Is this code called ? If so, what happens ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have DataTable bound to DataGrid and Datamember is not set. I checked
((DataTable)DataSource).Rows[this.CurrentCell.RowNumber][this.CurrentCell.ColumnNumber]
in immediate window and this value changes properly: after Ctrl+S it shows new value.
However Update() method return 0 for unknown reason.
If I move to new row and press Ctrl+S, Update() returs 1 as expected.
I use the following method to save data. Any idea how to make Ctrl+S to work.
public static int Save(DataSet ds, string tableName,
string primaryKeyName, bool retrieveAutoIncrementPK,
IDbDataAdapter dbAdapter)
{
DataSet changes = ds.GetChanges();
NpgsqlTransaction transact = Connection.BeginTransaction();
int RowsUpdated = 0;
if (changes != null)
{
if (retrieveAutoIncrementPK)
((NpgsqlDataAdapter)dbAdapter).RowUpdated +=
delegate(object sender, NpgsqlRowUpdatedEventArgs args)
{
if (args.StatementType == StatementType.Insert)
{
if (args.Row[primaryKeyName].ToString() == "")
args.Row[primaryKeyName] = SequenceCurrentValue(
args.Row.Table.TableName, primaryKeyName);
}
};
try
{
RowsUpdated = dbAdapter.Update(changes);
}
catch (NpgsqlException e)
{
transact.Rollback();
throw e;
}
}
transact.Commit();
if (changes != null)
ds.Merge(changes, false, MissingSchemaAction.Error);
ds.AcceptChanges();
foreach (DataRow dr in ds.Tables[tableName].Rows)
if (dr[dr.Table.PrimaryKey[0].ColumnName].GetType() ==
typeof(System.DBNull))
dr.Delete();
ds.AcceptChanges();
return RowsUpdated;
}
Andrus
|
|
|
|
|
i m implementing the image compression/decompression application using the Neural Networks in C#.Net. the problem that i m facing is, how to get the original width & Height from the compressed image when i m going to decompress that compressed image into its original dimension (width & Height). if any one know, just reply me using my email address( any one) with the solution possible.
thanks
Mehraj M
student: BS(CS) final semester
email: mehraj83@yahoo.com, join_mehraj@hotmail.com
|
|
|
|
|
Dear friends,
Can I use any alternate for DSO Framer control to display document, excel, ppt, pdf etc files. I tried aspose too, but it was not meeting our requirements. Because they want a tool which takes the documents as it is like DSO Framer. In aspose to change the document format we need to change the code also.
And I need to email this document too. So that document may be changed so frequently. And dont forget that document must have to be made using .Net frame work library(com component is not preferable). What shoud I use in this case. Please help me. Thank you.
-- modified at 0:59 Saturday 30th December, 2006
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hello,
I have a DataGridView that I want to convert to an HTMLTable. This is a windows app not ASP.
Does .Net have any ready made convention for this, I haven't found any, but maybe I haven't looked the right way.
Any pointers would be helpful.
Thanks in advance!
--PhrankBooth
|
|
|
|
|
Are you sure it's the DGV that you want to convert, and not an underlying DataSource?
For instance, my application keeps it's data in a DataTable. My user interface has a DGV which is bound to the DataTable (ie, myDataGridView.DataSource = myDataTable), and data is displayed and edited in the DGV, which then updates the DataTable.
If this is the case for you, .NET 2.0 does appear to have a lot of support for converting DataTable to various XML formats...
|
|
|
|
|
Found it!
On this page there's nice source code called TableLibrary which does
exactly what I need. Feed in DataGridView and get out HTML table. Plus has some other great features. Nice!
This is the main page:
http://www.windowsforms.net/Default.aspx?tabindex=4&tabid=49
This is the specific link:
HTML Table Generation Library -
http://www.windowsforms.net/Samples/download.aspx?PageId=1&ItemId=190&tabindex=4
PhrankBooth
|
|
|
|
|
Hi all,
Can I run vb code and com components in Unix, Lynux and Solaris operating systems. I need complete information
Thank you,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: Can I run vb code and com components in Unix, Lynux and Solaris operating systems. I need complete information
Nope. See the reply in the other forum. Please don't cross post
|
|
|
|
|
I am sorry for this but when we need immediate reply we try to do this kind of things, I am sorry for this, I will try remove them as soon I get the things done. Ok.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: I am sorry for this, I will try remove them as soon I get the things done.
Don't worry about it
indian143 wrote: but when we need immediate reply we try to do this kind of things
That's not the way to do it. Have patience and someone may respond if they can help out.
|
|
|
|
|
Hi all
actually i am very much new with XMl,,
actually i am confused when people say that xml is easily plugabl with any other language , application, which supports xml ,,, ok fine.
but same is the case when both applications support sql server and other data base systems , so they also can share information from a particular data base used by both applicains ,,, so where is the difference , can any body guide me the right way ,, thanks in advance
hello
|
|
|
|
|
What this means, is that XML is an open format and is technology independent. This means that you don't need to rely on a third party to supply the formatting/storage. One of the requirements in the original design of XML was that it must be easy for an average developer to develop a parser for it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello everybody! Can anybody help me?
While my project is running I created in memory
-------------------------------------------------------
... =provider.CompileAssemblyFromSource(parameters, code);
-------------------------------------------------------
assembly with some classes with single static method. Then, I need rewrite some method (delete old class and create new with the same name in the same namespace). How i can do it? Maybe anybody has another solution?
Best regards and have a nice day!
|
|
|
|
|
To get rid of some classes, the only way I know is AppDomain.Unload().
Luc Pattyn
|
|
|
|
|
Thanks!
|
|
|
|