?
Solved

First form is not shown in foreground

Posted on 2006-06-29
9
Medium Priority
?
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 4

Accepted Solution

by:
broadbent earned 200 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 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