473,748 Members | 4,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3212
"Galen Somerville" <ga***@communit y.nospamwrote in news:#o9WfIlcIH A.4476
@TK2MSFTNGP06.p hx.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**********@ro gers.com (Do not e-mail)
Feb 18 '08 #2

"Spam Catcher" <sp**********@r ogers.comwrote in message
news:Xn******** *************** ***********@127 .0.0.1...
"Galen Somerville" <ga***@communit y.nospamwrote in news:#o9WfIlcIH A.4476
@TK2MSFTNGP06.p hx.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**********@ro gers.com (Do not e-mail)
No, I'll look into that

Galen
Feb 18 '08 #3

"Galen Somerville" <ga***@communit y.nospamwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>
"Spam Catcher" <sp**********@r ogers.comwrote in message
news:Xn******** *************** ***********@127 .0.0.1...
>"Galen Somerville" <ga***@communit y.nospamwrote in
news:#o9WfIlcI HA.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**********@ro gers.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&di splaylang=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.comwr ote in message
news:in******** ******@TK2MSFTN GHUB02.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&di splaylang=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.comwr ote in message
news:yn******** ******@TK2MSFTN GHUB02.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********@hom e.netwrote in message
news:dq******** *************** *********@4ax.c om...
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.publi c.dotnet.langua ges.vb "Galen Somerville"
<ga***@communit y.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
2538
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 all talk about LINQ, with only cursory mention - at best - of any other new features. Thanks in advance, ... Arthur Dent.
2
3442
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 be embedded. It considers it a fatal error, and will not let me edit the form, either in code or design view. I have frameworks 1.1, 2.0, 3.5 installed, and all Windows Updates (sans DreamScene).
6
2679
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, bring it home and install it on my home computer. Someone told me it can't be done. Is there a way of doing that?
6
4499
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 exception occurs pointing to FileSaveDialog1.ShowDialog(). The exception also indicates some problem with system.drawing.dll. The exception text is: "Attempted to read or write protected memory. This is often an
9
1195
by: MichaelH | last post by:
Are there any definite advantages of VB2008 over VB2005? Thank in advance. Michael
10
1188
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 liste fastidieuse : O2.P1 = O1.P1 O2.P2 = O1.P2 O3.P2 = O1.P3 etc.
0
1240
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 totally from scratch? I suspect that this may be asking too much in that few books will focus exclusively on migrating/upgrading, but there still may be something out there that is written with existing users of VB.Net in mind. I'm obviously looking...
3
2046
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
8830
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
9544
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
9324
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
8243
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...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
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
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2215
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.