473,406 Members | 2,954 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,406 software developers and data experts.

Graphics VB2008 Pro

My graphics involves a lot of line drawings in a short period of time. I
have all the graphics in a separate module.

I repeatedly get the pixel data from a USB device, draw the requisite
traces, get more data, draw traces, etc.

The USB appears to take 82 ms between bursts of data. But the drawing is
taking 178 ms !!!

It's a real time display, like an oscilloscope, whereby I have to blank the
current 6 pixels, draw the new data in those 6 pixels then blank the next 6
pixels (to leave a gap that shows the traces moving across the screen).

By 6 pixels I mean horizontally. The lines represented by these 6 pixels can
have vertical pixels of, say, 50 pixels above and below an imaginary center
line. At the end of a full screen sweep, the current array info is saved to
a previous array so all the data is available.

Rather than post my code here, I have placed all the module info on my web
site. I would appreciate it if someone with mucho more knowledge than I
could take a look at it.

http://home.surewest.net/galen/private/PictDraw.zip

Thanks

Galen
Feb 18 '08 #1
8 3199
"Galen Somerville" <ga***@community.nospamwrote in news:#o9WfIlcIHA.4476
@TK2MSFTNGP06.phx.gbl:
My graphics involves a lot of line drawings in a short period of time. I
have all the graphics in a separate module.

I repeatedly get the pixel data from a USB device, draw the requisite
traces, get more data, draw traces, etc.
Have you looked at using WPF to do your graphics?

--
sp**********@rogers.com (Do not e-mail)
Feb 18 '08 #2

"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Galen Somerville" <ga***@community.nospamwrote in news:#o9WfIlcIHA.4476
@TK2MSFTNGP06.phx.gbl:
>My graphics involves a lot of line drawings in a short period of time. I
have all the graphics in a separate module.

I repeatedly get the pixel data from a USB device, draw the requisite
traces, get more data, draw traces, etc.

Have you looked at using WPF to do your graphics?

--
sp**********@rogers.com (Do not e-mail)
No, I'll look into that

Galen
Feb 18 '08 #3

"Galen Somerville" <ga***@community.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>
"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
>"Galen Somerville" <ga***@community.nospamwrote in
news:#o9WfIlcIHA.4476
@TK2MSFTNGP06.phx.gbl:
>>My graphics involves a lot of line drawings in a short period of time. I
have all the graphics in a separate module.

I repeatedly get the pixel data from a USB device, draw the requisite
traces, get more data, draw traces, etc.

Have you looked at using WPF to do your graphics?

--
sp**********@rogers.com (Do not e-mail)

No, I'll look into that

Galen

Does anyone have a link to a simple VB.net module using WPF in 2D (drawing
lines).

All that I find are written in C variations.

Galen
Feb 18 '08 #4
Hi Galen,

If you're looking for WPF samples, you can find many of them in the Windows
SDK
(http://www.microsoft.com/downloads/d...E300-F358-4523
-B479-F53D234CDCCF&displaylang=en) or your can search for them on
http://msdn2.microsoft.com and http://windowsclient.net

However, if this issue is still the previous one we have discussed long
time ago, remember managed code will probably never draw faster than low
level APIs such as DirectX.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 19 '08 #5
Hi Walter

Yes it's the same problem. We originally solved the problem of a very slow
USB by using shared memory and activex.

I thought I would try VB2008 Pro but the slow drawing is still the problem.
After looking into WPF I got the impression it would be much faster than the
current graphics methods.

If this is not true then maybe I should look at shared memory and activex
for the drawing portion?

Incidentally I made a minor change in my VB6 app and now I can process Heart
beats well over 450 per minute whereas I was getting only around 300 tops.
This puts us in the realm of animals and birds.

Galen

""Walter Wang [MSFT]"" <wa****@online.microsoft.comwrote in message
news:in**************@TK2MSFTNGHUB02.phx.gbl...
Hi Galen,

If you're looking for WPF samples, you can find many of them in the
Windows
SDK
(http://www.microsoft.com/downloads/d...E300-F358-4523
-B479-F53D234CDCCF&displaylang=en) or your can search for them on
http://msdn2.microsoft.com and http://windowsclient.net

However, if this issue is still the previous one we have discussed long
time ago, remember managed code will probably never draw faster than low
level APIs such as DirectX.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Feb 19 '08 #6
Hi Galen,

I agree doing animation in WPF would be better than in Winform. Based on
your actual scenario, you may have a try and see if it meets your
requirement.

I'm not sure how the shared memory would help the drawing part.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 20 '08 #7
I'm currently setting up a WPF User control. We'll see what happens.

Galen

""Walter Wang [MSFT]"" <wa****@online.microsoft.comwrote in message
news:yn**************@TK2MSFTNGHUB02.phx.gbl...
Hi Galen,

I agree doing animation in WPF would be better than in Winform. Based on
your actual scenario, you may have a try and see if it meets your
requirement.

I'm not sure how the shared memory would help the drawing part.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Feb 20 '08 #8
It's not just 6 pixels. From horizontal pixel 1 to horizontal pixel 2 may
have a difference of 100 vertical pixels.

And first it has to erase the previous trace between those 6 X pixels and
all of their Y components. Then it has to draw the new trace for those 6
pixels, etc.

Galen

<Ju********@home.netwrote in message
news:dq********************************@4ax.com...
That's a really long time to draw 6 pixels.

Are you referencing the previous data and only turning off the pixel
that was on or are you blanking the entire column?

No, I did not download the code. Just a quick thought I had when I read
your post.

Mike

On Mon, 18 Feb 2008 09:16:28 -0800, in
microsoft.public.dotnet.languages.vb "Galen Somerville"
<ga***@community.nospamwrote:
>>My graphics involves a lot of line drawings in a short period of time. I
have all the graphics in a separate module.

I repeatedly get the pixel data from a USB device, draw the requisite
traces, get more data, draw traces, etc.

The USB appears to take 82 ms between bursts of data. But the drawing is
taking 178 ms !!!

It's a real time display, like an oscilloscope, whereby I have to blank
the
current 6 pixels, draw the new data in those 6 pixels then blank the next
6
pixels (to leave a gap that shows the traces moving across the screen).

By 6 pixels I mean horizontally. The lines represented by these 6 pixels
can
have vertical pixels of, say, 50 pixels above and below an imaginary
center
line. At the end of a full screen sweep, the current array info is saved
to
a previous array so all the data is available.

Rather than post my code here, I have placed all the module info on my web
site. I would appreciate it if someone with mucho more knowledge than I
could take a look at it.

http://home.surewest.net/galen/private/PictDraw.zip

Thanks

Galen

Mar 2 '08 #9

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

Similar topics

7
by: Arthur Dent | last post by:
Does anyone know where i can find a decently thorough list of the language changes in VB2008, such as the new If() function? All i can seem to find through search engines, most of the articles...
2
by: Arthur Dent | last post by:
I am trying to make a VB2008 Express winforms project, and edit the form. However, when i try to open the form, i get this error: ..NET Framework 2.0 update not found. The win32manifest will not...
6
by: Academia | last post by:
I have a computer at home with a (slow) dialup connection and a computer at school with a fast connection. I want to go there (it is not close) and down load Vb2008 express, burn it into a CD,...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
9
by: MichaelH | last post by:
Are there any definite advantages of VB2008 over VB2005? Thank in advance. Michael
10
by: Gilbert Tordeur | last post by:
Bonjour. N'y aurait-il pas depuis la VB8 un moyen d'assigner en une seule instruction l'ensemble des propriétés d'un objet aux propriétés de mêmes noms d'un autre objet, plutôt que d'écrire la...
0
by: John Dann | last post by:
Looking to migrate from VB2005 Pro to VB2008. Can anyone suggest/recommend a VB2008 book that highlights the changes from earlier versions of VB.Net (VB2003/2005) rather than describing VB2008...
3
by: patricia3d | last post by:
I was trying to upgrade my project from VB6 to VB2008 Upgrade Error Line For Each oText In Me.txtFields oText.DataSource = adoPrimaryRS Next oText
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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
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...

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.