473,503 Members | 338 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple binary readers on a button

3 New Member
I'm new to making hex editors and i have made a program that so far reads a selected line and displays it in a label.

this is what i have so far:


Expand|Select|Wrap|Line Numbers
  1.         public Form1()
  2.         {
  3.             InitializeComponent();
  4.         }
  5.  
  6.         OpenFileDialog ofd = new OpenFileDialog();
  7.  
  8.         private void button1_Click(object sender, EventArgs e)
  9.         {
  10.             ofd.ShowDialog();
  11.             BinaryReader br = new BinaryReader(File.OpenRead(ofd.FileName));
  12.             string carmake = null;
  13.             for (int i = 0x39607; i <= 0x3960f; i++)
  14.             {
  15.                 br.BaseStream.Position = i;
  16.                 carmake += br.ReadByte().ToString("X2");
  17.             }
  18.             br.Close();
  19.             if (carmake == "6175645F72385F3038") label2.Text = "Audi R8";
  20.  
  21.         }
  22.  
but i need it to read multiple selected lines and display in certain labels e.g. 100+ of this code as it opens the program.
Jan 29 '14 #1
0 1041

Sign in to post your reply or Sign up for a free account.

Similar topics

9
11483
by: Ryan | last post by:
I currently have two image submit buttons. The code generated looks like so: <input type="image" src="button_in_cart.gif" border="0" alt="Add" title="Add" name="btn_cart" value="buy"> <input...
2
9788
by: armin walland | last post by:
hi group! i am writing a small tool to dump data from oracle databases and i want to implement the possibility to execute sql statements read from stdin or from a file. i have so far managed...
0
934
by: Rippo | last post by:
Hi all, I have a web app that exports a dataset to an XML file, the customer now wants this XML file to include media as well (Word, JPEG, bitmap and many other formats I might not expect). I've...
0
1104
by: nzanella | last post by:
Hello, I have an ASP.NET HTML form control with multiple HTML input button controls each of which has an associated HTML input control. For each HTML input control I have a validator that...
1
1298
by: Andrew Kidd | last post by:
Hi, I've have a form for the user to fill in which comprises of 5 date ranges, each made up of a "FROM" & "TO" date, which is built from a "" dropdownlist & a "" dropdownlist, as follows: ...
3
3450
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
2
2642
by: Ayoa | last post by:
I am working on some web based custom reports and i want to open multiple browser at the click of a button. So for example if i have 2 guids in my arraylist, i want to open 2 windows. protected...
1
5362
by: socasteel21 via AccessMonster.com | last post by:
I have a spreadsheet that has 3 tabs each of the worksheets is setup exactly like a cooresponding table in Access. I created a button that should import each tab to a new table and then append...
1
11447
by: kirkus84 | last post by:
I am currently trying to do a multiple record mail merge through a query via a command button on a form. The query basically displays customers who have said yes to privacy. The user inputs a date...
1
2246
by: su817200 | last post by:
Dear Friend, I would like to run multiple functions on Button Click eg... <input type="button" value="Update" name="B1" onclick="ReadFileToString() timedRefresh(1500)"></p> It is giving...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.