• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

First form is not shown in foreground

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
moellert
Asked:
moellert
  • 5
  • 4
1 Solution
 
broadbentCommented:
try
Form.BringtoFront()
Form.TopMost = True
0
 
moellertAuthor Commented:
where should I put this in? The form not appearing in the foreground is my startform and so automatically started.
0
 
broadbentCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
moellertAuthor Commented:
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
 
broadbentCommented:
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
 
moellertAuthor Commented:
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
 
broadbentCommented:
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
 
moellertAuthor Commented:
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
 
broadbentCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now