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.
9 6770
That does look like what I'm looking for. I'll give it a try and let you know how it works. Thanks Jim.
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.
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.
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. -
-
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
-
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
-
szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
-
-
Public Function DownloadFilefromWeb(url As String, strSavePath As String) As Boolean
-
Dim ret As Long
-
ret = URLDownloadToFile(0, url, strSavePath, 0, 0)
-
If ret = 0 Then
-
DownloadFilefromWeb = True
-
Else
-
DownloadFilefromWeb = False
-
End If
-
End Function
I don't need to read the webpage. I need to get information from my database to the website.
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
If you have it handy, that would be great.
Seth, I keep it all in a separate module so I can call it from any Form at any time. - Option Compare Database
-
Option Explicit
-
-
'==============================
-
' CONSTANTS FOR DBASE WINDOW
-
'==============================
-
Public Const SW_HIDE = 0
-
Public Const SW_SHOWNORMAL = 1
-
Public Const SW_SHOWMINIMIZED = 2
-
Public Const SW_SHOWMAXIMIZED = 3
-
-
'==========================
-
' DBASE WINDOW FUNCTIONS
-
'==========================
-
Public Declare Function IsWindowVisible Lib "user32" _
-
(ByVal hwnd As Long) _
-
As Long
-
Public Declare Function ShowWindow Lib "user32" _
-
(ByVal hwnd As Long, _
-
ByVal nCmdShow As Long) _
-
As Long
-
-
-
'============================
-
' FORM MANAGEMENT FUNCTIONS
-
'============================
-
-
Public Function fAccessWindow(Optional Procedure As String, _
-
Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
-
'****************************************************************************************
-
'* Purpose: Controls the behavior and appearance of the Daatabase window *
-
'* residing on the form, and hence, we reduce the overall size of the FE DB. *
-
'* Accepts: Procedure - describes the behavior requested *
-
'* SwitchStatus - (optional) instructs the procedure to switch the current *
-
'* status of the DB Window *
-
'* StatusCheck - (optional) allows the procedure to check the current status *
-
'* of the DB window to determine whether or not to initiate a *
-
'* change *
-
'****************************************************************************************
-
On Error GoTo EH
-
Dim dwReturn As Long
-
If Procedure = "Hide" Then
-
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
-
End If
-
If Procedure = "Minimize" Then
-
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
-
End If
-
If Procedure = "Normal" Then
-
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWNORMAL)
-
End If
-
If Procedure = "Show" Then
-
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
-
End If
-
If SwitchStatus = True Then
-
If IsWindowVisible(hWndAccessApp) = 1 Then
-
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
-
Else
-
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
-
End If
-
End If
-
If StatusCheck = True Then
-
If IsWindowVisible(hWndAccessApp) = 0 Then
-
fAccessWindow = False
-
End If
-
If IsWindowVisible(hWndAccessApp) = 1 Then
-
fAccessWindow = True
-
End If
-
End If
-
Exit Function
-
EH:
-
MsgBox "There was an error resetting the Database Window! " & _
-
"Please contact your Database Administrator.", vbCritical, "Error!"
-
Exit Function
-
End Function
-
To use this code:
From within a Form, to hide the DBase Window: - fAccessWindow "Minimize", False, False
To show the DBase WIndow (I use this when displaying reports, disabling the Toolbars): - fAccessWindow "Show", False, False
Hope this hepps! Let me know your results.
Sign in to post your reply or Sign up for a free account.
Similar topics
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,...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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,...
| |