473,327 Members | 1,952 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,327 software developers and data experts.

Form automatically losing Focus after activation

Hi,

I try to open a form, that automatically loses focus to the window, that had
the focus immediatly before the new form has been opened. The new form is
topmost and displays a message only for a certain time, while the user can
work on his current window.

Everthing works except the fact, that the opened form gets the focus. I
tried to catch the WindowsActivated Event to pass the focus back to the
"LostFocus"-Window. But for any reason that does not work.

Has anyone another simple solution?

Bye,
Dominik
Nov 20 '05 #1
1 1471

I would probably do the re-activation in the calling form rather than the
called one. Try something like this in the main form:
Dim f As New Form2
f.Show()
Me.Focus()
Hope this helps,

Brian Davis
www.knowdotnet.com


"DomGo" <do*****@gorsler.net> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
Hi,

I try to open a form, that automatically loses focus to the window, that had the focus immediatly before the new form has been opened. The new form is
topmost and displays a message only for a certain time, while the user can
work on his current window.

Everthing works except the fact, that the opened form gets the focus. I
tried to catch the WindowsActivated Event to pass the focus back to the
"LostFocus"-Window. But for any reason that does not work.

Has anyone another simple solution?

Bye,
Dominik

Nov 20 '05 #2

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

Similar topics

1
by: jason | last post by:
Hello. I've got this page that refreshes automatically and I am able to set the focus on a specific field at page load with. However the cursor goes back to position 1. In some cases my users...
6
by: sandy_pt_in | last post by:
Hi, I have modal form which I am showing with some fading effect... (it is like balloon that comes when you receive a mail in the outlook.) But when I show this form, Owner form looses focus. I...
3
by: Chris | last post by:
I have a form that calls ShowDialog on a number of different forms at different times. I want to be able to know anytime the form loses focus. But Form.Focused isn't ever true once a control has...
4
by: Johannes Kiehl | last post by:
Hi group, I've been losing most of my remaining hair today, trying to track down a problem with IE6.0 (builds: .2600 and XP SP 2). I set the border-width of form input fields to 1px via...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
1
by: Claire | last post by:
I'm writing an application with custom skinned controls. I have a text editor form with a rich edit control. Because there's no toolbuttons in the skinned control set, I have to use normal ones for...
5
by: LabGeek | last post by:
I have an Access application that I have created that collects data from a scanner and from a weighting scale. The data from the scanner are unique identifiers (barcodes) and the scanner is...
5
by: Andrus | last post by:
Steps to reproduce issue: 1. Run code. 2. Enter some data to grid 3. Click other form caption 4. Click original form caption 5. Enter some characters Observed: entered characters are ignored
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.