Hey there,
I've browsed for some fixes to this but only found a couple of similar
posts, which didn't solve my problem. I'm wondering how to refresh an
image control in a form after a user clicks a cmd button to open the
Windows API Common Dialog and selects a new file (jpeg). Images are
initially loaded in the form's oncurrent event. I've tried using
me.dirty = false to make the form current. Has anyone experienced
this before?
Thanks much. 6 8637
Just changing the image path will refresh the image that is displayed.
Use this in your proceedure somewhere after the user chooses the new file
path.
Me!ImageControl.Picture = "Path to new file"
Mike Storr www.veraccess.com
"Arnold" <ee*******@earthlink.net> wrote in message
news:18**************************@posting.google.c om... Hey there,
I've browsed for some fixes to this but only found a couple of similar posts, which didn't solve my problem. I'm wondering how to refresh an image control in a form after a user clicks a cmd button to open the Windows API Common Dialog and selects a new file (jpeg). Images are initially loaded in the form's oncurrent event. I've tried using me.dirty = false to make the form current. Has anyone experienced this before?
Thanks much.
Thanks Mike,
I was really wanting the image control to refresh immediately. For
instance, users will select thumbnails using the Windows API File
Browser. Once they do, I'd like for the image control to refresh
automatically, before users tab to another control or whatnot. Is
this doable?
Thanks,
Arnold
"Mike Storr" <st******@sympatico.ca> wrote in message news:<17*******************@news20.bellglobal.com> ... Just changing the image path will refresh the image that is displayed. Use this in your proceedure somewhere after the user chooses the new file path.
Me!ImageControl.Picture = "Path to new file"
Mike Storr www.veraccess.com
"Arnold" <ee*******@earthlink.net> wrote in message news:18**************************@posting.google.c om... Hey there,
I've browsed for some fixes to this but only found a couple of similar posts, which didn't solve my problem. I'm wondering how to refresh an image control in a form after a user clicks a cmd button to open the Windows API Common Dialog and selects a new file (jpeg). Images are initially loaded in the form's oncurrent event. I've tried using me.dirty = false to make the form current. Has anyone experienced this before?
Thanks much.
It does for me. The API call is returning a string containing the path to
the image. One of you events or functions are starting this process, that
same code can use the line I provided to reset the image before it ends. All
will appear to be done immediately. Or maybe I'm not quite understanding
you.
"Arnold" <ee*******@earthlink.net> wrote in message
news:18*************************@posting.google.co m... Thanks Mike,
I was really wanting the image control to refresh immediately. For instance, users will select thumbnails using the Windows API File Browser. Once they do, I'd like for the image control to refresh automatically, before users tab to another control or whatnot. Is this doable?
Thanks,
Arnold
"Mike Storr" <st******@sympatico.ca> wrote in message
news:<17*******************@news20.bellglobal.com> ... Just changing the image path will refresh the image that is displayed. Use this in your proceedure somewhere after the user chooses the new
file path.
Me!ImageControl.Picture = "Path to new file"
Mike Storr www.veraccess.com
"Arnold" <ee*******@earthlink.net> wrote in message news:18**************************@posting.google.c om... Hey there,
I've browsed for some fixes to this but only found a couple of similar posts, which didn't solve my problem. I'm wondering how to refresh an image control in a form after a user clicks a cmd button to open the Windows API Common Dialog and selects a new file (jpeg). Images are initially loaded in the form's oncurrent event. I've tried using me.dirty = false to make the form current. Has anyone experienced this before?
Thanks much.
For some unknown reason, I face the same problem (Access XP on Win
2000 Pro)
After attching the image path, the image control does not display that
picture immediately. However it does when you go to another record
then go back.
Here is the code I use under the command button. Anyone has an idea
why does it not refresh the image?
On Error GoTo ErrHandler
Dim lngFlags As Long
Dim strFilter As String
Dim strPathAndFile As String
Me.AllowDeletions = False
strFilter = ahtAddFilterItem(strFilter, "Compressed Image Files
(*.jpg, *.jff, *.gif, *.tiff )", _
"*.JPG;*.JFF,*.GIF,*.TIF")
strFilter = ahtAddFilterItem(strFilter, "Uncompressed Image Files
(*.bmp, *.wmf)", "*.BMP, *.WMF")
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strPathAndFile = ahtCommonFileOpenSave(InitialDir:="C:\", _
Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _
DialogTitle:="Choose an Image File")
If Len(strPathAndFile) > 0 Then
Me![imagePath] = strPathAndFile
Me![productImage].Picture = strPathAndFile
Me!imagePathLink = strPathAndFile & "#" & strPathAndFile &
"##" & "Link to image"
Me.Refresh
Else
Cancel = True
End If
Exit_Sub:
Exit Sub
ErrHandler:
MsgBox "Error " & Err.Number & " : " & Err.Description,
vbExclamation
Resume Exit_Sub
NB
Thanks again for responding Mike;
I'm new to coding with Modules and interfacing with API/ActiveX
controls, and can't really decipher the module code, which creates
various variables, like glpath, strPathAndFileName, etc. I found the
API Common Dialog Browser control code on one of the Access sites and
created a module with it. In the form's oncurrent event, I have the
following code:
On Error GoTo err_Form_Current
If Not Me!Thumbnail_Path = "" Or Not IsNull(Me!Thumbnail_Path)
Then
Me!ImageControl.Picture = GetPathPart & Me!Thumbnail_Path
Else
Me!ImageControl.Picture = ""
End If
I guess I don't know how to best modify the API code, and where best
to put the following code:
Me!ImageControl.Picture = Me!Thumbnail_Path
Thanks again,
Arnold
"Mike Storr" <no****@somewhere.con> wrote in message news:<E_********************@news20.bellglobal.com >... It does for me. The API call is returning a string containing the path to the image. One of you events or functions are starting this process, that same code can use the line I provided to reset the image before it ends. All will appear to be done immediately. Or maybe I'm not quite understanding you.
"Arnold" <ee*******@earthlink.net> wrote in message news:18*************************@posting.google.co m... Thanks Mike,
I was really wanting the image control to refresh immediately. For instance, users will select thumbnails using the Windows API File Browser. Once they do, I'd like for the image control to refresh automatically, before users tab to another control or whatnot. Is this doable?
Thanks,
Arnold
"Mike Storr" <st******@sympatico.ca> wrote in message news:<17*******************@news20.bellglobal.com> ... Just changing the image path will refresh the image that is displayed. Use this in your proceedure somewhere after the user chooses the new file path.
Me!ImageControl.Picture = "Path to new file"
Mike Storr www.veraccess.com
"Arnold" <ee*******@earthlink.net> wrote in message news:18**************************@posting.google.c om... > Hey there, > > I've browsed for some fixes to this but only found a couple of similar > posts, which didn't solve my problem. I'm wondering how to refresh an > image control in a form after a user clicks a cmd button to open the > Windows API Common Dialog and selects a new file (jpeg). Images are > initially loaded in the form's oncurrent event. I've tried using > me.dirty = false to make the form current. Has anyone experienced > this before? > > Thanks much.
On 27 Jan 2004 17:25:12 -0800, Arnold wrote: Thanks again for responding Mike;
I'm new to coding with Modules and interfacing with API/ActiveX controls, and can't really decipher the module code, which creates various variables, like glpath, strPathAndFileName, etc. I found the API Common Dialog Browser control code on one of the Access sites and created a module with it. In the form's oncurrent event, I have the following code:
On Error GoTo err_Form_Current
If Not Me!Thumbnail_Path = "" Or Not IsNull(Me!Thumbnail_Path) Then Me!ImageControl.Picture = GetPathPart & Me!Thumbnail_Path Else Me!ImageControl.Picture = "" End If
I guess I don't know how to best modify the API code, and where best to put the following code:
Me!ImageControl.Picture = Me!Thumbnail_Path
Thanks again,
Arnold
The message from NB seems to indicate this a problem in XP (2002 or 2003
I'm not sure). Is this your case as well? I haven't encountered this yet,
so I can't say why it does this. Wanted to make sure you understood that in
my example "Me!ImageControl.Picture", you are to replace the "ImageControl"
with the name of the image control you are using and Me!Thumbnail_Path with
the string being returned from the API you have used (I assumed there was a
textbox on the form displaying it).
If this still does not refresh to picture immediately, then try using
Me.Repaint to force access to redraw the form on screen.
--
Mike Storr
veraccess.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg Christie |
last post by:
I think I have a somewhat unique situation here, so I thought I should
post it for the few poor souls who run across it and try to google it
like I did.
First of all, I was getting the following...
|
by: Arnold |
last post by:
Hi there,
I've looked at numerous posts out there but have yet to find a
solution to this. I have an image control on a main form that shows a
linked jpeg thumbnail. Image controls are also on...
|
by: Sunit Joshi |
last post by:
Hello All
I have an image control in main.aspx in a method
BuildImage()
{
//...code..
imgDisks.ImageUrl = "barChart.aspx";
}
|
by: Suraj Joneja |
last post by:
Hi All,
I've an image control on my ASP.net page. This displays an image named
'Logo.jpg' in the location '~\Images'. Another application can change this
image. It can select any image and...
|
by: ramendra |
last post by:
how to refresh a image control to pick up the latest image file on a asp.net
page. i am generating a image based on the input from the user and displaying
it on the page through image control. The...
|
by: Brian |
last post by:
Using A2K I have an image control on a report and use code to set the
image.picture to the required jpg. 3 of the jpgs resize properly but
2 do not - they display much smaller than the image...
|
by: PeterKellner |
last post by:
I have an asp.net 2.0 Image control that I have surrounded with the
appropriate atlas:UpdatePanel tags. The Image control referencs an
aspx page whose only job is to output an Image. (it forms...
|
by: R.A.F. |
last post by:
Hi,
I have a custom control in which i have a property based on
CollectionBase class.
like the following one :
//------- XGrid.cs file --------------//
public ColumnsCollection Columns
{
|
by: Erakis |
last post by:
Hi,
I need to put a very large image as background (1030px X 774px) on the
main window of my application. Also, on this window I need to add
transparent Usercontrol, Panel and Label.
Every...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |