菜鸟问题。在线等

Dog2Cat 2004-10-15 03:20:40
1:怎么规定从EDIT中输入的是数字
2:怎么设计一个带登陆的程序
3:使用ADO时,运行程序前会出现一个数据库的登陆框,怎么去掉它
4:怎么生成可执行文件;
5:谢谢
...全文
88 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dog2Cat 2004-10-17
  • 打赏
  • 举报
回复
一天没来就看到这么多热心人的帮助。谢谢。

OK
结贴
missj 2004-10-15
  • 打赏
  • 举报
回复
123
longtusoft 2004-10-15
  • 打赏
  • 举报
回复
MASKEDIT
zsp0010 2004-10-15
  • 打赏
  • 举报
回复
菜鸟的问题可能菜鸟理解的更清楚:
1,一楼的解释看上去很专业
2,看书,几乎所有的软件都有登陆的例子
3,连接数据库最后一步输入用户名和密码后,选中保存密码就可以了
4,编译通过后,选择Project->Build All Projects 就可以将程序打包生成.exe 文件了。
WantKindHeart 2004-10-15
  • 打赏
  • 举报
回复
看样子,我只有看别人拿分了,我来晚了,都被他们答完了。
liuqifeiyu 2004-10-15
  • 打赏
  • 举报
回复
如果只输入数字用wzg1031(0223)的就可以
如果想只输入数值用这个(虽然烦琐点,但很好用,可以输入负号,限制小数位数
在EDIT的ONKEYPRESS事件调用,如限制EDIT1,2位小数就:
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
mykeypress(edit1,2,key);
end;);
procedure MyKeyPress(MyKess: TEdit; Len: integer; var Key: char);
begin
if MyKess.SelLength =length(MyKess.Text) then
MyKess.Clear;
if (Key <> '1') and (Key <> '2') and (Key <> '3') and (Key <> '4') and (Key <>
'5') and (Key <> '6') and (Key <> '7') and (Key <> '8') and (Key <> '9') and
(Key <> '0') and (Key <> '.') and (Key <> '-') then
begin
if Key <> #8 then
Key := char(0);
end
else
begin
if Key = '.' then
begin
if pos('.', MyKess.Text) <> 0 then
Key := char(0)
end
else
if Key = '-' then
begin
if trim(MyKess.Text)<>'' then
Key := char(0)
end
else
begin
if (pos('.', MyKess.Text) <> 0) and (Length(copy(MyKess.Text, pos('.',
MyKess.Text) + 1, Length(MyKess.Text))) > Len - 1) then
Key := char(0)
else

if (trim(MyKess.text)='0') or (trim(MyKess.text)='-0') then
Key := char(0);
end;
end;
end;
软件钢琴师 2004-10-15
  • 打赏
  • 举报
回复
1。if not (key in['0'..'9',#8]) then
key := #0;
写在keyup事件里
3。AdoConnection.LoginPrompt := False;写再formcreate下
4。可以点击绿色小三角
alinsoft 2004-10-15
  • 打赏
  • 举报
回复
大家都回答完了。
关注一下
聚能量 2004-10-15
  • 打赏
  • 举报
回复
呵呵,买一本书慢慢研究吧。
hewei2003 2004-10-15
  • 打赏
  • 举报
回复
1.参见http://search.csdn.net/Expert/topic/561/561655.xml?temp=.3791773
2.登录就多用一个窗体,上面有登录名,密码什么什么的,然后就判断
3.AdoConnection.LoginPrompt := False;
4.Ctrl+F9
5.不客气
wzg1031 2004-10-15
  • 打赏
  • 举报
回复
1.在EDIT的KEYPRESS事件中写如下代码:
if not (key in['0'..'9',#8]) then
key := #0;
2.做一个登录框呀
3.把LoginPrompt属性设为false即可
4.Ctrl+F9生产可执行文件.
呵呵,可以给分吧

2,496

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧