|
|
I would like to input data through a COM port and need to know how to tell C# to look for the COM port and to communicate witht he device atttached.
|
|
|
|
|
|
Hi all,
I am overridding WndProc method in C# for RichTextBox to handle the paste functionality.If i inherit TextBox, the message id 0x0302 gives WM_PASTE handler, but if i use RichTextBox it is not working. Is there any specific WM_PASTE message id for rich textbox. How can i know various MessageIds for RichTextBox.
|
|
|
|
|
Did you try using Spy++ and watching what happens when you paste text into the richtextbox.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi senthil, thanks for your reply. But i am not aware of spy++ tool,could you tell me where can i download and how can i utilize that to check the paste operation.
Thanks
Muthu.
|
|
|
|
|
Thanks senthil, i have seen spy++, but it is not logging the message when i click ctrl+v for rich textbox. But if i use textbox the message WM_PASTE is logged.Is it a problem in .NET RichTextBox..??
|
|
|
|
|
I have a form-based user for a user to select recepient from the current email addresses in the exchange server. How do I go about extracting this address list from MS Exchange?
Thomas
|
|
|
|
|
I have a form that contains a combobox with values of item1, item2, and item3. I am wanting to retrieve a value from a database and select the correct value from the options of the combobox during the loading of the form. What might be the best way to do this?
|
|
|
|
|
Just set the text property of the combobox.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i want to do a for loop for an ArrayList
this is what i thought of:
for(int i=0;i
|
|
|
|
|
It has a Count property.
But you could as well do:
foreach(YourTypeOfObjetct obj in myArrayList)
{
} I hope this helps.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
so does this looks right?
foreach(byte[] frame in frames){}
|
|
|
|
|
Are each of the elements in frames arrays of byte s? For example, does this code
byte b = frames[0][3]; get the fourth byte of the first frame?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
yup, the elements are in bytes
so how can i do a constant check on the arraylist and run the loop?
|
|
|
|
|
As Luis Alonso already pointed out, you should use the Count property of ArrayList .
Regards,
mav
|
|
|
|
|
Is each element in the arraylist a byte or a byte[]?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Need help on displaying text on a C# windows application
I'm not familar with C# but what i want is something like a JTextField in a java applet
thanks!
-------------------------------------------------
BingLin
|
|
|
|
|
Well why don't you get yourself familiar with C# and .NET first? Like read MSDN?
Anyway, System.Windows.Forms.TextBox is what you need for input and System.Windows.Forms.Label is what you need for just a static display.
|
|
|
|
|
alright, thanks for the help!
|
|
|
|
|
Hi,
I am getting the following NullReferenceException, erratically, from the System.Windows.Forms.TreeView component. As the stack trace shows, none of my code is *directly* involved in the exception. The exception seems to occur in response to an event that occurs after I perform some action on the TreeView...however, I cannot reliably reproduce the error, so I cannot determine which action preceeds the error.
Does any one have have any suggestions of approaches I can use to narrow down the cause of this error?
Thanks,
Steve.
Exception type: System.NullReferenceException Object reference not set to an instance of an object. at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(Message& m) at System.Windows.Forms.Control.WmDestroy(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.TreeView.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|
|
|
|
|
stevoe72 wrote:
I am getting the following NullReferenceException, erratically, from the System.Windows.Forms.TreeView component. As the stack trace shows, none of my code is *directly* involved in the exception.
Did you ever get an answer to this question you posted on CodeProject? I am having similar problems, and don't know where the error is coming from. If you figured out where to look, I'd appreciate if you'd let me know. In my application, my users are seeing this error but I can't reproduce it.
Error Messages:<br />
Object reference not set to an instance of an object.<br />
Inner Stack Trace: <br />
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)<br />
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)<br />
at System.Windows.Forms.Control.DefWndProc(Message& m)<br />
at System.Windows.Forms.Control.WmUpdateUIState(Message& m)<br />
at System.Windows.Forms.Control.WndProc(Message& m)<br />
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)<br />
at System.Windows.Forms.ContainerControl.WndProc(Message& m)<br />
at System.Windows.Forms.ParkingWindow.WndProc(Message& m)<br />
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)<br />
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)<br />
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks for any help.
Sue
|
|
|
|
|
I'm afraid that I did not have any luck establishing the cause of this error, Susan...though we do *appear* to have stopped the error occurring (for the time being).
We started to suspect that the problem was somehow related to a panel, on my form, which was initially not visible when the form was displayed. My form had two "modes" of display. When the user switched mode, I would make the panel (and it's child controls) to be visible. When they switched modes again, the panel would be made invisible. From reading articles like the following, we began to suspect that there may be problems related to having a control that was initially non-visible:
http://www.dotnet247.com/247reference/msgs/57/285567.aspx[^]
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.windowsforms/2005-01/1163.html[^]
In the end, I split my form into 2 forms (one for each mode). I was able to remove the dynamic-nature of each form. All controls are visible when the form is first displayed. And the error seems to have stopped happening.
To me, it looks like the real error is occuring down in non-managed code. I don't know how to extract any further details from an error that occurs at such a level.
Hope some of this info is helpful to you. Sorry that I cannot provide a more definitive answer.
Cheers,
Stephen.
|
|
|
|
|
Actually, that may be the answer. We have several forms where we have initially non-visible panels with more controls in them. For instance if a user tries to type in a new address which is wrong, a panel becomes visible with a drop-down list of possible city/states.
Thanks very much for the links. I will look in to this, and play a little with visible/non-visible.
Susan
|
|
|
|
|
hi, I simply want to change the registry value "swapmousebuttons", I can do this. however I want to apply this setting without rebooting or logging off, much like the windows control panel does. how is this done? thanks for your help.
Stephen
|
|
|
|