Alright. I tried everything and still not working. It keeps crashing. Here is a code snippet. What am I missing?
string userid = "123456789123"; // max length of 12
string password = "123456789123"; // max length of 12
FONT login_font = "Verdana", 2, 18;
TEXT userid_txt
{
Pos_x = 480;
Pos_y = 363;
layer = 6;
red = 0;
green = 0;
blue = 0;
font = login_font;
String = userid;
}
TEXT password_txt
{
Pos_x = 480;
Pos_y = 388;
layer = 6;
red = 0;
green = 0;
blue = 0;
font = login_font;
String = password;
}
function enterUserName()
{
if(inkey_active == 1)
{
inkey_active = 0;
}
userid_txt.visible = ON;
Inkey(userid);
}
function enterPassword()
{
if(inkey_active == 1)
{
inkey_active = 0;
}
password_txt.visible = ON;
Inkey(password);
}
Panel start_pan
{
bmap = "Login.bmp";
button(475, 363, "Textbox.bmp", "Textbox.bmp", "Textbox.bmp", enterUserName, NULL, NULL);
button(475, 388, "Textbox.bmp", "Textbox.bmp", "Textbox.bmp", enterPassword, NULL, NULL);
layer = 5;
flags = VISIBLE, OVERLAY;
}
The goal is to have two textboxes (buttons) and when you click on one, it will start the input. When the user clicks on the other one, the input will be for that string. Got it?
Please try it and let me know what i'm doing wrong. The thing that's happening is for me is that after I click on the first textbox and enter a string and then click on the second one, I see two blinking bars, one for each textbox. However, when I type, it's still going to the first string. And as soon as I click ESC or TAB, the program just freezes and I have to reboot my pc.
Thanks in advance,
Doriel