I NEED A REALLY HELP FROM A MVP (PLZ HELP ME !!!)

G

giannis

I have the Access 2000 and the VB6.
I have made a test application with these two products:
I have made a form with an Image control that have an
stretched big image (a .jpg file 50 Kb).
I have put in this form a command button that opens
another empty form that cover the first form.
When I uncover the Form1 i see :
1) in VB the image and the button repainted again (!!!)
That is in the beggining i cant see nothing.
2) in Access the image and button dont repainted.

When i put 5-6 images on the form, then the repainting
hold for about 2 seconds(!!!!) in the VB Form but in
the Access nothing repainted and i dont need wait to see
all the initial form.
I will send two photos that indicate the before and
after covering result in the VB forms.

I need say to me what is the wrong of this problem with VB.

I have VB SP-5 and Access 2000 and Windows 98.
I dont believe that is may occur because of my video card,
because i dont have any other problem in Windows and
with 3D games.
(sorry for my English but i am fron Greece)
 
L

Larry Linson

Unfortunately, you are asking what is a VB front-end / user-interface
question in newsgroup devoted to Access forms and associated coding, where
it would be only happenstance if you found someone with the VB experience to
help. Take a look at the VB-related newsgroups.
 
C

Chris Mills

Nice sextuplets you have Giannis!

Sorry, the problem could be almost anything. Generally, a form needs to be
"popup" and possibly "modal" to cover things. These are properties you can
set. Doevents can sometimes be used to give Windows a turn to refresh, if your
code is hogging the processor or something.

Why is your kid doing an Indian Rope Trick?
 
M

Michel Walsh

Hi,


You may get better assistance in a dedicated classical VB newsgroup, but
it seems you did not asked to VB to handle the repaint for you. In VB, there
is a onPaint event (thing we do not have with Access, it is good and it is
bad) which fires when the OS ask your program to repaint its user interface.
Most control "know" how to redraw themselves, like buttons, scrollbars, but
some may not, like a picture box. I said "may" because they have a property,
AutoRedraw, set to false by default. Set it to true and VB will remember any
drawing command you have done on the control (note that by default, the form
Autoredraw is set to true, but for a picture box, it is set to false). Use
the Cls method to clear and start over.

Note that a Paint event occurs if your window was partially or totally
under another one that moves out of the way, but also at loading time, and
at resize-enlarge (not if you resize-shrunk). You can also wish to skipout
of the Paint event if your WindowState is minimized, testing for that state
early in the event subroutine.



Hoping it may help,
Vanderghast, Access MVP
 
G

giannis

My problem is that i gave to other people this test
but they say that dont see the repainting (in VB)that
I see !!!
What is the problem ? (If my problem was a wrong
video card i will had the same problem in Access.)
 
M

Michel Walsh

Hi,

It can be a problem of DRIVERS. Be sure (well, that is hard to be) that
your client use the latest DRIVERS available for the video card at the
manufacturer site (such as http://www.atitech.ca/support/driver.html).
Access would not necessary use the same calls, in the same order, than in
VB, and so, a difference in drivers MAY be an explanation.


Vanderghast, Access MVP
 
G

giannis

I have the latest driver for my video card (ASUS 7100)
When I run this test all of the controls at the covered form
repainted !!! (images,buttons ...)
In Access i havnt any problem !!
 
M

Michel Walsh

Hi,


Ok, if I understand you correctly, the control are nice only if you
force a repaint through something else covering then moving out of the way
of your form? If so, at the moment you make the change and wish to see it,
add the following line of code:

Me.Refresh


assuming your code is behind the form, Me, to be repainted, or

Me.ControlName.Refresh



Hoping it may help,
Vanderghast, Access MVP
 
G

giannis

When must i use the Me.Refresh ?????
I dont know when another window cover
my application !!!!!
When another window of Windows cover
and uncover my application's Form the Form
repainted from the beggining !!!
When I use PictureBox instead of Image control
there is not any sutch problem (but the picture
control dont support the streching of the image).
Why i dont have problem with PictureBox?
I found in internet a module that strech the
image of PictureBox and when i use this with
a PictureBox i dont have any problem.
But why this problem with the Image control?
I sended at the news the test with Image control
and nobody (except me) have any sutch problem !!!
 
M

Michel Walsh

Hi,


Make a new standard project.

Tools | Options ... [Editor] , check [x] the line Require Variable
Declaration
(not required for this problem, I think, but that helps anyhow).

In the form, create two image controls and a button.

Assign, for the first image control, the bitmap Microsoft Visual
Studio\Common\Graphics\Icons\Traffic\TRFFC10A.ICO

Assign, for the second control, the bitmap Microsoft Visual
Studio\Common\Graphics\Icons\Traffic\TRFF14.ICO

Add the code, under the form:
=====================================
Option Explicit

Private Sub Command1_Click()
Set Me.Image1.Picture = Me.Image2.Picture
End Sub
=====================================

Leave anything else unchanged (ok, you can also change the Stretch
properties to True, if you want)

Run the project.
Click the button, that will change the picture displayed on the first
image control.
Move another window over the first picture, then move it away.

Do you see the "green light" or the "stop" icon in the first image? You
should see the STOP control.


If it does, what do you do differently with your actual project? or in
what aspect this demo does not illustrates, incorporates the specifics
relative to what you do?




Vanderghast, Access MVP
 
G

giannis

Again ,when i uncover this form, and i have in the image
controls two .jpg images, all the controls repainted
from the beggining if i set the stretch propertie to true!!!!
Michel Walsh said:
Hi,


Make a new standard project.

Tools | Options ... [Editor] , check [x] the line Require Variable
Declaration
(not required for this problem, I think, but that helps anyhow).

In the form, create two image controls and a button.

Assign, for the first image control, the bitmap Microsoft Visual
Studio\Common\Graphics\Icons\Traffic\TRFFC10A.ICO

Assign, for the second control, the bitmap Microsoft Visual
Studio\Common\Graphics\Icons\Traffic\TRFF14.ICO

Add the code, under the form:
=====================================
Option Explicit

Private Sub Command1_Click()
Set Me.Image1.Picture = Me.Image2.Picture
End Sub
=====================================

Leave anything else unchanged (ok, you can also change the Stretch
properties to True, if you want)

Run the project.
Click the button, that will change the picture displayed on the first
image control.
Move another window over the first picture, then move it away.

Do you see the "green light" or the "stop" icon in the first image? You
should see the STOP control.


If it does, what do you do differently with your actual project? or in
what aspect this demo does not illustrates, incorporates the specifics
relative to what you do?




Vanderghast, Access MVP



giannis said:
When must i use the Me.Refresh ?????
I dont know when another window cover
my application !!!!!
When another window of Windows cover
and uncover my application's Form the Form
repainted from the beggining !!!
When I use PictureBox instead of Image control
there is not any sutch problem (but the picture
control dont support the streching of the image).
Why i dont have problem with PictureBox?
I found in internet a module that strech the
image of PictureBox and when i use this with
a PictureBox i dont have any problem.
But why this problem with the Image control?
I sended at the news the test with Image control
and nobody (except me) have any sutch problem !!!
if
you than
you.
In good
and
have
partially
wish
 
M

Michel Walsh

Hi,


Even if I use jpg instead of ico, even if I set the stretch property to
True, I can't reproduce your case, when I start a fresh new Standard Project
(dot-exe) in VB6. When a moving window pass over my application, and move
out, the copied jpg, as specified by the line of code

Set Me.Image1.Picture = Me.Image2.Picture

is displayed, not the initial one.


Is there anyone else reading those messages that can reproduce the original
poster problem under these simple conditions?



Vanderghast, Access MVP


giannis said:
Again ,when i uncover this form, and i have in the image
controls two .jpg images, all the controls repainted
from the beggining if i set the stretch propertie to true!!!!
Michel Walsh said:
Hi,


Make a new standard project.

Tools | Options ... [Editor] , check [x] the line Require Variable
Declaration
(not required for this problem, I think, but that helps anyhow).

In the form, create two image controls and a button.

Assign, for the first image control, the bitmap Microsoft Visual
Studio\Common\Graphics\Icons\Traffic\TRFFC10A.ICO

Assign, for the second control, the bitmap Microsoft Visual
Studio\Common\Graphics\Icons\Traffic\TRFF14.ICO

Add the code, under the form:
=====================================
Option Explicit

Private Sub Command1_Click()
Set Me.Image1.Picture = Me.Image2.Picture
End Sub
=====================================

Leave anything else unchanged (ok, you can also change the Stretch
properties to True, if you want)

Run the project.
Click the button, that will change the picture displayed on the first
image control.
Move another window over the first picture, then move it away.

Do you see the "green light" or the "stop" icon in the first image? You
should see the STOP control.


If it does, what do you do differently with your actual project? or in
what aspect this demo does not illustrates, incorporates the specifics
relative to what you do?




Vanderghast, Access MVP



giannis said:
When must i use the Me.Refresh ?????
I dont know when another window cover
my application !!!!!
When another window of Windows cover
and uncover my application's Form the Form
repainted from the beggining !!!
When I use PictureBox instead of Image control
there is not any sutch problem (but the picture
control dont support the streching of the image).
Why i dont have problem with PictureBox?
I found in internet a module that strech the
image of PictureBox and when i use this with
a PictureBox i dont have any problem.
But why this problem with the Image control?
I sended at the news the test with Image control
and nobody (except me) have any sutch problem !!!
Hi,


Ok, if I understand you correctly, the control are nice only if
you
force a repaint through something else covering then moving out of
the
way
of your form? If so, at the moment you make the change and wish to
see
it,
add the following line of code:

Me.Refresh


assuming your code is behind the form, Me, to be repainted, or

Me.ControlName.Refresh



Hoping it may help,
Vanderghast, Access MVP


I have the latest driver for my video card (ASUS 7100)
When I run this test all of the controls at the covered form
repainted !!! (images,buttons ...)
In Access i havnt any problem !!

Hi,

It can be a problem of DRIVERS. Be sure (well, that is hard
to
be)
that
your client use the latest DRIVERS available for the video card
at
the
manufacturer site (such as http://www.atitech.ca/support/driver.html).
Access would not necessary use the same calls, in the same
order,
than
in
VB, and so, a difference in drivers MAY be an explanation.


Vanderghast, Access MVP

My problem is that i gave to other people this test
but they say that dont see the repainting (in VB)that
I see !!!
What is the problem ? (If my problem was a wrong
video card i will had the same problem in Access.)

Hi,


You may get better assistance in a dedicated classical VB
newsgroup,
but
it seems you did not asked to VB to handle the repaint for
you.
In
VB,
there
is a onPaint event (thing we do not have with Access, it is good
and
it
is
bad) which fires when the OS ask your program to repaint its user
interface.
Most control "know" how to redraw themselves, like buttons,
scrollbars,
but
some may not, like a picture box. I said "may" because they
have
a
property,
AutoRedraw, set to false by default. Set it to true and VB will
remember
any
drawing command you have done on the control (note that by
default,
the
form
Autoredraw is set to true, but for a picture box, it is set to
false).
Use
the Cls method to clear and start over.

Note that a Paint event occurs if your window was
partially
or
totally
under another one that moves out of the way, but also at loading
time,
and
at resize-enlarge (not if you resize-shrunk). You can also
wish
to
skipout
of the Paint event if your WindowState is minimized, testing for
that
state
early in the event subroutine.



Hoping it may help,
Vanderghast, Access MVP


I have the Access 2000 and the VB6.
I have made a test application with these two products:
I have made a form with an Image control that have an
stretched big image (a .jpg file 50 Kb).
I have put in this form a command button that opens
another empty form that cover the first form.
When I uncover the Form1 i see :
1) in VB the image and the button repainted again (!!!)
That is in the beggining i cant see nothing.
2) in Access the image and button dont repainted.

When i put 5-6 images on the form, then the repainting
hold for about 2 seconds(!!!!) in the VB Form but in
the Access nothing repainted and i dont need wait to see
all the initial form.
I will send two photos that indicate the before and
after covering result in the VB forms.

I need say to me what is the wrong of this problem with VB.

I have VB SP-5 and Access 2000 and Windows 98.
I dont believe that is may occur because of my video card,
because i dont have any other problem in Windows and
with 3D games.
(sorry for my English but i am fron Greece)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top