473,780 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Browse File Dialog Loses focus & goes under popup form.

I am using code from the following links to establish a
Browse File and Browse Folder dialog.

http://www.mvps.org/access/api/api0001.htm
http://www.mvps.org/access/api/api0002.htm

This code works great. However, once the file dialog becomes visible,
if the user clicks on my popup form that exists under the file dialog,
the file dialog disappears under the form. Then, when the form
clears, the file dialog shows. Select a file, and an error message
occurs.

How do I keep the Browse File Dialog on top of my popup dialog form?

Thanks
Greg

Apr 10 '07 #1
3 5219
On 10 Apr 2007 14:33:19 -0700, "Ap******@gmail .com"
<Ap******@gmail .comwrote:

Try setting the hwndOwner element to Me.hWnd of your popup form.

-Tom.
>I am using code from the following links to establish a
Browse File and Browse Folder dialog.

http://www.mvps.org/access/api/api0001.htm
http://www.mvps.org/access/api/api0002.htm

This code works great. However, once the file dialog becomes visible,
if the user clicks on my popup form that exists under the file dialog,
the file dialog disappears under the form. Then, when the form
clears, the file dialog shows. Select a file, and an error message
occurs.

How do I keep the Browse File Dialog on top of my popup dialog form?

Thanks
Greg
Apr 11 '07 #2
>
Try setting the hwndOwner element to Me.hWnd of your popup form.
Hello Tom

Is this what you are referring to? I added the hwnd line, but am
unsure about how to make the reference and assignment?
varFileName = ahtCommonFileOp enSave( _
OpenFile:=True, _
InitialDir:=var Directory, _
Filter:=strFilt er, _
Flags:=lngFlags , _
DialogTitle:=va rTitleForDialog ,_
hwnd:=Me.Form) '<-- my
code??? or Me.parent ???

Apr 11 '07 #3
I believe I got It! This seems to be working:

.hwndOwner = Screen.ActiveFo rm.hwnd

Thanks Tom

Greg

Apr 11 '07 #4

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

Similar topics

1
2152
by: Colin Graham | last post by:
Hi there, i want to create a piece of javascript that checks to see if a popup window is open when the user clicks on the main form. If the popup is open it will set focus back to the popup and display an alert message. im not sure of the event to use on the main form to call the function or how to write the function. any help greatly appreciated as im a bit pushed for time on this one.
10
5718
by: tom | last post by:
Hey All, While running some code, I'd like to open a form as a dialog box (so that the code will wait for the form to be closed/hidden -- easy to do using the acDialog argument), but I would like this form to have NO BORDER. Is this possible in any way? Can the form, upon opening, strip off its own border? ???? -Tom
7
3706
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a satisfactory answer (check your browser) so now that I've had the time to set up a reasonable little test that I can post somewhere, I'll try again. The app I've written has three ASPX pages. One is a combined page which writes a little text...
3
2755
by: Gordan A Ziza | last post by:
Hello everyone, We are developing a MDI application and what we would require is the following: 1. To open a MDI child form as Form1 2. To open another MDI child form as Form2 that would act as a dialog form for the Form2 3. Form2 must not prevent any other MDI forms from opening or otherwise prevent application from working properly
3
11075
by: Highlander | last post by:
Hello all. Consider the following HTA: <HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub ButBrowse_onclick() '-- show browse window and Get file path:
3
31913
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click() for the input control. Do you know how to make this work in firefox? Thanks
4
2918
by: rdemyan | last post by:
I'm using code from the following web page to open the API Browse Folder dialog http://www.mvps.org/access/api/api0002.htm It all works fine. But if the dialog box is open and the user closes Access, the system just hangs and Access apparantly cannot close. I have to open the Windows Task Manager and force the closing (and even that takes quite awhile).
11
5297
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok / dangerous? How can I force shutdown code within the dialog's Form.FormClosed event run? Zytan
11
2379
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have realized that despite suggestions to use DHTML-based modal dialogs are very common? there is not a single fully functional reliable copyright-free cross-browser alternative to say MsgBox (VBScript) or showModalDialog (IE). This way such suggestions up to...
0
9474
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
10306
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
9931
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
8961
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
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
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.