Solved

First form is not shown in foreground

Posted on 2006-06-29
9
240 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

23 Experts available now in Live!

Get 1:1 Help Now