473,396 Members | 2,111 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.

Keep popup window always in front

Seth Schrock
2,965 Expert 2GB
Is there a way to keep a popup window always in front similar to how the task manager always stays in front even when it isn't the active window? The idea is that I would have information that would need to be entered on a website, but the user only has one monitor, but wants to be able to see the information from the data while still viewing the web browser.

This feature has been requested by the user, and I don't know how or if it is even possible.
Jun 8 '14 #1
9 6770
jimatqsi
1,271 Expert 1GB
Seth, this might be what you want.
http://support.microsoft.com/kb/210500

Jim
Jun 8 '14 #2
Seth Schrock
2,965 Expert 2GB
That does look like what I'm looking for. I'll give it a try and let you know how it works. Thanks Jim.
Jun 8 '14 #3
Seth Schrock
2,965 Expert 2GB
The only thing that would be better is if I could click inside my popup and not have the rest of Access cover my web browser. Right now, when I open my popup and then open Chrome, my popup stays on top. But when I click on my popup to do a copy/paste of the data, Access covers Chrome and then once I have copied the data, I have to then click on Chrome and then click in the field that I want the data and then I can paste the data. Then I have I have to repeat that for each of the other fields. Maybe I should look into an autofill solution instead.

But otherwise, your link did work in that my popup did stay on top.
Jun 8 '14 #4
jimatqsi
1,271 Expert 1GB
Seems to me I did some web page scraping ... I'll look for that code, it was really pretty simple. I ended up with the text of the webpage in a text box and I could tear it apart as needed.
Jun 8 '14 #5
jimatqsi
1,271 Expert 1GB
Here's a piece of some code I used last year. I can't remember if I had to install something to use this or set a reference in VBA. Probably you can do some web searching and figure it out pretty quickly. But the result of using this code was a text file that I read and digest with VBA.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
  3.   "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
  4.     szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
  5.  
  6. Public Function DownloadFilefromWeb(url As String, strSavePath As String) As Boolean
  7.     Dim ret As Long
  8.     ret = URLDownloadToFile(0, url, strSavePath, 0, 0)
  9.     If ret = 0 Then
  10.         DownloadFilefromWeb = True
  11.     Else
  12.         DownloadFilefromWeb = False
  13.     End If
  14. End Function
Jun 8 '14 #6
Seth Schrock
2,965 Expert 2GB
I don't need to read the webpage. I need to get information from my database to the website.
Jun 8 '14 #7
twinnyfo
3,653 Expert Mod 2GB
Seth,

You could set the OnGotFocus event of your Form to minimize the DB Window. There are a myriad of code examples for such a thing, but I use the db Window minimize features often, as we are typically looking at multiple sources of information (to include our db). This should keep your popup on top, and keep your browser visible.

I have some code you can steal if you need it.

Cheers,
twinnyfo
Jun 9 '14 #8
Seth Schrock
2,965 Expert 2GB
If you have it handy, that would be great.
Jun 9 '14 #9
twinnyfo
3,653 Expert Mod 2GB
Seth, I keep it all in a separate module so I can call it from any Form at any time.

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. '==============================
  5. '  CONSTANTS FOR DBASE WINDOW
  6. '==============================
  7. Public Const SW_HIDE = 0
  8. Public Const SW_SHOWNORMAL = 1
  9. Public Const SW_SHOWMINIMIZED = 2
  10. Public Const SW_SHOWMAXIMIZED = 3
  11.  
  12. '==========================
  13. '  DBASE WINDOW FUNCTIONS
  14. '==========================
  15. Public Declare Function IsWindowVisible Lib "user32" _
  16.         (ByVal hwnd As Long) _
  17.     As Long
  18. Public Declare Function ShowWindow Lib "user32" _
  19.         (ByVal hwnd As Long, _
  20.         ByVal nCmdShow As Long) _
  21.     As Long
  22.  
  23.  
  24. '============================
  25. ' FORM MANAGEMENT FUNCTIONS
  26. '============================
  27.  
  28. Public Function fAccessWindow(Optional Procedure As String, _
  29.     Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
  30. '****************************************************************************************
  31. '* Purpose:  Controls the behavior and appearance of the Daatabase window               *
  32. '*           residing on the form, and hence, we reduce the overall size of the FE DB.  *
  33. '* Accepts:  Procedure -    describes the behavior requested                            *
  34. '*           SwitchStatus - (optional) instructs the procedure to switch the current    *
  35. '*                          status of the DB Window                                     *
  36. '*           StatusCheck -  (optional) allows the procedure to check the current status *
  37. '*                          of the DB window to determine whether or not to initiate a  *
  38. '*                          change                                                      *
  39. '****************************************************************************************
  40. On Error GoTo EH
  41.     Dim dwReturn As Long
  42.     If Procedure = "Hide" Then
  43.         dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
  44.     End If
  45.     If Procedure = "Minimize" Then
  46.         dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
  47.     End If
  48.     If Procedure = "Normal" Then
  49.         dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWNORMAL)
  50.     End If
  51.     If Procedure = "Show" Then
  52.         dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
  53.     End If
  54.     If SwitchStatus = True Then
  55.         If IsWindowVisible(hWndAccessApp) = 1 Then
  56.             dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
  57.         Else
  58.             dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
  59.         End If
  60.     End If
  61.     If StatusCheck = True Then
  62.         If IsWindowVisible(hWndAccessApp) = 0 Then
  63.             fAccessWindow = False
  64.         End If
  65.         If IsWindowVisible(hWndAccessApp) = 1 Then
  66.             fAccessWindow = True
  67.         End If
  68.     End If
  69.     Exit Function
  70. EH:
  71.     MsgBox "There was an error resetting the Database Window!  " & _
  72.         "Please contact your Database Administrator.", vbCritical, "Error!"
  73.     Exit Function
  74. End Function
  75.  
To use this code:

From within a Form, to hide the DBase Window:

Expand|Select|Wrap|Line Numbers
  1. fAccessWindow "Minimize", False, False
To show the DBase WIndow (I use this when displaying reports, disabling the Toolbars):

Expand|Select|Wrap|Line Numbers
  1. fAccessWindow "Show", False, False
Hope this hepps! Let me know your results.
Jun 9 '14 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event,...
2
by: Raffi | last post by:
Here's my HTML code. What I'm trying to do is when the button is pushed to refresh the popup window information, I want the popup to return to the front. The way my code is now, when refreshed the...
4
by: mg | last post by:
I have a main window with a image button that launches a popup window. I want the popup window to always stay on TOP so users can keep clicking it (it has buttons that send it back to the server...
0
by: mg | last post by:
I have a main window with a image button that launches a popup window. I want the popup window to always stay on TOP so users can keep clicking it (it has buttons that send it back to the server...
5
by: Angel | last post by:
I created a popup window using createPopup method. Is there anyway to keep the popup open until the user clicks a button within the popup to close the popup window. Right now the popup window will...
3
by: EnjoyNews | last post by:
I have a popup problem. I have a script that generates a popup for image viewing. It has 2 function, and the first is that it automaticly generates the popup window to the size of the image,...
5
by: James Black | last post by:
In Firefox I can resize the window that is created, but in IE I can't. Here is the code I am using: var...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
12
by: Rahaman sharif | last post by:
Hi All, I have some problem in innerHtml. I have the textbox in innerHtml, In the innerHtml textbox was read only. I want make it to enable. if user enter the text that text will be retrieved, so...
1
by: beachking | last post by:
My popup window works fine on this page: http://www.adgraph.com/banners/banner-examples.html (click LIVE CHAT on the menu bar). After pasting the same code on this other website page, it won't...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.