Jump to content

A loginForm problem


55143681

Recommended Posts

I have a project developed with c++builder and uniGUI 1472,and updated sometimes with unigui,when updated to 1480,it compile ok.

But ,when I create a new project have a login form  with 1480,it compile normal,but when I click the button to login,it throw a memory error,

I find that It maybe because the "return",if I replace the "return" with  ModalResult=mrCancel;   it works well.

The lower uniGUI don'g have the problem,and the old project in the 1480 don't have the problem,but with 1480,when I create a new project with loginform,the problem comes out.

 

void __fastcall TUniFormLogin::UniButton1Click(TObject *Sender)
{
//登录
UniMainModule()->loginUserNo=UniEdit1->Text;
loginPass=UniEdit2->Text;
//
UniQuery1->Close();
UniQuery1->SQL->Clear();
UniQuery1->SQL->Add("select * from user_list_info where user_no=:p1");

UniQuery1->ParamByName("p1")->Value=UniMainModule()->loginUserNo;

UniQuery1->Open();
if(UniQuery1->RecordCount<1)
    {
    ShowMessage("登录失败:该用户不存在!");
    UniEdit1->SetFocus();
    return;
    }

//
ModalResult=mrOk;
this->Close();


}
//---------------------------------------------------------------------------
 

Link to comment
Share on other sites

Fuck!!!!why???? Mind your language.(Moderator)

c++10.2.3   && uniGUI1480.

Just a simple loginForm.and just show the input "UniEdit1->text"

But I have an Error,and showMessage show nothing?

With before version,my project works well.And my before project comiled with 1480 works well.

But when I create a new project have only the loginForm ,It doesn't work.

2018-09-18_202915.png.ab0684d4718fd933977673e415b73430.png

 

2018-09-18_203336.png.eca9f65c50fe8ea1b19b912bb06b7cd2.png

 

2018-09-18_203418.png.982bea4bcd1257a9d46530ad145ebc6c.png

 

2018-09-18_202925.png.1c2033cd3ba274524626f18773f22486.png2018-09-18_202936.png.e7f0f4d042fc580442a04d7816f7fa1c.png

2018-09-18_203444.png

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...