Form focus
Form focus
Form focus
Form focus
Form focus
Form focus Form focus Form focus Form focus Form focus Form focus Form focus
Form focus Form focus
Form focus
Windows Forms Topics include: windows forms, controls, components and designers

Enjoy an ad free experience by logging in. Not a member yet? Register.
Go Back  Xtreme .NET Talk > > > Form focus


Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2018, 07:23 PM
Amerigo Amerigo is offline
Newcomer
 
Join Date: Jul 2012
Posts: 11
Amerigo is on a distinguished road
Question Form focus



In my startup form, I have the following code in the MyBase.Load sub.
When it loads, the form isn't in the forefront even after adding MyForm.Focus and MyForm.BringToFront.
Code:
        If IO.File.Exists("Key.exe") And My.Settings.KeyRequired = True And My.Settings.AutoLaunchChk = True Then
            Dim PI As New ProcessStartInfo
            PI.FileName = "Key.exe"
            PI.WindowStyle = ProcessWindowStyle.Hidden
            PI.CreateNoWindow = True
            Process.Start(PI)
        End If
Does anyone have an idea as to how to fix this? I know the above part is responsible because if I comment it out, the form loads normally.
Reply With Quote
Reply

Bookmarks

Tags
form, true, loads, pi.createnowindow, process.startpi, processwindowstyle.hidden, pi.windowstyle, fix, responsible, comment, key.exe, idea, forefront, mybase.load, code, focus, startup, dim, processstartinfo, my.settings.autolaunchchk, my.settings.keyrequired, adding, myform.focus, myform.bringtofront, io.file.existskey.exe

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Top Form has focus.... HOW? vbMarkO Windows Forms 3 08-27-2006 03:22 PM
Form Focus gorilla Windows Forms 3 06-12-2003 02:18 PM
show another form without loosing focus on current form prob... UCM Windows Forms 2 03-05-2003 04:03 PM
Child Form Focus afrinspray Windows Forms 27 07-30-2002 01:12 PM

Advertisement:







Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Form focus
Form focus
Form focus Form focus
Form focus
Form focus
Form focus Form focus Form focus Form focus Form focus Form focus Form focus
Form focus
Form focus
 
Form focus
Form focus