|
Ok, since no one else has answered here I figured that I would post the solution that I found to my own problem.
It turns out that there is already a control available to do this right inside the standard runtime framework itself called the ByteViewer.
It lives in System.ComponentModel.Design
Why it is not available in the tool box I have no idea, but here is how you can use it.
Friend ByteViewer As System.ComponentModel.Design.ByteViewer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ByteViewer = New System.ComponentModel.Design.ByteViewer
Me.SuspendLayout()
'
'ByteViewer
'
Me.ByteViewer.Dock = System.Windows.Forms.DockStyle.Fill
Me.ByteViewer.Font = New System.Drawing.Font("Courier New", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ByteViewer.Location = New System.Drawing.Point(0, 0)
Me.ByteViewer.Name = "ByteViewer"
Me.ByteViewer.Size = New System.Drawing.Size(634, 287)
Me.ByteViewer.SetDisplayMode(DisplayMode.Auto)
Me.ByteViewer.TabIndex = 0
'
'frmViewRaw
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(634, 287)
Me.Controls.Add(Me.ByteViewer)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmViewRaw"
Me.Text = "frmViewRaw"
Me.ResumeLayout(False)
End Sub
This creates a nice ByteView control that allows you to view any array of byte oriented data you can throw at it.
The SetDisplayMode lets you change views between Ansi, Unicode, Hexdump or Auto.
A lovely little tidbit I wanted to make sure you all knew about.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Hello, I dont understand whats going on with my DB2 connector. I used to
have the code in a class that worked fine. But when I tried to use it in a
webservice I get this error: System.InvalidOperationException:
ExecuteReader: Connection property has not been initialized.
1) I create and open a new OleDbConnection
adoConn adoConn = new adoConn();
adoConn.Run("INTRANET");
2) I execute the query
OleDbDataReader myReader = adoConn.dbSQLSelect("Select * from USERS");
ERROR
Line 47: myReader = myCommand.ExecuteReader();
What might be the problem?
|
|
|
|
|
My first C# development at work needs to connect to a unix box and transfer files (both directions) using SSH (secure shell) and SCP (secure copy). Can anyone recommend a product/component/code to do this? I've come across Putty and SSHActiveX etc but I'd like a .NET solution if at all possible. Thanks.
Gavin
|
|
|
|
|
I know I can use the TAB key to move from TextBox to TextBox; can I also use the Enter Key? I have 300+ TextBoxes and I want the Enter key to move vertically and the Tab key to move horizontally, any thoughts?
--Mike
Mike Kennedy
|
|
|
|
|
Hi Mike. There may be a much easier way, but the only way I can see is to handle the KeyPress event for your textboxes. This link from MSDN[^] shows an example of capturing the [Enter] key; you could then execute SetFocus() on the appropriate text box.
|
|
|
|
|
Hi. I'm looking for a solution to this question:
so, I'd like to disassemble a strong named assembly,
edit its IL a little and compile it again with
different key pair. however, i want to keep the
original public key. Is that possible? I think so,
but don't know the right steps. Please help me.
Thank you in advance,
Stan
|
|
|
|
|
|
yep, i'd read an article to work out re-signing, but the public key changes, and what i need, is not changing the public key
|
|
|
|
|
I want to make an installation package to run at any windows system that doesn't have a .net framework installed on it.
I don't know how to include installation of .net framework in this package.
Thanks for help.
|
|
|
|
|
hi,
just exectuing the code below throws an exception..anyone has a clue ???
byte[] address = new byte[]{10,127,176,100}
IPAddress ip = new IPAddress(address);
thanx a lot.
shakoosh
|
|
|
|
|
I'm hesitating on changing Platform from VS6 to VS.Net. Would you
please to tell me what's the prospect of MMC in Microsoft .NET plan?
There's an MMC Snap-in designer for VB 6.0 ,and is there a designer for
VB.NET? Does Microsoft have anything substitute for MMC in .NET
platform or something in the future?
|
|
|
|
|
|
|
it supports vb.net and c#
:DD
|
|
|
|
|
Hello,
I'm building a .net component (let's call it Alpha) for use in a Win Form application. There is also a second component type called Beta. Alpha has a property called Betas that is a collection of Beta components. This is similar to the TabControl and TabPage where TabControl has a TabPages collection.
My question is, does anyone know how to cause all Beta collection items created at design time to be deleted when an Alpha component is deleted?
Thanks in advance
|
|
|
|
|
hello developer world,
I've to read a xml file with encoding 'iso-8859-1' with the XmlTextReader class. But I get the following XmlException:
The System does not support the 'iso-8859-1' encoding. I can't use the utf-8 enconding, because there are special characters to read.
Can anybody tell me how can I solve this problem?
I'll be very pleased.
Reinaldo.
|
|
|
|
|
What about UTF-16? IIRC, Pocket PC using 16bit-Unicode characters as the native character-set.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
Hi all,
I want to know what methods in my .NET application "eat" most of CPU time. May be someone knows if CLR provides such information? Or the other way?
|
|
|
|
|
|
|
Thanks a lot, I'll see these things.
|
|
|
|
|
I switched from Visual C++ 6 to a C# .NET solution. In my original VC 6 project I was linking a .lib file to my code. The .lib was providing me some functions to a CORBA orb.
This .lib file doesn't seem to be working with my new .NET project. Does anyone know if you can use libraries coded in legacy VC++ 6 with the new .net framework or do I have to rewrite the libraries in C# .net as well?
Thanks,
Zahid
Regards,
Zahid
|
|
|
|
|
You should be able to, but I don't know how.
Kevin
|
|
|
|
|
I have many VC 6 libraries that just work in both the 2002 and 2003 Visual Studios. Now, you didn't mention, but your still compiling C++ code, right? The C# or VB.NET stuff won't be able to use those libs.
If you still can't get the libs to work, how about listing what the errors are? Perhaps something might need some tweaking.
--
Joel Lucsy
|
|
|
|
|
Some header includes are now officially redundant in 2003 so Microsoft is more 'ANSI compatible' and portable. If these lib headers include some now redundant libraries, you will have problems. A colleague of mine had linker errors. If these circumstaces sound familiar then changing your projects build order is needed to remove them.
Al.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|