Solved

Sensitive picture display on the form.

Posted on 2006-06-15
6
177 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
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

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

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA combine two working workbooks 8 53
Help me. 3 54
how to Classify of email (pdf attachments) 7 35
Sub or Function is not defined 6 26
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

785 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