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

give focus to the application at startup

How can I make sure that my Windows application will have the focus at
startup?
Currently, if there is an Explorer window open when I launch my app for
example, the Explorer window will still have the focus after my app starts.
Even if no other app is running, my app will not be activated until the user
clicks on the window

Thanks
Nov 20 '05 #1
4 6690
"Benoit Martin" <bm*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How can I make sure that my Windows application will have the focus at
startup?
Currently, if there is an Explorer window open when I launch my app for
example, the Explorer window will still have the focus after my app starts.

Why do you say that?
Even if no other app is running, my app will not be activated until the user clicks on the window
Why do you say that?

Thanks

Nov 20 '05 #2
Cor
Benoit,
When a vb.net application start it has normaly the focus.
So you have to give more information to get a proper answer I think.
when you just do me.show or me.refresh, the focus is there (it is harder to
get it not there i think)
Cor
Nov 20 '05 #3
Sorry if my post was confusing... I was saying that to explain the
current behavior of my app. This is what I'm trying to fix

I understand that I need to provide more info as what I'm trying to
achieve should be normal behavior but I'm not too sure what else I can
add.

I start my application like this:
Application.Run(myMDIForm)

That's about all I did... There is nothing else fancy
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #4
Hi Benoir,

We can't work without information. Guessing is not always/often a
winning game.

Here's what you can do to help us help you:

Make a copy of your project in another folder. Make a zip of the
entire project. Put that somewhere safe. (This is a just-in-case
move.)

Now go into the copy of the project.

Remove as much as you can while still making sure that the strange
behaviour happens. So, if you have 6 forms, delete (not exclude) them
from the project one by one, making sure that you can still compile
and still run until the problems shows.

When you've done that remove as much code from the forms, modules
and classes that are left. Again making sure that you can still
compile and still run until the problems shows.

At this point you should have as much of a shell of the
application as possible.

Create a zip out of everything in the project folder. Do not
include the bin and Debug folders. You should end up with a smallish
zip file.

Post this to us.

We'll take it from there.

=================================

If this seems like too much work, then at least let us have the
source of your startup form.

Regards,
Fergus
Nov 20 '05 #5

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

Similar topics

4
by: Paul Thompson | last post by:
How do I determine in JavaScript the name of the object that focus is on?
6
by: billr | last post by:
I have developed a small API for taking care of a lot of boiler plate stuff in a multi formed windows application, for example setting up a messaging thread framework. New Forms, in the...
10
by: Raja S. | last post by:
How does one set the initial focus to a control such as a picture box? Suppose I have a form with a single picture box on it. When the application starts to run I would like to set the focus to...
0
by: Stephen Muecke | last post by:
The startup form of my application is used to open other forms containing detail information on projects, organisations, employees etc (similar to Outlook) Each detail form has a print method...
10
by: James Pyrich | last post by:
Greetings: I am using .NET to pop up a graphical window for a legacy application (remember the IBM System/23?). In order to achieve good performance, I created a GUI Broker Server and a Client...
6
by: TM | last post by:
For some reason I have a problem with the application focus deal in windows explorer getting reset. I used TweakUI to set the "Prevent applications from stealing focus" to on so that it flashes...
2
by: Khadim | last post by:
Hi, I am having this problem with my application that it is not getting itself in taskbar by itself.. i m working on this application for 5 months, don't know what happened at what time that its...
3
by: Jeremy | last post by:
I have a wpf window that contains a couple of text boxes. I want a certain one of these to have focus at startup. IsFocused is read-only; I've set the tabstop to 0; at startup, the focus is...
3
by: Christian Blackburn | last post by:
Hi Gang, I have two text boxes on a form and if the first text box is populated, I want to place focus on the second text box at startup. However, this never seems to work. What am I doing...
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: 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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.