|
That i'm not sure about. Maybe try handling the Closing event on the parent form, and then put in a breakpoint and look at the call stack. it'd be interesting to see what methods were called right before the main form closes.
|
|
|
|
|
Is there a simple way to do a ASCII to HEX conversion for Intel HEX files? I know how to convert a "3" to 0x33, I need to convert a "3" to "0x03" and a "F" to 0x0F. I am converting an Intel HEX file to binary and they do an ASCII representation of the file.
I need to make a string like "3F" equal to 0x35, two characters into one byte. I have used the following code but it only works with numeric characters, it throws an exception when an alpha character passes into it because of the Byte.Parse method. I have checked Convert class methods but none of them stuck out as a solution.
byte result = 0;
char hi = '3';
char lo = 'F';
byte bHi = Byte.Parse(hi.ToString());
byte bLo = Byte.Parse(lo.ToString());
result = (byte)(bHi * 16);
result = (byte)(bHi + bLo);
Any help is appreciated, Thanks!
modified on Friday, December 5, 2008 11:15 AM
|
|
|
|
|
Hi,
asquaredtech wrote: char hi = "3";
might not compile, since "3" is a string, not a char.
You can parse strings using Parse or better yet TryParse.
You can tell these methods the input is in hex, use an overload with
NumberStyles.AllowHexSpecifier as in byte hiAndLo = Byte.Parse("3F", NumberStyles.AllowHexSpecifier);
You will have to handle Intel hex in pairs of characters, since IIRC it is
little-endian, meaning the bytes in an address are the wrong way up.
modified on Friday, December 5, 2008 11:10 AM
|
|
|
|
|
That conversion worked. Thanks for your help Luc!
|
|
|
|
|
Hi
First off I would like to thank all the members who are a part of this team. Because of your samples we have done many work.
Right now I need to create a IE autofill toolbar using C#. Is there a possibility to do that? If so can you direct me to that link. I am trying hard to get this done. I am hoping that I will get a solution from your team. Please help me. I am in a desperate solution to complete this. It would be great if you can provide me the sample project.
Thanks
Janakiraman
jp
|
|
|
|
|
Google[^]...and the first result is a CodeProject link
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi
Thanks a lot for your reference. I already have that. That links creates a toolbar for me. Thats fine. I need to add the AutoFill functionality to that toolbar. Is there a sample code to add the autofill functionality to the toolbar.
Please help me. Thanks in advance. I am trying hard to find one, but unfortunately I couldn't get it.
Thanks
Janakiraman
jp
|
|
|
|
|
hi all,
how can i detect if a (any) window is being dragged? Obviously with PInvoke, but I cannot find any C# examples. If anyone has any or could explain, could you please do so?
Thanks,
Maurice
|
|
|
|
|
|
Thanks for the reply,
I need to determine out of process windows being dragged and I need to know which window it is. i.e., get a handle to it.
Thanks,
Maurice
|
|
|
|
|
I am doing a project, which had a requirement of sending an sms message to a mobile from the c#.net.How can i do this.If i need to add any .dll files how can i add those file.
|
|
|
|
|
Can you use COM port and AT command
|
|
|
|
|
The client who install my software connects a bluetooth device. When some event occurs then this software should send an sms to the adjacent mobile through the bluetooth.For doing this, what should i do.
|
|
|
|
|
|
i want to print a windows form by using a printpreview control in vs 2005.I used but i am not able to get it. please lemme know the possible solution. I had to print the full windows form as it was designed.
|
|
|
|
|
Can you see this note[^]
or this note[^]
modified on Friday, December 5, 2008 9:56 AM
|
|
|
|
|
|
Hello Guys,
I have to connect to Oracle and SQL Server in my database projects. So I have to write the code to connect and query these tables...
I am looking for a class/assembly that provides connectivity/query facility for 2 databases (oracle and SQL Server).
I should be able to pass connection parameters from my application.
Then use the methods to query the database through the class/dll.
I have seen one @ DB Connectivity Provider[^]
If any one known of one please let know.
Thanks in advance
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
You can use Data Access Application Block from Enterprise Library: Link[^]
|
|
|
|
|
A little bit different approach: You can connect to Oracle from SQL Server and vice versa. After that you can for example define a view that actually hides where the data is coming from, so basically your application can connect to a single database and still get data from multiple databases but the application does not see it. In some cases this is easier to implement.
|
|
|
|
|
Hi,
I am developing a client/server socket program. From server number of time the Socket.send() is calling. I want to identify each message for different functions in the client side.
Eg:
Chat application:
When first connect a send message is send with welcome message. In client side it is displayed in a label. Next time the another message is send, that message should displayed a list box, Next time in text box…. There is no specific order for sending.
How can i identify the type of message
Regards,
Ypki
|
|
|
|
|
design your messaging spec such that each message has a type identifier in it. XML is good for this kind of stuff.
|
|
|
|
|
Better: use SOAP[^].
Instead of writing from scratch at the socket level, take into account using WCF[^]: it takes care of all the type resolution and serialization for you.
|
|
|
|
|
Wrap the message you are sending e.g.
when sending a connection message: "Connection|YourMessage"
for message to be added to listbox: "ListBox|YourMessage"
for message to be added to textbox: "TextBox|YourMessage", etc.
You can wrap your message with multiple key words to distinguish
e.g. "KeyWord1|KeyWord2|KeyWord3|.....|YourMessage"
Hope this helps,
Prateek
|
|
|
|
|
i've to find some records that matches with a given date once the search button is clicked. by default the datetime picker shows the current date. but i want to show all records when the date is not set by the user specifically,(and when Passportno and name fields are blank(defaut all fields are balnk))
1.how can i set the datetime picker value to balnk
2.is there better solution for this
|
|
|
|