473,659 Members | 2,722 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 1045

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

Similar topics

9
11490
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 type="image" src="modify.gif" border="0" alt="modify" title="modify" name="btn_modify" value="modify"> In mozilla everything works great, but in Konqueror and MSIE the if statement I'm using to detect which button was press does not work.
2
9794
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 to do so, but every sql statement must be on a single line with no ";" at the end of each line. i would like to use an input file like this:
0
938
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 got the dataset exporting great, but I cannot figure out how to append multiple binary files in XML format. Using BinaryFormatter I have been able to simply append a chunk of Base64 encoded data to the end of the XML, but it needs to be...
0
1111
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 checks that the input value is greater than zero. But I want zero to be displayed within the text field and want the validator to run only when the corresponding button is
1
1310
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: Period 1 = FROM TO Period 2 = FROM TO Period 3 = FROM TO Period 4 = FROM TO
3
3471
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. -Regards Arun
2
2660
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 void viewReport2_Click(object sender, System.EventArgs e) { ArrayList lstReports = new ArrayList(); lstReports.Add("A1CBA123-2881-4654-86B9-6F35BCE23604"); lstReports.Add("A16C569A-6FE4-4FE1-B401-9FA9750C689F");
1
5373
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 those records in the new table to the cooresponding table. Here is my code for the button: ----(start of code)----------------------------------------------------------- ------------------------------------------------------------------- ...
1
11473
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 into txtDate on frmDate and the clicks "View Queried Privacy Records" Once they click this it opens the query form frmPrivacy which then has a command button cmdMailmerge to perform the mail merge and print the records that result from that query. (I...
1
2257
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 error in the above line, what is the best way to achieve the above line using javascript... Rgds,
0
8332
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8525
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1737
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.