77范文网 - 专业文章范例文档资料分享平台

codejock英文教程(8)

来源:网络收集 时间:2019-02-17 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

'The Mouse_Mouve event will be used to prepare records to be dropped into the report.

Private Sub lstItems_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

'If the left mouse button is pressed while in the List Control If (Button And vbLeftButton) Then

Dim Records As ReportRecords

'CreateRecords is primarily used to create an empty ReportRecords collection in Drag and Drop

'operations. The new ReportRecords collection is used to create a collection of ReportRecord

'objects to be dropped into the Report Control or to retrieve records that have been dragged

'out of the Report Control. '

'Below, a records collection is created that will contain a record for each item that

'is currently selected in the list control Set Records = wndReport.CreateRecords

Dim i As Long

'Loop through all items in the List Control For i = 0 To lstItems.ListCount - 1

'If the list item is selected, then add it to then create a record for it

'in the records colleciton If lstItems.Selected(i) Then

Dim Record As ReportRecord

'Add a new record to the records collection Set Record = Records.Add

Record.AddItem lstItems.List(i)

Debug.Print \ End If

Next

'The DragRecords method is used to prepare records to be dropped

into the Report Control.

'DragRecords accepts a ReportRecords collection created by CreateRecords. Any records that 'have been prepared using DragRecords will be added to the Report when the items are dropped

'into the Report Control. Typically DragRecords would be used in the MouseMove event of the

'control from which items are being dragged. The Report Control will automatically add the

'new records to the report once they have been dropped. '

'Below, the Records collection is filled with a record that corresponds to each item that is

'currently selected in the List Control. If the items are dropped into the Report Control, then 'all records contained in the Records collection will be added to the report. ' 'Now Data.GetFormat(cfRecords) will return True as some Records have been added to the clipboard

wndReport.DragRecords Records

End If End Sub

'The OLEDragDrop event will be used to add items to the List Control that have been dragged from the Report Control

Private Sub lstItems_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)

'If the format of the data on the clipboard is of type \ If Data.GetFormat(cfRecords) Then

'Create a ByteArray Dim byteData() As Byte

'Retrieve the Records collection from the clipboard, the data is stored as a ByteArray

byteData = Data.GetData(cfRecords)

Dim Records As ReportRecords

'The CreateRecordsFromDropArray method is used when retrieving

records that have been dragged

'from the Report Control. CreateRecordsFromDropArray accepts the ByteArray returned from the

'Data.GetData parameter from any control's OLEDragDrop event and populates a ReportRecords

'collection created by CreateRecords with the records stored on the clipboard.

'

'Below, the Records collection is populated by the records that were copied to the clipboard

Set Records = wndReport.CreateRecordsFromDropArray(byteData)

'If there were some records on the clipboard If (Not Records Is Nothing) Then

'Unselect all items in the list control ClearListSelection

Dim i As Long

'Add a list item for each record that was on the clipboard For i = 0 To Records.Count - 1

lstItems.AddItem Records(i).Item(0).Value

lstItems.Selected(lstItems.ListCount - 1) = True Next

End If

'If the ctrl key was pressed when the items were dropped, then the drag operation was a Copy

'Else, a Move operation is performed If ((Shift And 2) = 0) Then Effect = vbDropEffectMove Else

Effect = vbDropEffectCopy End If

End If End Sub

'The OLEDragOver event is used to detect when items are dragged over the list control Private Sub lstItems_OLEDragOver(Data As DataObject, Effect As Long,

Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer) Effect = 0

'If the format of the data on the clipboard is of type \ If Data.GetFormat(cfRecords) Then

'If the ctrl key is pressed when items are dragged over the list control, then the drag operation is Copy 'Else, a Move operation is performed If ((Shift And 2) = 0) Then Effect = vbDropEffectMove Else

Effect = vbDropEffectCopy End If End If End Sub

'The BeginDrag event occurs when records are being dragged from\\within the Report Control, and provides a

'ReportRecords collection containing all of the selected records when the drag operation started.

Private Sub wndReport_BeginDrag(ByVal Records As XtremeReportControl.IReportRecords)

Debug.Print \End Sub

'The DropRecords event occurs when records are dropped into a Report Control, and provides a

'ReportRecords collection containing all of the records that will be dropped into the Report Control.

'This gives the opportunity to modify the ReportRecords collection before they are actually added

'to the Report Control.

Private Sub wndReport_DropRecords(ByVal Records As XtremeReportControl.IReportRecords)

Debug.Print \ End Sub

Making a Group Special Author: Mike Palmatier

Posted: May 3, 2008

Environment:Visual Basic 6.0

You can designate a task panel group as \ Groups marked as special will be displayed differently than normal groups drawing the users attention to that particular group. This is an excellent way to show the user the \ \

Normal group

To set a group as special all you need to do is set the Special property to True. Dim Group As TaskPanelGroup

Set Group = wndTaskPanel.Groups.Add(0, \Group.Special = True

Applying the Office 2007 Skin Author: Mike Palmatier Posted: May 3, 2008

Last Updated: December 10, 2007

Environment:Visual Basic 6.0

First a skin must be loaded before it can be applied to your application. The LoadSkin method loads a skin from a .cjstyles or .msstyles file.

The Office 2007 skin is located in the Office2007.cjstyles skin file and is loaded using the NormalOffice2007.ini file name.

'Loads the NormalBlue.ini skin

SkinFramework.LoadSkin App.Path + _

\To actually apply the skin, the ApplyWindow method must be called. ApplyWindow only needs to be called one time in the Load event of the window a skin will be applied.

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库codejock英文教程(8)在线全文阅读。

codejock英文教程(8).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/478878.html(转载请注明文章来源)
上一篇:-信息提示
下一篇:教书育人 关爱学生
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: