473,379 Members | 1,337 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,379 software developers and data experts.

GDI+ Help Needed in VB.Net

Ok all. I have a program I designed that is to simulate three memory manager types and I want to graph the output in realtime in three different group boxes. I have the initial rectangles drawn and I have code to populate the red rectangle overlays in my groupbox_paint call BUT I need to know how do I access this from another subroutine?

' '///Draw initial Rectangles in Group Boxes///
Private Sub grpBestFit_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles grpBestFit.Paint
'Code for rectangles follows but has been excluded'

I thought I could possibly treat it like a subroutine itself but this does not work. I am getting these errors when I type this command:

grpBestFit_Paint() (Trying to just call the subroutine)

Errors:
C:\Documents and Settings\TurboFreak\Desktop\School\Visual Studio Projects\Operating Systems\frmMemManCont.vb(1368): Argument not specified for parameter 'e' of 'Private Sub grpBestFit_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs)'.

and

C:\Documents and Settings\TurboFreak\Desktop\School\Visual Studio Projects\Operating Systems\frmMemManCont.vb(1368): Argument not specified for parameter 'sender' of 'Private Sub grpBestFit_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs)'.


Basically what I am attempting to do is show a graphical representation of a memory stick and place red rectangles over the used bits in real time as the program runs and remove those rectangles as the memory clears. These three "Memory Sticks are all in separate groupboxes. The Private sub above paints three "Memory Sticks" in the three group boxes upon initiation of program. I have the program functioning except for the ability to call this paint routine and make it redraw the rectangles as the memory usage changes. Any help in how to make this happen would be GREATLY appreciated. I can email full code upon request but chose not to place it here as it is currently over 3000 lines without including my module code. Thanks in advance.


The Freak
Oct 30 '06 #1
0 1033

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

Similar topics

6
by: James dean | last post by:
I have heard that the video drivers in GDI+ are a big performance issue. But is this only an issue with something like Games Programming i think...is this wrong?. What about a drawing application...
7
by: news | last post by:
This may be a stupid question, but if I don't ask I'll never know ;) Ok, here it goes.... I am writing an application that renders an image in one picturebox and a graph in another. The image...
7
by: | last post by:
We create VC++ programs that does some GDI drawing functionality. I discovered GDI+ and this seems to be a big step forward, and appears to be standard available in Windows XP and Windows Server...
6
by: Phillip N Rounds | last post by:
I have an application which is heavily graphics intensive, all the graphics being custom. Scattered throughout by app, I have MyView->OnDraw( this->GetDC() ); Apparently, each call to ...
2
by: SStory | last post by:
Question #1) If I do Image.Save with the same filepath that I got the image from, it bombs with "A generic error occurred in GDI+" Any ideas? I prompt the user before overwriting, but if they...
7
by: Marcin Rzeznicki | last post by:
Hello, Do you think it is legitimate practice to mix GDI+ and GDI calls (via Get/ReleaseHDC()) in paint event of a control? I've heard there is possibility of performance loss while "locking"...
8
by: Asfar | last post by:
Hi, Can I write a VC8 dll which used GDI+ and then use this dll in VC6. I will be using GDI+ to basically load a image in memory and annotate it with some text and save the image. Any...
1
by: Pranil Kanderi | last post by:
I have a huge application with lots of custom controls. The app had a memory leak but fixed that by calling the dispose method where needed and now the user objects are very stable, when I am...
3
by: jm | last post by:
>From a C. Petzold book I have Programming Windows C#. It's a little old now, but anyway, it has on page 71 (shortened): form.Paint += new PaintEventHandler(MyPaintHandler); static void...
0
by: Benosham | last post by:
I have been playing around with trying to PInvoke GDI+ from C#, I made recently made the transition from C/C++ to C# and I really like the language, however being the old fashioned programmer I am I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.