473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Application update


I'm trying to update my program to manage bitmap file written in vb 6.0

For bmp files accessing i used functions like those...
Open NameBmp For Binary As #1
Get #1, 11, pixelOffset
Get #1, 19, w 'Width
Get #1, 23, h 'Height

declaring

dim w as long
dim h as long
dim pixelOffset as long

How can obtain the same in VB.NET?
I tried with

Dim fs As FileStream = File.Open(NomeBmp, _
FileMode.Open, _
FileAccess.Read, _
FileShare.None)

fs.Read(pixelOffset, 11, 7)
fs.Read(h, 19, 4)
fs.Read(w, 23, 4)

but Read method retrieved an array of Byte and doesn't store the read bytes
in a Long variables as Get statement, so i can't do something like

CalculateMultiple4(w * 3)

How can i do?

Sep 24 '07 #1
1 857
Hi Marco,

Maybe you should try reading the bitmap directly:

Dim Bmp As Bitmap
Bmp = new Bitmap(NameBmp)

You can then access the width of the bitmap this way:

Bmp.Width

Hope this helps.
_____________
Adam Bieganski
http://godevelop.blogspot.com
"Marco Biagioni" wrote:
>
I'm trying to update my program to manage bitmap file written in vb 6.0

For bmp files accessing i used functions like those...
Open NameBmp For Binary As #1
Get #1, 11, pixelOffset
Get #1, 19, w 'Width
Get #1, 23, h 'Height

declaring

dim w as long
dim h as long
dim pixelOffset as long

How can obtain the same in VB.NET?
I tried with

Dim fs As FileStream = File.Open(NomeBmp, _
FileMode.Open, _
FileAccess.Read, _
FileShare.None)

fs.Read(pixelOffset, 11, 7)
fs.Read(h, 19, 4)
fs.Read(w, 23, 4)

but Read method retrieved an array of Byte and doesn't store the read bytes
in a Long variables as Get statement, so i can't do something like

CalculateMultiple4(w * 3)

How can i do?
Sep 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nick | last post by:
Hi, I would like to make my application to automatically check on updates from a source and if any, downloads it and automatically updates itself with the new version. Now because the...
1
by: Prem | last post by:
Hi All I have a portal application that we have built that contains links to different modules. There is no static binding to these dlls from the application so that we can deploy some modules...
0
by: Rhon Stewart via DotNetMonster.com | last post by:
Hi please visit this link : http://www.eggheadcafe.com/articles/pfc/selfupdater.asp I followed all the steps for listed on the link , when I execute the application it it gives me the following...
6
by: Ollie Riches | last post by:
I understand the use of Application.DoEvents() to process all outstanding messages on the message queue in a winforms application if you have long running process on the UI thread. But can anyone...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
8
by: Tony Fonager | last post by:
I am currently developing a statistics system in ASP.NET, and need to share information about the customers websites, in this application. (I have simplified my code, to make my project easier to...
2
by: msnews.microsoft.com | last post by:
Hello, I have the scenario. I m building an application either in asp.net or window application. This application is base on n-tier application model. Let us take example of Northwind Database in...
6
by: Senthil | last post by:
Hi All We are having a VB application on SQL. But we need to collect information from persons who will be offline to verify data and insert new data. Generally they will be entering the data in...
3
by: | last post by:
Hi - I can update a second field based on update of the the first field of the same table. It works fine in the Enterprise Manager (EM), but I can't seem to make the trigger fire when I alter the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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,...

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.