Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sensitive picture display on the form.

Posted on 2006-06-15
6
Medium Priority
?
182 Views
Last Modified: 2010-04-30
The picture on the form draws a graph, but the picture is so sensitive, it disappears if a windows comes on top of it, it also dissappears if the application window is minimized, can someone please tell me what is causing this behavior.

Thank you.
0
Comment
Question by:Aiysha
  • 2
  • 2
  • 2
6 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16915355
How are you drawing this graph?
0
 

Author Comment

by:Aiysha
ID: 16915407
For j = 1 To count - 1
X = ArrDate(j)
Y = ArrData(j)
x1 = ArrDate(j + 1)
y1 = ArrData(j + 1)
Picture1.Line (X, Y)-(x1, y1), vbBlue
Picture1.DrawWidth = 2
Next j
0
 
LVL 5

Expert Comment

by:lunchbyte
ID: 16915564
do you have form.redraw set to false if so then set it to true and see if this helps.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Aiysha
ID: 16915648
Where do I find that option "Form.redraw" ?
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16915671
It should be the AutoRedraw property of your PICTUREBOX set to True.

If you don't want AutoRedraw set to True, then use the PictureBoxes Paint() event to do your drawing:

So either:

    Private Sub Form_Load()
        Picture1.AutoRedraw = True
    End Sub

or:

    Private Sub Picture1_Paint()
        ' variable declarations...
   
        ' ... more code possibly ...
   
        For j = 1 To Count - 1
            X = ArrDate(j)
            Y = ArrData(j)
            X1 = ArrDate(j + 1)
            Y1 = ArrData(j + 1)
            Picture1.Line (X, Y)-(X1, Y1), vbBlue
            Picture1.DrawWidth = 2
        Next j
    End Sub
0
 
LVL 5

Accepted Solution

by:
lunchbyte earned 2000 total points
ID: 16915673
in properties.

autoredraw not redraw my bad.

You can do this on form load
me.autoredraw = true if you cannot find it in properties
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question