473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

creating logon box in c# .NET

I am creating a windows application. Before entering the main form I
want to have a logon box. I create this box from the constructor of the
main form, but when the logon box opens it is not in focus. How can I
force a form to be in focus?

Dec 4 '06 #1
1 3621
Hi,

If you use ShowDialog to show the form, then it will be displayed in front
of the parent form. As an alternativ to create the logon box from the
main form, you could display it in the Main method before launching the
main form. That way the main form will never even be displayed if the
logon failed.
On Mon, 04 Dec 2006 07:08:31 +0100, eddy k <ed*********@gmail.comwrote:
I am creating a windows application. Before entering the main form I
want to have a logon box. I create this box from the constructor of the
main form, but when the logon box opens it is not in focus. How can I
force a form to be in focus?


--
Happy Coding!
Morten Wennevik [C# MVP]
Dec 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jiho Han | last post by:
This seems like a often-asked topic. I created a windows service and installed it on my workstation. The application basically goes out and "receieves" messages from a queue on a remote server....
1
by: Manfred | last post by:
I want to access via CDO outlook. Therfore i have to logon. In VB.NEt I make it like: Dim objSession As MAPI.Session If objSession Is Nothing Then objSession = CreateObject("MAPI.Session")...
3
by: W Akthar | last post by:
Hi I am trying to create a windows service which queries SQL Server on timed intervals and depending on the results send appointments to Outlook. The problem lies when I try to create an...
2
by: John | last post by:
Hi I am trying to find the way to create an email in outlook. I am using the code given at the end. It works fine the first time but calling the code second time gives the following error; ...
0
by: Jason James | last post by:
Hi all, does anyone have any suggestions as to the steps involved in creating a DL using VB.Net. I have some Outlook automation experience but I'm not sure what the objects are that I should...
3
by: Wayne J | last post by:
As part of the sys-admin tasks I undertake, it includes the profiling of user accounts. Most of this has been done through scripting, but there is still the hands on part of mapping drives etc...
6
by: Mr Flibble | last post by:
I have a class that has a LogOn method. I'm trying to think what the advantages are two approaches I have. a) Having a bool returned containing the success of the LogOn. b) Raising an...
0
by: robpimentel | last post by:
Hi, I've been using DB2 for about 1 week, so please bear with me. DB2 Connect Enterprise Edition v8.1 FixPack 5 Windows Server 2003 Standard Edition SP1 Here is an error that continues to...
5
by: tech.rawsteak | last post by:
I have a function that retrieves a user's login name from their workstation and looks it up on an employee table to return their full name (ie: jsmith -John Smith). Their full name is then...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.