473,890 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A97: Setting form's Picture property to another file from within VBA doesn't repaint the form with new bitmap

MLH
Setting form's Picture property to another file from within
VBA doesn't repaint the form with new bitmap - for instance...

Me.Picture = "c:\pics\MyNewP ic.jpg"

I tried
Me.Repaint
afterward, to no avail. Ideas? Suggestions?
Feb 13 '06 #1
4 4470
MLH wrote:
Setting form's Picture property to another file from within
VBA doesn't repaint the form with new bitmap - for instance...

Me.Picture = "c:\pics\MyNewP ic.jpg"

I tried
Me.Repaint
afterward, to no avail. Ideas? Suggestions?

I do this (and started it in an A97 application), but with an image
control instead of the form picture property:

Forms!frmSetUpV iewMaps.imgMap. Picture = strMap

Forms!frmSetUpV iewMaps.Repaint

The above image is in the footer of a continuous form and the above two
lines are fired on the on Current event.

I wonder if a form requery is required in your case? Or, if your form
is a pop up or something, use an image control instead of the form
picture property?

The other thing to check - have you set the PIcture Type property to
"linked"?

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Feb 13 '06 #2
MLH
>I do this (and started it in an A97 application), but with an image
control instead of the form picture property:

Forms!frmSetUp ViewMaps.imgMap .Picture = strMap

Forms!frmSetUp ViewMaps.Repain t

The above image is in the footer of a continuous form and the above two
lines are fired on the on Current event.

I wonder if a form requery is required in your case? Or, if your form
is a pop up or something, use an image control instead of the form
picture property? Hmmm??? Me.Requery. Hadn't considered that. Will try.
The other thing to check - have you set the PIcture Type property to
"linked"?

Yes, changed to Linked right off the bat - was really hoping on that
one. I may try your image control suggestion. I don't want to have the
image come to the foreground though - covering up other controls.
My picture property image, of course, covers the entire form surface.

Feb 13 '06 #3
MLH
Requery didn't do me any good.

Its some kind-a-video thing. I put an unused textbox on the form
left 0, top 0, width 0 and height 0. After I change the forms's
picture property, I set the textbox's height & width to the form's
height and width and in the next 2 lines, reset it back to zero
for both. That somehow forces a refresh of the picture. Not my
first choice work-a-round, but may be the best of all options.

Next - how to avoid the message box announcing "Importing
c:\bitmaps\some file.jpg". Dunno... SetWarnings False perhaps???
Feb 14 '06 #4
You ask so many questions you really should learn how to search GoogleGroups
effectively. It will save you hours of development time.

Here's a previous post of mine on this issue.

The one thing you must do is turn of the Loading Image dialog. If you don't,
and quickly scroll through the records in Form view, or page quickly in
Print Preview, you run the risk of crashing Access. Use the Registry mod at
the Access MVP site:
Additionally, two issues in regards to the Registry modification pointed to
here http://www.mvps.org/access/api/api0038.htm
1) The Registry key MUST be "No" NOT "no" or "NO"
2) On systems with XP or on systems with more than one user account,
you must add/modify the key in both HKEY_CURRENT_US ER and
HKEY_LOCAL_MACH INE.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"MLH" <CR**@NorthStat e.net> wrote in message
news:up******** *************** *********@4ax.c om...
Requery didn't do me any good.

Its some kind-a-video thing. I put an unused textbox on the form
left 0, top 0, width 0 and height 0. After I change the forms's
picture property, I set the textbox's height & width to the form's
height and width and in the next 2 lines, reset it back to zero
for both. That somehow forces a refresh of the picture. Not my
first choice work-a-round, but may be the best of all options.

Next - how to avoid the message box announcing "Importing
c:\bitmaps\some file.jpg". Dunno... SetWarnings False perhaps???

Feb 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
3202
by: Picho | last post by:
Hi all, Is there any .NET way (I am not rulling out API usage) to add button(s) to a form's title bar? I found some non-.NET solutions that did actually work in VB6 but not in the ..NET forms... I tried painting, but the paintaing area provided by the form is only the client area - no visible way to paint on the title bar.
22
2375
by: Bradley | last post by:
Has anyone else noticed this problem? I converted the back-end to A2000 and the performance problem was fixed. We supply a 97 and 2000 version of our software so we kept the backend in A97 to make upgrading simple for users. We've done it like that for years but a new client has been having severe performance issues... solved by converting the backend to 2000. -- regards, Bradley
9
7812
by: deko | last post by:
Is it possible to store a company logo (a gif file) in a table (binary field) and have the logo appear in a form? If I insert a picture object in the form, the properties sheet of the Image control has a Picture field that takes a file path. How do I reference the gif file stored in the table? Thanks in advance.
6
4674
by: peter hansen | last post by:
By changing the backgroundimage of a form into a picture and then enable the TransparencyColor you can make a form as a cirkel etc (the form has the same 'form' as the picture has). I have then disabled the FormBorderStyle (None) By doing that I have no border I can click at to drag the form. How do I make the form-area drag-able so that it is possible to click at a random point at the form, hold down the mousebutton and then move the...
6
4765
by: Rich | last post by:
Hello, I want to simulate the dynamic thumbnail display of Windows Explorer (winxp) on a form or pannel container. If I place a picture box on my container form/pannel and dimension it to the size of a thumbnail and set the sizemode to Stretch -- I get one thumbnail. I want to retrieve all the picture files (jpg, bmp) in a directory into an array list and then display this list as thumbnails on my form dynamically. So my question is...
21
13032
by: MLH | last post by:
If I choose a command button on a form in design view, open the properties box and click the Picture property and its wiz button, I'm presented with a lengthy list of pictures. Everything from Add Table, Address Book, Airplane to Underline, Undo, Undo (Rewind). I would like to know where they are stored. I thought it might be c:\program files\microsoft office\office\bitmaps but I don't think so. Anybody know where they are stored and...
4
12868
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property, which becomes invalid when the user installs the database (ie: c:\devpath\ becomes c:\program files\mydbapp, but the .Picture property still points to c:\devpath\) The problem is that I don't *know* what installation path the user will select,...
1
3167
by: =?Utf-8?B?Y3JhbmtlX2JveQ==?= | last post by:
Hi Folks, I'm not sure where this post belongs since I'm using managed vc.net, but the issue is around GDI BitBlt. Here is a summary of the problem: - I am trying to copy a bitmap of my main form into a picture box. - To do this, I bitblt using the device contexts of the form and a bitmap object. - After blitting, the bitmap image is always blank. I don't understand what
1
5607
by: martinsmith160 | last post by:
Hi all I am trying to create a level builder tool for a final year project and im having some problems drawing. I have placed a picture box within a panel so i can scroll around the image which is working fine. My aim is to double click the picture box and the desired image will be drawn at the mouse position. This works fine unless I scroll or minimise the form because the image isnt repainted after movement. I looked up drawing the image to...
0
9812
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10795
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10444
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9612
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5832
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4653
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3261
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.