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

Showing a form without focus

How do i do this?

I have this at the top of the class for my form, but it doesnt work.

Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean
Get
Return True
End Get
End Property

Any ideas? At the moment i show the form and then call the Focus method on
the calling form, but its tacky. The called form is topmost, but taking that
off doesnt do anything - it still steals focus.

Jun 17 '07 #1
1 4209
I just checked and standard form.Show method does that properly.

I use code like this:

void SomeFormEventHandler(object sender, ...) {
...
SecondForm f = new SecondForm();
f.Show((IWin32Window)this);
...
}

SecondForm is shown without focus - original form stays focused.

However I found that even if main form is TopMost = true, new forms can
cover it when shown.
Otherwise it works without additional tricks.

Can you post your code, which doesn't keep focus in calling form?

"Luke R" <do**@spam.mewrote in message
news:0F**********************************@microsof t.com...
How do i do this?

I have this at the top of the class for my form, but it doesnt work.

Protected Overrides ReadOnly Property ShowWithoutActivation() As
Boolean
Get
Return True
End Get
End Property

Any ideas? At the moment i show the form and then call the Focus method on
the calling form, but its tacky. The called form is topmost, but taking
that off doesnt do anything - it still steals focus.

Jun 18 '07 #2

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

Similar topics

7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
5
by: Martin | last post by:
I have the following function in the onchange event of several text boxes. If the user enters an invalid number the alert displays. I would like to return the user to that same field after he...
2
by: S P Arif Sahari Wibowo | last post by:
Hi! Do you know how to put a form's Access-Visual-Basic-code that will force the form to be inserted, while the user has not type anything in the form, without changing focus, selection, etc.? ...
2
by: Krzysztof Karnicki | last post by:
I would like develop Form on my Windows Application, that is going to notify the user, just like Microsoft Office 2003 shows that there are new mail coming. When I use System.Windows.Forms.Form and...
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...
11
by: sheldonlg | last post by:
I have a problem with not seeing the current focus while in a particular screen in a my app. The focus does not show for a type=text or textarea. I have tried to reproduce this problem in a test...
2
by: Joergen Bech | last post by:
Hope someone has a solution or some suggestions for this. This cannot be right?!? Problem: I have multiple non-modal forms open at the same time. One or more of these forms have a...
3
by: RLN | last post by:
Re: Access 2003 I have a process that sends out emails to addresses (internally in our company). Form1 has all the main functionality/data, etc on it. When the user clicks "Send Emails" on...
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.