Hi!
How can I make the username be pre-selected with the username "Administrator"?
Login username selected
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Login username selected
You can bring up a dialog box that allows only a particular user to login. There is no drop down list of other users. You need to create a button on the screen and then go to the screen's script interface. Then add code to the Button click event. It will look like this when you are done:
Code: Select all
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
public partial class Screen1
{
void Button1_Click(System.Object sender, System.EventArgs e)
{
//Opens a login with the 'Administrator' as the username
Globals.Security.Login("Administrator");
}
}
}
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Login username selected
Thanks! Worked like a charm!
But how do I choose where the login screen pops up? I would like it to be centered on the screen, and not in the top left corner.
//Edited
But how do I choose where the login screen pops up? I would like it to be centered on the screen, and not in the top left corner.
//Edited
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Login username selected
Hi Kjetilh90,
There must be a bug if the screen keyboard doesn't come up. The harder way is detailed in the attached project called CustomRecipeDialog.zip. You can take a look at that. In the project you can modify where the window shows up as well.
You need to follow the following procedure before opening the application:
1. Create a panel application, import the System.Windows.Forms.TextBox
object 2. Close the application
3. Open the CustomRecipeDialog application and build/run.
There must be a bug if the screen keyboard doesn't come up. The harder way is detailed in the attached project called CustomRecipeDialog.zip. You can take a look at that. In the project you can modify where the window shows up as well.
You need to follow the following procedure before opening the application:
1. Create a panel application, import the System.Windows.Forms.TextBox
object 2. Close the application
3. Open the CustomRecipeDialog application and build/run.
- Attachments
-
- CustomRecipeDialog.zip
- (37.28 KiB) Downloaded 721 times
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer