|
July moe wrote: if u know tell me.
Well I don't know the answer to your question, but I think you will get a better chance of a good answer if you post this in the ASP.NET forum. Alternatively you could have tried this[^] for yourself first.
I must get a clever new signature for 2011.
|
|
|
|
|
|
Hi all,
I have two DataGridView in which I am setting its AutoSizeMode to Fill I want to change automatically the second DataGridView column Width the same as the first one change.
I tried these two cases:
private void dataGridView1_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
{
dataGridView2.Columns[e.Column.Index].FillWeight = e.Column.FillWeight;
}
private void dataGridView1_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
{
dataGridView2.Columns[e.Column.Index].Width = e.Column.Width;
}
In the two cases this error appear when loading the form that contains these two DataGridView :
This operation cannot be performed while an auto-filled column is being resized.
Thank you in advance,
Best regards,
Michael Waguih
|
|
|
|
|
Reason for my vote of one: Don't post in the Q&A and C# forums. It duplicates work and annoys people.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
Sorry, I don't agree. It does not annoy me, and I'm unaware of any such rule on this site.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Picky, picky!
You are a Special Case, Luc - the exception that "Proves Every Rule".
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
Not the Rule That Doesn't Exist.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
hi m new in c#. can any one tell me how to add following event.
it would be thankful.
private void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
}
|
|
|
|
|
<speechrecognizedeventargs>
private System.Speech.Recognition.SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine();
recognizer.SpeechRecognized + = new EventHandler<SpeechRecognizedEventArgs> (recognizer_SpeechRecognized);
Cheers
If you can read this, you don't have Papyrus installed
|
|
|
|
|
thanks but i dont even knw where to place this code..
plz tell me.
|
|
|
|
|
You can put it , at your Form Load Event !
I know nothing , I know nothing ...
|
|
|
|
|
thanks
|
|
|
|
|
Hi All,
I have a object with values and want to copy it in other object(which has same propery of source).
Please help me with this.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
If both objects are of the same type you want to implement the IClonable Interface. Just be aware that the example uses the MemberwiseClone method which is great for value types but doesn't copy reference types (only the pointer gets copied)
"You get that on the big jobs."
|
|
|
|
|
If you need a shallow copy ie two references to same object, then just equate them. If you need a deep copy ie new object with same values, you use reflection (will be slow) or you can use MemoryStream and BinaryFormatter to do this. If you search google for creating deep copy, you can find lot of examples to do this.
|
|
|
|
|
Hi,
I am using visual c# 2010 express.
All of a sudden I get this error when I try to open the designer of the form.
The class name '?' is not a valid identifier for this language.
Note that the solutin compiles successfully.
I have chedked for '?' but there is none.
Any thoughts please? thanks
Detailed error is below:
Instances of this error (1)
1. Hide Call Stack
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
|
|
|
|
|
|
|
Hello code project members,
I have a strange problem with the IBasicVideo interface when using GetCurrentImage. The image is grabbed correctly from the video stream (avi/mpeg4) but a band of 10 pixels which should be at the right edge of the image is placed to the left side.
You can view a test image which shows the problem under -> Test.jpg
Here is the code I use:
m_pBasicVideo.GetCurrentImage(ref buffSize, zero);
IntPtr tempBuffer = Marshal.AllocHGlobal(buffSize);
m_pBasicVideo.GetCurrentImage(ref buffSize, tempBuffer);
bmpHeader = new BitmapInfoHeader();
Marshal.PtrToStructure(tempBuffer, bmpHeader);
bmp = new Bitmap(bmpHeader.Width, bmpHeader.Height, bmpHeader.ImageSize / bmpHeader.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb, tempBuffer);
I did some google research the last few hours but can't find anything that could solve my problem. Hope you guys can give me some enlightenment.
Thanks
Marcus
|
|
|
|
|
Your pixel stream is offset, causing the "new lines" to occur at the wrong place; actually you are using the same value of tempBuffer twice.
In
Marshal.PtrToStructure(tempBuffer, bmpHeader);
you claim it points to the header, which I assume is correct.
However in
bmp = new Bitmap(bmpHeader.Width, ..., tempBuffer);
you claim it points to the pixel data, which is probably wrong. Seems you need to add the header's size to the pointer before passing it to the bitmap constructor.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Add 40 to tempBuffer in last line.
...System.Drawing.Imaging.PixelFormat.Format32bppRgb, tempBuffer + 40);
|
|
|
|
|
I'm trying to convert parts of a VB6 program to C#. But I have stumbled over a set of instructions I cannot directly convert.
Here is the VB code:
Winsock_Search.SendData Chr$(0) & Chr$(0) & Chr$(0) & Chr$(&HF6)
Winsock_Seach is just a windows socket, so never mind that. But my problem is:
Chr$(0) & Chr$(0) & Chr$(0) & Chr$(&HF6)
How do I convert that to C# code?
|
|
|
|
|
Winsock_Search.SendData("\0\0\0" + ((char)246).ToString());
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
|
Its simple to lookup what the Chr$ method does in VB, then you will know to use ToChar() in .NET
I know the language. I've read a book. - _Madmatt
|
|
|
|