Solved

First form is not shown in foreground

Posted on 2006-06-29
9
239 Views
Last Modified: 2010-04-23
I am using VB Express 2005. After starting my app the splashscreen is shown. Then the first form is shown. This form is not in the foreground. It is shown in the taskbar and starts flashing there.
How do i get it in the foreground? As this form calls some other form during runtime I do not want the form in the foreground all the time of course.
0
Comment
Question by:moellert
  • 5
  • 4
9 Comments
 
LVL 4

Accepted Solution

by:
broadbent earned 50 total points
Comment Utility
try
Form.BringtoFront()
Form.TopMost = True
0
 
LVL 2

Author Comment

by:moellert
Comment Utility
where should I put this in? The form not appearing in the foreground is my startform and so automatically started.
0
 
LVL 4

Expert Comment

by:broadbent
Comment Utility
You could put it in the Form_Load event.
You don't need both statements - experiment.

However I'm not sure whether you are seeing the form at all. If not,  you will need to show the code you think is showing it.
0
 
LVL 2

Author Comment

by:moellert
Comment Utility
this is not working. There is no way to enter the suggested change in somewhere. As this is the starting form I cannot put it in some code of another form.

Any other ideas?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Expert Comment

by:broadbent
Comment Utility
You had better post some code.
How does your app start - in Sub Main() ? Send the code that does that.
Does it load in Splash form ? Ditto
etc.
0
 
LVL 2

Author Comment

by:moellert
Comment Utility
This is not that easy. I am using VB Express 2005 and I have defined in the Properties sheet of my app that it should show a splash screen and which form it should take to start with.
So please guide me what code you want me to post? Is it possible to show the code that's "behind" the properties sheet?
0
 
LVL 4

Expert Comment

by:broadbent
Comment Utility
I don't know much about shpwing a splash screen in the properties part of your form. So I guess that the code will be in the VS generated code during the intitialisation and will therefore appear on top of your form.

I am surprised that the form load event does not execute. Put a break in it to check. The Me.TopMost should work.

I used form before because I didn't know how it was loading. I assume you don't have a Sub Main()

I'm off on hols for 2 weeks so someone else will need to take this up.
0
 
LVL 2

Author Comment

by:moellert
Comment Utility
I would love to enter Me.TopMost but I do not know where. As stated above the first form is directly controled by the Properties sheet. So the first form is not opened by any other form. That's why I call it "first form"
0
 
LVL 4

Expert Comment

by:broadbent
Comment Utility
In your main form, whatever that is, go to left top pull down and look for Form Events. on right side look for Load.
It will create a Private Sub Form_Load() Handles MyBase.Load or sim.
In here.

Defintely Arrivederci
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now