佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

楼主: maybird_2

Visual FoxPro 的疑难杂症

[复制链接]
小李波特 该用户已被删除
发表于 14-5-2004 05:26 PM | 显示全部楼层
白日梦 于 14-5-2004 16:12  说 :

要解决那个方法很简单,
1. 自己造 Encrypt( cField ) 和 Decrypt( cField ) 的 function,
2. 用 Set Procedure To Encryption.Prg
3. Use *.dbf 开启资料档
4. cBasic = Decrypt(Employee.BasicSalary)
5. 存档时, Replace BasicSalary With Encrypt(cBasic)



4. cBasic = Decrypt(Employee.BasicSalary)
   4.1 正在使用资料。。
   4.2 电脑当机。。
   4.3 从新开机。。
   4.4 从开程式。。
   4.5 Use *.dbf 开启资料档。
   4.6 cBasic = Decrypt(Employee.BasicSalary)  <----- 被重复 decrypt !!!
   ...
   ...
   ...


明白我的问题吗???
回复

使用道具 举报


ADVERTISEMENT

发表于 14-5-2004 08:50 PM | 显示全部楼层
我来帮你debug ,献丑了 ......

1.Close All
2.Use Employee
3.cBasic = Decrypt(Employee.BasicSalary)  && 此时cBasic = 123 
4.正在使用资料。。
5.最后存档, Replace BasicSalary With Encrypt(cBasic) && replace 后 BasicSalary = ^&%&!#@!

如果电脑在 Step 4. 当机 ,从新开机......又从 Step 1 开始.......cBasic 仍然=123
因为资料还未存档 ..........

我建议你用free Table 试试..............
回复

使用道具 举报

发表于 15-5-2004 10:54 AM | 显示全部楼层
我也常用 Free table ,尤其是做 Multi Company 的程式。

我和 enry98 已解决过 小李波特 类似的问题。

电脑当机问题? 硬件问题。 好像与编程无关吧!

要防止重复 Decrypt 也很简单。
在 Encrypt 了的字串开端加多一个字元 Chr(255) 用来 indicate 已经 Encrypt 了的字串。
Decrypt 时,查下字串开端有无 Chr(255),有才执行,没就放弃。
回复

使用道具 举报

小李波特 该用户已被删除
发表于 17-5-2004 06:00 PM | 显示全部楼层
多谢两位朋友 仗义相助, 小弟 感激不尽 。。
谢啦。。。
回复

使用道具 举报

发表于 26-5-2004 03:52 PM | 显示全部楼层
为什么我按下右上角 X 不能 QUIT? 应该在哪里打 COMMAND 及什么 COMMAND?
回复

使用道具 举报

发表于 27-5-2004 11:33 AM | 显示全部楼层
在你Set Main了的Code->Program加进这两行指令。
On Key Label Alt+F4 Quit
On Shutdown Quit

还有在你的 Others->Menu 的 menu option 里的 Exit 加入 Clear Events。
因为当 Read Events 执行中时按 VFP 的 Close Windows 红色X键 很难离开程序。
回复

使用道具 举报

Follow Us
发表于 27-5-2004 02:35 PM | 显示全部楼层
谢谢白日梦!
再请问要如何才能使 Screen Auto Run In Maximize?
我用 _screen.width = SYSMETRIC (21)
     _screen.Height = SYSMETRIC (22)
它只是 shown Full Screen 而已!
而不是 Maximize!
回复

使用道具 举报

发表于 27-5-2004 03:38 PM | 显示全部楼层
_Screen.WindowState = 2
回复

使用道具 举报


ADVERTISEMENT

发表于 9-6-2004 09:22 AM | 显示全部楼层
在一个 FORM 里有两个 COMBO BOX,要如何做才能使 COMBO BOX 里的 Data 会 show in Ascending。
回复

使用道具 举报

发表于 9-6-2004 12:00 PM | 显示全部楼层
答过了。你的 combo 的 RowSource 里的 field,需用到 index 档案来控制。
回复

使用道具 举报

小李波特 该用户已被删除
发表于 9-6-2004 12:07 PM | 显示全部楼层
如果没有 index, 用 sql command 来设定 order 也是可以。。
回复

使用道具 举报

发表于 10-6-2004 10:11 PM | 显示全部楼层
请问要如何 EXPORT DATA TO EXCEL 和 IMPORT DATA FROM EXCEL?
回复

使用道具 举报

发表于 11-6-2004 11:05 AM | 显示全部楼层
就是用 Export 和 Import 这两个指令。

它是 Syntax 用法用 Help 开来 reference

你是否没设定好 online document ?
先安装好 MSDN library,去 Tools -> Options -> File Locations -> Help file -> c:\program files\microsoft visual foxpro 7\foxhelp.chm -> Tick [V] Enable Help
回复

使用道具 举报

发表于 12-6-2004 10:27 AM | 显示全部楼层
在一个 FORM 里有 customer, address, tel no。
要如何在另一个 FORM 里 select 了 customer 后, 他的 address 和 tel no 会自动显示出来?
customer 是 combo box, address 和 tel no. 是 text box。
回复

使用道具 举报

发表于 14-6-2004 11:33 AM | 显示全部楼层
请问有没有人懂怎样在 data grid 里面加 combo box。
回复

使用道具 举报

dark_heaven 该用户已被删除
发表于 14-6-2004 12:06 PM | 显示全部楼层
i assumed that you installed VFP6 in default and have MSDN installed together

under VFP environment, run the command below :

MODIFY PROJECT "c:\program files\microsoft visual studio\msdn\2000jan\1033\samples\vfp98\solution\solution.pjx"

this is where i refer for some basic usage of controls from VFP

You can add Combo button to a column in the Form Designer by selecting a column and adding a control, or programmatically with the AddObject method.

the AddObject is nice things for you to placed any ActiveX ctrl to your container ctrl, like form, grid.

please refer from the MSDN samples always, if you no yet install it, install it now !
回复

使用道具 举报


ADVERTISEMENT

小李波特 该用户已被删除
发表于 14-6-2004 06:54 PM | 显示全部楼层
tstan135 于 14-6-2004 11:33  说 :
请问有没有人懂怎样在 data grid 里面加 combo box。


focus on the grid cell first.
add the combo box in the grid cell.
after that, delete the text box from the grid cell.

success..
回复

使用道具 举报

发表于 15-6-2004 09:13 AM | 显示全部楼层
tstan135 于 12-6-2004 10:27 AM  说 :
在一个 FORM 里有 customer, address, tel no。
要如何在另一个 FORM 里 select 了 customer 后, 他的 address 和 tel no 会自动显示出来?
customer 是 combo box, address 和 tel no. 是 text box。


Let's say,
Customer combobox is cboCustomer, this field must index
Address textbox  is txtAddress
TelNo textbox is txtTelNo

加入以下的码于 cboCustomer.Valid
seek This.Value in Customer
Thisform.txtAddress.Value = Customer.Address
Thisform.txtTelNo.Value = Customer.TelNo
Thisform.Refresh

防止进入的textbox,改掉这些的 Properties->Others
txtAddress.Enable = .F.
txtTelNo.Enable = .F.
回复

使用道具 举报

发表于 15-6-2004 02:54 PM | 显示全部楼层
小李波特 于 14-6-2004 06:54 PM  说 :


focus on the grid cell first.
add the combo box in the grid cell.
after that, delete the text box from the grid cell.

success..

How to focus?
回复

使用道具 举报

dark_heaven 该用户已被删除
发表于 15-6-2004 08:58 PM | 显示全部楼层
1:  draw a combo box anywhere at the form

2:  "Cut" the combo into clipboard

3:  click on the grid in Form Designer Window

4:  right click and choose 'edit' from the popup menu

5:  click on a column (Not column Header) which you wanna put your combo box to

6:  "Paste" (Ctrl + V) into it

7:  when you done to here, you can now delete the textbox.

8:  in Form Designer Window, focus on the grid column again follow step 4 and 5

9:  and now, watch the Properties Window has current control as the column you specified

10:  click the top combo of the Properties Window, you can see it contain header, textbox and combo which u just add, click on textbox.

11:  switch focus on Form Designer Window, and press "Del" key, thus, the textbox of that column delete.


my english worse, this is my best try liao, hope can help you
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 29-3-2024 07:21 AM , Processed in 0.076417 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表