Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PopUP Transparent

Status
Not open for further replies.

sjpistolesi

Programmer
Jun 6, 2002
71
US
ACCESS2000:

I have a simple popup form, which I use to inform users about that is taking place.

It is displayed as a transparent block, rather than a normal popup. Why???

Sandy
 
Not sure what you mean about "transparent". Are you saying that it's pulling up, but not there? In that case, it's hidden. How do you mean by "block"? Just trying to understand... Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"I do this because I know I can - no need to send gifts - just send me a smile to show me that I've helped." ~ seen on a cardboard sign held by Roy McCafferty on a corner in Las Vegas
 
hey, perhaps i have a clue... to figure out what sandy is saying.

Sandy, by saying transparent, do you mean to say that your pop up has no border? Perhaps you need to set the border to sizeable or thin, rather then none.
 
hey, perhaps i have a clue... to figuring out what sandy is saying.

Sandy, by saying transparent, do you mean to say that your pop up has no border? Perhaps you need to set the border to sizeable or thin, rather then none.
 
[Resubmission ... first post did not record for some reason]

By transparent, I mean that the border frame is visible, but the inside of the window is clear ... can see the calling screen behind it.

So, it does pop up; but nothing can be seen within the frame's edge. No message, background, or internal stuff is displayed.

Very odd indeed,
Sandy
 
does this popup form open OK on it's own (with nothing behind it!)
 
Gazer44: Yes, it opens OK, and closes when directed. But it looks as if I removed the glass from a window at home.

Except for the frame, nothing is "there."

Sandy
 
Sounds a bit funny- how about opening the popup form to the side of the main form so there's nothing behind it. Not an ideal fix but a possible work round until it's figured out.
 
Gazer44,

As the calling form is larger, it is difficult to have it pop up to the side (I'll attempt that, however).

I did try making the calling form ".invisible = True" to hide it. The calling form hid, as it should. The result then was that the popup window was displayed with a solid white background and nothing else within the frame. (Also, odd.)

Still puzzled, Sandy
 
Followup --> Gazer44,

Well the alignment to the right side didn't work. In fact, this time, the area inside the frame is once again invisible; no longer displaying the white I saw in the earlier attempt this morning.

Sandy
 
Try:-When opening the popup form-at same time close the form behind it, then when popup form closes re-open the main form again at same time. (use 'docmd.close & open' cmds)

strange prob !
 
Sorry not to get back sooner, Gazer44:

I tried the open/close technique; it did not eliminate the symptom of a transparent "fill" area to the form. In fact, it exposed what was then behind it ... the database screen one uses to select features of the database. Ergo, it is truly transparent.

Very odd indeed. I suppose I'll have to report this to the Microsoft technicians.

Sandy
 
I've had what i think could be a similar problem with a pop up form. The form did not display correctly.

After opening the form I used the Form.Repaint Method

forms.frmName.repaint

this fixed my problem



 
Neill,

Thanks for the suggestion ... still did not resolve the problem.

I do appreciate the input, though.

Sandy
 
I don't know what from Access 97 has changed in the Access 2000 release. So I'll just ask other questions, directed at things to check out.

Someone earlier asked if the pop-up forms opens okay on its own? I will restate the question: Do you see the same "transparency behavior" if you just open the pop-up form from the database window, with no other forms (or queries or reports or...) open? Do you see the same "transparency behavior" if you do the same, but also make sure as few as possible other programs and processes are running?

Does Access 2000 actually give you a "Transparency" property (whatever this new property might be called, or wherever this new effect might be contained) for forms or form section backgrounds or such like things as might of concern here? I know that in Access 97, I can set *some* colors to a Transparent value, but I also know I can't do that to a form section's background. I can't *set* a form to see through it to what's underneath the form itself. Has Microsoft actually given us this ability explicitly in Access 2000 somehow? The answer may be "no", but the question seems worth asking to this someone who doesn't know the answer yet. :)

As Neilll says, it could also be a "repaint" problem, an instance of the computer not getting around to repainting the form. This might be due to a number of things.

Repaint thought #1):
In Access 97, there are two Echo methods, which explicitly turn off/on form repainting until explicitly turned on/off again. See if something like that is happening in your code. Turning Echo off is suggested as a method to increase speed sometimes if the user does not need to see the screen change while processing is going on. But if code stops before Echo is turned back on, the user can be left looking at what seems to be a locked-up instance of Access (other apps are not affected). And other windows that pop up on top of Access seem to leave "holes" or "tracks" of emptimess [sic.] in the Access window, if they are closed or moved around. If Echo were turned off, and your pop-up form were popped up before Echo was turned back on, I *actually* wouldn't expect to see it at all. But strange things happen on other people's ;-) computers, I'm told, and I've not programmed with Access 2000 yet. Its behavior might be a bit different. So this seems to be an unlikely possibility, but one worth ruling out.

Repaint thought #2):
Your computer might be hurting for enough free memory at the time that your pop-up form pops up -- enough free memory to finish repainting the screen and the new form. (Your computer/Access may even warn you with a "Not enough memory" dialog then or soon after; or it may not). This is one good reason to answer the first question: Does the pop-up exhibit the "transparency behavior" when you have as little else as possible running? Try a clean boot on your computer, closing anything other than Access that you can get away with closing, then opening your Access database (holding down the shift key while opening it, so that any automacros don't even run). Then run your pop-up dialog itself from the database window, and see how it behaves. (The clean boot is your attempt to make sure that as little as possible even gets the chance to use memory and forget to release it or release it properly.)

(repaint #2, cont'd) If your pop-up consistently runs without the "transparency behavior" in this kind of test, or even on a machince with a lot more memory, but not when other things are running or have been running -- if so, then this may be a decent indication that memory usage problems could be your culprit.

(repaint #2, cont'd) Is the form that calls the pop-up form a large form? Meaning "large in the sense that would use up memory", not "large in the sense of width by height" :) . Either a large number of controls or large amounts of data displayed on the form would use up large amounts of memory.

(repaint #2, cont'd) A long-worded "For Instance": A form in one of the databases I developed earlier this year contains an OLE object field, and users drag into it Word and Excel documents which contain sometimes-very-large pictures within them. (In fact, the point is to store and display the pictures, and I haven't figured out how to display the pictures directly -- on every PC -- in an OLE field yet. But Access has no problem displaying Word and Excel docs on a PC with Word and Excel installed, so the pictures are in the docs, and the docs are displayed.) The documents are embedded, not linked, so the full contents of the file are stored in the datbase field and displayed on the form. The OLE object field does display its contents *if it can*, *not* an icon representing the contents. I was really, really, really (emphatic enough for ya'?) just buggering confused when my supervisor and principal-user-of-the-form called me in and showed me how the form sometimes flaked, just a short while after I made it available to him. Buttons background colors would go white instead of gray, leaving the foreground color intact. Fonts on controls would change. The embedded picture, data in other fields, other stuff would disappear from view. And all of this behavior was inconsistent -- and inconsistent (and seemingly inconsistent) is a whole lot tougher to track down than consistent! Moving off the record where the behavior first occurred at a given instance, then moving back, might show the form and record intact again (or might show it messed up again, in the same/similar-enough or a different way) -- so data wasn't affected, just the view. Nothing in my code was causing it, Scout's Honor. "It's not my fault, Boss! But more important, I can't figure it out just yet. I'm still trying, though." I noted that the behavior only started occurring after certain records were displayed -- at last a consistency! Testing confirmed this. Avoid those records, avoid the problem. It turns out that, after development and testing of the form with pictures provided by the department responsible for providing the pictures for actual use, said department produced more pictures for actual use -- as of course, they were supposed to. But some of the pictures they were now providing were far larger than any of the pictures provided for my use during testing, even though those original pictures were also for actual use. These pictures were far larger in terms of the amount of memory required to diplay them, and the PCs were having memory problems after displaying large pictures. Windows didn't have enough memory left then to properly handle display updates, and colors, fonts, and more suffered. In some cases, we saw the "Not enough memory" error, and in others we didn't. That is what began to put me on this track, though. (And be sure that I checked my code to be sure that I was explixitly releasing any memory I was using.) Testing did include displaying the same records on the PC with the most memory. And that was enough to allow display of some of the problem records without incident, but not some of the largest. Our solution in the end had to be this: The picture-producing department has to produce pictures that take up less memory so that the pictures can all be displayed on all of our computers: pictures with less detail, pictures with less (no) extraneous white space around the edges, pictures with less information contained in them, and in some cases, physically smaller pictures. Now the form in question doesn't run out of memory, and the requisite users can do their work. (...Of course, if I ever find the way to display GIFs or other picture formats directly from a database field, then I can cut down on the memory requirements even further by eliminating the need to have Word or Excel running to display the documents currently stored in the fields. Apparently, I just haven't found an OLE server for picture formats, not even for .WMF files (Windows Metafiles)! This isn't a company priority now, though, since the current system is working.)

Good Luck, Readers!
-- C Vigil =)
(Before becoming a member, I also signed on several posts as
"JustPassingThru" and "QuickieBoy" -- as in "Giving Quick Answers")
 
hey CVigil, did you write 'War & Peace'. Thats the longest reply ever. Good on ya !
 
Tolstoy wrote *War & Peace*, Gazer44. If I had written it, the Russian in the original would have been much, much poorer.

;-)

Thanks for your encouragement of complete and detailed questions and answers. I even try to check my spelling and typing before submitting, replacing pronouns with the original nouns for clarity where needed, and rereading to see if my post should be as clear to most others as to myself. And I try to make sure that I address what other readers than the poster might need to see, since I myself ususaly find more answers by reading other people's questions and the answers they get; I even sometimes add to answers for questions more than a year old -- after all, "*I* was just reading those old posts, wasn't I?" When they don't help the original poster, they still can help a lot of others. I merely endeavor to serve my fellow man (and for those require me to be specific) and woman.

(P.S. I love the expression "Good on ya!" I have an Aussie friend who uses it. It sounds so cool!)
-- C Vigil =)
(Before becoming a member, I also signed on several posts as
"JustPassingThru" and "QuickieBoy" -- as in "Giving Quick Answers")
 
CVigil:

<< Do you see the same &quot;transparency behavior&quot; if you just open the pop-up form from the database window, with no other forms (or queries or reports or...) open?>>
Nope. When opened in Form View, it appears normally; translation: form and frame are displayed rather than transparent.

<<Do you see the same &quot;transparency behavior&quot; if you do the same, but also make sure as few as possible other programs and processes are running?>>
Yup. When called, the only portion of the window that appears is the border and open/close buttons of a window frame ... the center region is transparent.

<< set Transparent value .... Has Microsoft actually given us this ability explicitly in Access 2000 somehow? The answer may be &quot;no&quot;, but the question seems worth asking to this someone who doesn't know the answer yet. >>
Not that I'm aware; but, then one can never know what the folks engineering the new versions are up to (perhaps someone intended to provide that capability and never finished it??). And the &quot;detail&quot; section of the forms's visible property is set to &quot;Yes.&quot;

<<Repaint thought #1):>>
Hmmmm. Will try explicitly turning Echo ON and seeing what happens. More later on that one.

<<Repaint thought #2):>>
Memory ... even available RAM or Resources is not a problem here. Ever since Microsoft engineers starting viewing as &quot;memory's cheap, buy more&quot; years ago (nobody knows how to economize or do housekeeping in their shops), I've always up'd the ante on my resources here. Truly not an issue. To humor this concern, however, I did reboot (cold boot) and the symptom continues.

<<Repaint thought #2 cont'd):>>
Chuckle. Not sure I know how to open/call a window from the database window --- at least for the present. So will have to hold on that response for now.

<<when my supervisor and principal-user-of-the-form called me in and showed me how the form sometimes flaked, just a short while after I made it available to him. >>
Chuckle ... that's a familiar story with all of us who do programming, no matter what the venue.

Also, more than one developer forgets (or is perhaps not attuned) to the impact of the size of images on available resources. Just look at those busy web sites out there that take forever to load ... driving visitors away, who may have smaller and less capable hardware.

I'll look into the echo thing and get back to you.

Thanks so much for taking the time to brainstorm.

Sandy
[/col]




 
C Vigil [Followup]:

Turning echo on did not fix the problem. I even experimented with painting and repaint .... same transparent frame results.

But thanks just the same {smile}, Sandy
 
You're welcome, Sandy! Even now, 23 days later :) . I finally got Tek-Tips notifying me reliably about threads I post to, and only stumbled across this one again when I searched for my username on posts (heh).

I said, &quot;Then run your pop-up dialog itself from the database window, and see how it behaves.&quot; And you said, &quot;Not sure I know how to open/call a window from the database window --- at least for the present.&quot; I think you do, but perhaps my phrasing wasn't clear enough. Your dialog is a form that you designed (presumably within Access), so go to the Forms tab of the database window, select you form, and click &quot;Open&quot;. You indicated earlier in your post that you had done this, so I'm really just including this paragraph in the post to resolve any lingering doubts/confusion in your or future readers' minds.

Since your form runs normally when you open it from the db window with the 'Open' button, we should presume that *something* is interfering when it is called from your &quot;calling form.&quot; But what? There's the rub.

Inserted late in the typing of the letter: Read all my suggestions before you try one of them; see what's best to try first. I've just rattled off what came to mind.

Are you by any chance willing to try gratuitous &quot;other things&quot;? What about just changing the size properties of the dialog after it opens? Changing border styles and background colors? Adding and removing controls? Changing the visibility of controls? Moving controls around on the form? Anything that would change the look if it could be seen [afro2] instead of hanging out in this Zen state [yinyang] ? The thought comes as a way of forcing a repaint in a way other than using the .Repaint method. Maybe in the Load or Open event, maybe in a timer event to keep it happening repeatedly, maybe on a button or form click event ...

... That strikes another bell. Does anything on the dialog respond to clicks, even if you can't see it? Or if you position the transparent dialog over a button on the calling form, can you click the calling form's button? Can you pop up multiple instances of this dialog then? If so, are they all transparent?


And now the ideas I meant to suggest from the very beginning:
-----------------------
1) Try copying your calling form, making a new copy of it and invoking that.

2) Try making a new form, setting the new form's properties to match the original calling form, then copying all your controls and code to it, and invoking that.

3) Try duplicating your calling form from scratch, new form, all new controls, with properties set to match the originals, and invoking that.

4) Do the same stuff with your dialog form, if needed.

These steps might remove or avoid recreating some corruption in one of the forms.

I'm suggesting working with your calling form first because the dialog runs just fine on its own; you say it only misbehaves when called from your calling form. In fact, maybe a quicker simple test would be to create a blank new form, and have its click event invoke the dialog! Do you get the same problem behavior?

Hoping you're not eventually reduced to going on the road with your new side-show act &quot;The Incredible Floating Frame&quot; ;-) , I sign,
-- C Vigil =)
(Before becoming a member, I also signed on several posts as
&quot;JustPassingThru&quot; and &quot;QuickieBoy&quot; -- as in &quot;Giving Quick Answers&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top