|
The programming language is one thing. In my opinion, the IDE (Integrated Development Environment) is far more important. What's the use of a good programming language when I have to write my programs in notepad.exe (or emacs), use extremely long command lines for compiling, and create debug-log-files for debugging? That's why I prefer the Microsoft side of the programming world.
|
|
|
|
|
I know there is a way to programmatically set WIA properties through C# code, but I was wondering whether there is a way to disable the selection of these settings once the dialog opens?
|
|
|
|
|
I am not sure there is a way to disable it programmatically.
It calls the STISVC service, and although it can be disable manually via the control panel, I think it is not available to disable via c#.
There is a config setting you can use, sc config stisvc start= disabled , but that is as much as I can see of automating it.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I do not want to disable the whole service though, only the selection of the properties e.g. the combobox for selecting the DPI etc. so that the user cannot modify these
|
|
|
|
|
I don't know how to extract JSON stringify in asp.net.
if u know tell me.
|
|
|
|
|
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.
|
|
|
|