📄 00000019.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: Zeemon (踏遍青山), 信区: Visual <BR>标 题: Spread Hot Tips <BR>发信站: BBS 水木清华站 (Wed Jun 17 13:08:50 1998) <BR> <BR><A HREF="http://www.fpoint.com/hottips.htm">http://www.fpoint.com/hottips.htm</A> <BR> <BR>Making Spread Faster <BR>For faster Spread sheet updates wrap your code with <BR>vaSpread.Redraw=False <BR>.... <BR>add/remove data from spread <BR>... <BR>vaSpread.Redraw=True <BR> <BR>Use the With command in VB4.0 to make accessing the spread faster: <BR>With vaSpread <BR>Redraw=False <BR>.... <BR>SomeProperty= Value <BR>SomeMethod MethodParams <BR>Redraw=True <BR>End With <BR>Thanks to: William Jordan <BR> <BR>Using the Farpoint Spread like a Listbox. <BR>Added feature is you can have a column for each property associated with the instance. This <BR>allows you to display anything in the show column and keep the data hidden in other columns. <BR> <BR>For Example: <BR>You want a listbox showing full name. <BR>You would create 4 columns <BR>Col1 = Full_Name (First_Name & " " & Middle_Name & " " & Last_Name) <BR>Col2 = First_Name <BR>Col3 = Middle_Name <BR>Col4 = Last_Name <BR> <BR>Show Only Col1 <BR>You can still use the other columns in code without having to decipher the Full_Name String <BR>Set the Spread Properties as follows <BR>vaSpread1.ScrollBars = SS_SCROLLBAR_V_ONLY <BR>vaSpread1.GridShowVert = False <BR>vaSpread1.GridShowHoriz = False <BR>vaSpread1.DisplayColHeaders = False <BR>vaSpread1.DisplayRowHeaders = False <BR>vaSpread1.OperationMode = SS_OP_MODE_SINGLE_SELECT <BR>vaSpread1.UserResizeCol = SS_USER_RESIZE_OFF <BR>vaSpread1.UserResizeRow = SS_USER_RESIZE_OFF <BR>vaSpread1.CursorStyle = SS_CURSOR_STYLE_ARROW <BR>vaSpread1.MaxCols = 4 'Columns is Dependent on number variables <BR>vaSpread1.MaxRows = 20 <BR>Thanks to: Randy Sherman <BR> <BR>Q:Can I change the state of a check box in a select range or entire col range? <BR>A: Yes, you need to set the Col, Col2, Row, and Row2 properties then set the BlockMode to true to <BR>select the range of cells. Then set the Value property to force the checkbox to be checked or <BR>unchecked. <BR>Thanks to Julio Varga <BR> <BR>Q: How can I tell that the user is scrolling the spreadsheet with Spread/VBX? <BR>A: A TopLeftChange event will fire. <BR> <BR>Q: In Spread/VBX, how do I change the state of a checkbox cell programatically? <BR>A: Set the Value property for that cell to 1 for checked, 0 for unchecked. <BR> <BR>Q: How can I get back a row or col that I hid in Interface Designer without having to affect <BR>other cells? <BR>A: In the designer, choose Cell, then Goto. Set the col or row boxes to put you on a cell in the <BR>hidden area. The active cell box should vanish, as it has been moved into the hidden area. Then <BR>choose Headers, Col/Row, Show! This will redisplay the row or column. <BR> <BR>Q: I need to validate the users input before letting them change tabs in Tab/VBX or /PRO. How <BR>can I do this? <BR>A: The TabActivate event fires whenever a user clicks on a new tab, before the actual change to <BR>the new tab occurs. In this event you can do your validation checks. If you need to prevent the <BR>change, set TabToActivate to -1, which will return them to the current tab. <BR> <BR>Q: I am using Tab/Pro with Visual Basic. I have several controls on one of the tabs whose <BR>Enabled property I am setting at runtime. However, when I change to another tab and then switch <BR>back, the controls have reverted to their design-time state. <BR>A: When Tab/Pro hides a child control, it sets that controls Enabled property to false to remove <BR>it from the tab order. If you need to change this property at runtime, use TabSetChildEnabled <BR>instead. This will set the Enabled state for the control, and update internal tables that Tab <BR>needs to re-set the control later. You can find the parameters for TabSetChildEnabled in the <BR>help file. <BR> <BR>Comments? Something you want to see here? Email us! <BR> <BR> <BR> <BR> <BR> <BR>-- <BR> 最后青蛙问道:"为什么?我告诉过你我是一位美丽的公主, 会与你 <BR>共度一个星期并让你为所欲为. 你为什么还不愿吻我?" <BR> 男孩说道:"我是一个程序员. 我没时间交GF, 但拥有一只会说话的 <BR>青蛙简直太酷了." <BR> <BR> <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 159.226.41.99] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -