|
The answer is probably, no. If you can explain what you mean, then I'd be happy to say no with more force
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I mean that you could have an application on a memory stick, plug it in and access a .net framework application without .net framework installed.
|
|
|
|
|
Nope. The .NET Framework MUST be installed to use an application that is based on it, meaning everything written in C#, VB.NET, or any other managed-code language targeting the .NET Framework.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In a word document i've a paragraph. Programmatically i wants to check the spell and left side of each line of the paragraph i've to give the Error description.
In this above task,
I've done the spell check but i don't know how to generate error description in the left side of each line.
Any one can you help me?
Gopalakrishnan R (Software Engineer)
Ascendum Systems Pvt. Ltd
#90,II Main | Phase I | Electronics City | Hosur Rd | Bangalore 560100 | INDIA
Direct : 91.98801 98828
Office : 91.80.4135 9848
Email : Gopalakrishnan.R@ascendum.com
Web : www.ascendum.com
|
|
|
|
|
I'm running into a bug in the DataGridView control, which happens only in the Release version of my code (ie, doesn't happen in the debugger).
Is there a place where I can read about known bugs/issues with various .NET components, and/or report the problems I'm seeing?
Thanks!
|
|
|
|
|
Hi viewers from the future.
For anybody tracking this thread, the discussion has been continued on the C# forum[^].
|
|
|
|
|
I want to change a string that appears in the status bar of the parent form on focus of a control(say check box or text box)in the child form.Please tell me how to do it?
|
|
|
|
|
Write a property in the parent form that set/gets the string of the control and assign values to it in child form.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
for exmple create two form(From1,Form2)
1.in form1,put a button and make a object from form2 like this:
private void button1_Click(object sender, EventArgs e)
{
Form2 f = new Form2(this);
f.ShowDialog();
}
2.create a object of form1 like this:
private Form1 m_parent;
3.in form2, for example put a button then changed form2 constructor like this:
public Form2(Form1 frm1)
{
InitializeComponent();
m_parent = frm1;
}
4.in form2,inside of button click event you can change form1 property,like this:
private void button1_Click(object sender, EventArgs e)
{
this.m_parent.Opacity = 0.5;
this.m_parent.Text = "ok";
}
5.you being successed!!
be carefull:if you want to change a control on form1 first of all you must change Modifire property of control
to PUBLIC, then you can use of them.
if you need to full project that work right,Please send an email to me and write in Subject of your mail "CODE PROJECT Request"
then i send it for you
have a good time.
|
|
|
|
|
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,
<br />
FileStream fs = new FileStream("try1.avi" , FileMode.Open, FileAccess.Write);<br />
fs.WriteByte(123);<br />
fs.Flush();<br />
fs.Close();<br />
After examining the edited file with a hex-editor, I noticed that the byte is correctly being added to the start of the file. However, WinAmp still plays the mp3.
Infact, I started directly shifting bytes around with the hex editor and realised that the file still plays! (albeit a little messed up)
Further research shows that this resilience is due to the format of the MP3 itself. It turns out an Mp3 file is divided into frames (each frame consisting of a header and data) which are independent of each other.
So... well.. anyone have any clever ideas how I can programmatically "corrupt" the Mp3 file? Ofcourse, I need to do it in such a way that I can reverse the process!
Regards,
|
|
|
|
|
Why don't you encrypt the file ? this way its theoretically corrupted and you can reverse it with the right password
|
|
|
|
|
Interesting.
Someone on another forums suggested a simple byte-reverse. That did the trick
But encryption sounds cool too, I have no idea how to go about it tho. I'll look around. Guidance will be appreciated
Thanks.
|
|
|
|
|
There are countless of samples and articles on how to encrypt files here on the code project
|
|
|
|
|
|
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
|
|
|
|