Solved

First form is not shown in foreground

Posted on 2006-06-29
9
242 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
ID: 17010790
try
Form.BringtoFront()
Form.TopMost = True
0
 
LVL 2

Author Comment

by:moellert
ID: 17012373
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
ID: 17012466
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 2

Author Comment

by:moellert
ID: 17024498
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
 
LVL 4

Expert Comment

by:broadbent
ID: 17026257
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
ID: 17029511
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
ID: 17029807
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
ID: 17029989
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
ID: 17030209
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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