Solved

Sensitive picture display on the form.

Posted on 2006-06-15
6
173 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 85

Expert Comment

by:Mike Tomlinson
Comment Utility
How are you drawing this graph?
0
 

Author Comment

by:Aiysha
Comment Utility
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
Comment Utility
do you have form.redraw set to false if so then set it to true and see if this helps.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Aiysha
Comment Utility
Where do I find that option "Form.redraw" ?
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now