473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FolderBrowserDialog opening behind active application

My application (a VB.NET 2003 WinApp) currently has first an OpenFileDialog
(asking for an input file to the process I'm working on), and then once the
user selects that, it brings up a FolderBrowserDialog box (asking for a
destination for the output files from the process to be saved).
The OpenFileDialog works beautifully.
The problem is, after the user selects the input file from the
OpenFileDialog, when it opens the FolderBrowserDialog, it opens up behind
the application, and the user has to alt-TAB to get to it.
How can I force the FolderBrowserDialog to come to the front (at least
initially - if they choose to click on another application, I don't mind it
going behind then)?
Thanks!
-Scott
Nov 21 '05 #1
5 7323
Are you using the overloaded ShowDialog function that receives the parent
IWin32Window?

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Scott M. Lyon" <sc******************@rapistan.BLUE.com> escribió en el
mensaje news:%2****************@TK2MSFTNGP14.phx.gbl...
My application (a VB.NET 2003 WinApp) currently has first an
OpenFileDialog (asking for an input file to the process I'm working on),
and then once the user selects that, it brings up a FolderBrowserDialog
box (asking for a destination for the output files from the process to be
saved).
The OpenFileDialog works beautifully.
The problem is, after the user selects the input file from the
OpenFileDialog, when it opens the FolderBrowserDialog, it opens up behind
the application, and the user has to alt-TAB to get to it.
How can I force the FolderBrowserDialog to come to the front (at least
initially - if they choose to click on another application, I don't mind
it going behind then)?
Thanks!
-Scott

Nov 21 '05 #2
This is probably a stupid question, but here goes anyways:

The code for calling the ShowDialog function is in the code behind my main
form. How do I determine the IWin32Window value for the calling form?
Thanks!
-Scott
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message
news:Oy**************@TK2MSFTNGP10.phx.gbl...
Are you using the overloaded ShowDialog function that receives the parent
IWin32Window?

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Scott M. Lyon" <sc******************@rapistan.BLUE.com> escribió en el
mensaje news:%2****************@TK2MSFTNGP14.phx.gbl...
My application (a VB.NET 2003 WinApp) currently has first an
OpenFileDialog (asking for an input file to the process I'm working on),
and then once the user selects that, it brings up a FolderBrowserDialog
box (asking for a destination for the output files from the process to be
saved).
The OpenFileDialog works beautifully.
The problem is, after the user selects the input file from the
OpenFileDialog, when it opens the FolderBrowserDialog, it opens up behind
the application, and the user has to alt-TAB to get to it.
How can I force the FolderBrowserDialog to come to the front (at least
initially - if they choose to click on another application, I don't mind
it going behind then)?
Thanks!
-Scott


Nov 21 '05 #3
Ah, that might be it. No, I was using the ShowDialog function that doesn't
pass any parameters.
I'll try the other, and see if that works better.
Thanks!
-Scott

"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message
news:Oy**************@TK2MSFTNGP10.phx.gbl...
Are you using the overloaded ShowDialog function that receives the parent
IWin32Window?

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Scott M. Lyon" <sc******************@rapistan.BLUE.com> escribió en el
mensaje news:%2****************@TK2MSFTNGP14.phx.gbl...
My application (a VB.NET 2003 WinApp) currently has first an
OpenFileDialog (asking for an input file to the process I'm working on),
and then once the user selects that, it brings up a FolderBrowserDialog
box (asking for a destination for the output files from the process to be
saved).
The OpenFileDialog works beautifully.
The problem is, after the user selects the input file from the
OpenFileDialog, when it opens the FolderBrowserDialog, it opens up behind
the application, and the user has to alt-TAB to get to it.
How can I force the FolderBrowserDialog to come to the front (at least
initially - if they choose to click on another application, I don't mind
it going behind then)?
Thanks!
-Scott


Nov 21 '05 #4
I am not sure if I understand the question, but the
System.Windows.Forms.Form class already implements the IWin32Window
interface, so you only need to pass the form that is showing the dialog.
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Scott M. Lyon" <sc******************@rapistan.BLUE.com> escribió en el
mensaje news:OG****************@TK2MSFTNGP09.phx.gbl...
This is probably a stupid question, but here goes anyways:

The code for calling the ShowDialog function is in the code behind my main
form. How do I determine the IWin32Window value for the calling form?
Thanks!
-Scott

Nov 21 '05 #5
That was it! Geez, I should have thought of that! :)
Thanks, Carlos!

-Scott

"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am not sure if I understand the question, but the
System.Windows.Forms.Form class already implements the IWin32Window
interface, so you only need to pass the form that is showing the dialog.
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Scott M. Lyon" <sc******************@rapistan.BLUE.com> escribió en el
mensaje news:OG****************@TK2MSFTNGP09.phx.gbl...
This is probably a stupid question, but here goes anyways:

The code for calling the ShowDialog function is in the code behind my
main form. How do I determine the IWin32Window value for the calling
form?
Thanks!
-Scott


Nov 21 '05 #6

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

Similar topics

0
by: Anja | last post by:
I have installed the new Visual Studio 2003 and implemented the FolderBrowserDialog. Everything works fine, if I open the FolderBrowserDialog before opening a Database Connection. If I open...
25
by: | last post by:
Hi, The following code shows the FolderBrowserDialog = broken. FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.ShowNewFolderButton = false;...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
9
by: hhh12347 | last post by:
FolderBrowserDialog crashes on my Windows 2000 computer. Here is a C# test program: using System; using System.Windows.Forms; public class TestForm : Form { FolderBrowserDialog...
0
by: Tommy Clark | last post by:
I am using Microsoft Development Environment 2003 Version 7.1.3088 and .NET Framework 1.1 Version 1.1.4322 SP1. I have an MFC application that we have ported to .NET and have added the...
12
by: JohnR | last post by:
I have narrowed a problem down to a simple example. A form with two buttons. One EXIT and one FBD. The exit button does an "END" to end the application. The FBD button does a...
0
by: mohit | last post by:
Hello, I am running my windows application on a 64 bit machine with MS .NET Framework 2.0 (x64). When using the FolderBrowserDialog an unhandled exception was coming time and again. After...
2
by: Marcel Brekelmans | last post by:
Hi, I'm trying to display a MessageBox after a FolderBrowserDialog. I see that it gets displayed, but not activated. The form is not in front and when I have some other forms open the MessageBox...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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,...

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.