Solved

Sensitive picture display on the form.

Posted on 2006-06-15
6
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 500 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month6 days, 12 hours left to enroll

623 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