重拾VB6(23):Fonts, Print, Format, and Selected Text

省级产业研发综合指标数据2004-2024年 01、数据介绍 产业研发综合指标通常用于衡量各省份在科技创新、研发投入、成果转化及产业发展等方面的综合实力。结合现有的权威评估报告与统计整理如下数据。包括研发机构情况,R&D相关投入,新产品开发与销售、发明专利数、技术引进技术改造经费支出等数据。 数据名称:省级产业研发综合指标数据 数据年份:2004-2024年 02、数据指标 统计年度 地区代码 地区名称 研发机构数() R&D人员折合全时当量(人年) R&D经费内部支出(万元) R&D项目数() R&D项目经费(万元) 新产品开发项目数() 新产品开发经费支出(万元) 新产品销售收入(万元) 新产品销售收入-出口(万元) 专利申请数() 发明专利申请数() 有效发明专利数() 技术改造经费支出(万元) 购买境内技术经费支出(万元) 技术引进经费支出(万元) 消化吸收经费支出(万元) 立即下载

来自MSDN-2001-OCT: Visual Tools and Languages/Visual Studio 6.0 Documentation/Visual Basic Documentation/Using Visual Basic/Programmer’s Guide/Part 2: What Can You Do With Visual Basic/Working with Text and Graphics/

1. Working with Fonts

(1) When you select a TrueType font, it is rendered into the selected point size and displayed as a bitmap on the screen.

When printing, the selected TrueType font or fonts are rendered into the appropriate size and then sent to the printer. Therefore, there is no need for separate screen and printer fonts.

(2) One way to avoid font problems is to distribute the necessary fonts with your application.

You can also program your application to check among the fonts available in the operating system for the fonts you use.

Another way to avoid font problems is to use fonts users are most likely to have on their systems.

(3) Creating Your Own Font Types: The Font class is derived from the StdFont base class and is supported by all controls. 

Dim MyFont As New StdFont
With MyFont
   . Bold = True
   . Name = "Arial"
End With
Set Text1 . Font = MyFont

2. Setting Font Characteristics 

(1) Name, Size, Bold, Italic, StrikeThrough, Underline, Weight

(2) The order in which you select font properties is important, because not all fonts support all font variations. Set the Name property first. Then you can set any of the Boolean properties, such as Bold and Italic, to True or False.

(3) Some fonts do not support the sizes smaller than 8 points. When you set the Size property for one of these fonts to a size smaller than 8 points, either the Name property or the Size property will automatically change to a different font or a different size.

(4) If the text is specified by a property (such as Text or Caption), then changing a font property applies to all the text in that control.

If the application shows text with the Print method, then changing a font property affects all uses of Print after the property change.

Because changes in font properties apply to all the text in text boxes and labels, you cannot mix fonts in these controls.

(5) Forms and picture boxes have an additional font property, FontTransparent. When FontTransparent is True, the background shows through any text displayed on the form or picture box.

3. Displaying Text on Forms and Picture Boxes

(1) To display text on a form or picture box, use the Print method, preceded by the name of the form or picture box. To send output text to a printer, use the Print method on the Printer object.

(2) If the form or picture box is too small to display all the text, the text is cut off.

When you print text to a form, the text appears in a layer behind any controls that have been placed on the form.

(3) Use a semicolon (;) or a comma (,) to separate one item from the next. If you use a semicolon, Visual Basic prints one item after another, without intervening spaces. If you use a comma, Visual Basic skips to the next tab column.

(4) By default, each Print method prints the text and moves to the next line. If there are no items, Print simply skips a line.

By placing a semicolon (or comma) at the end of the first statement, however, you cause the output of the next Print statement to appear on the same line

(5) You can control placement of Print output by specifying the drawing coordinates, using either or both of these techniques:

a) Use the Cls (clear) method to erase a form or picture box and reset the drawing coordinates to the origin (0,0).

b) Set drawing coordinates with the CurrentX and CurrentY properties.

(6) To erase text selectively, draw a box with the Line method and fill it with the background color.

By default, forms and picture boxes use a coordinate system where each unit corresponds to a twip (1,440 twips equal an inch, and approximately 567 twips equal a centimeter). You may want to change the ScaleMode property of the form, picture box, or Printer object from twips to points, because text height is measured in points.

(7) Before using the Print method, you can use the TextHeight and TextWidth methods to determine where to position the CurrentX and CurrentY properties. TextHeight returns the height of a line of text, taking into account the object’s font size and style.The TextWidth method returns the width of a string, taking into account the object’s font size and style.

4. Formatting Numbers, Dates, and Times

(1) The Format function converts the numeric value to a text string and gives you control over the string’s appearance.

(2) Visual Basic provides several standard formats to use with the Format function. Instead of designating symbols in the format argument, you specify these formats by name in the format argument of the Format function. Always enclose the format name in double quotation marks ("").

(3) To print formatted dates and times, use the Format function with symbols representing date and time.

5. Working with Selected Text

(1) You can control what text is selected by setting the SelStart and SelLength properties.

(2) If you assign a new string to SelText, that string replaces the selected text, and the insertion point is placed just after the end of the newly inserted text.

6. Transferring Text and Graphics with the Clipboard Object

(1) The Clipboard object has no properties or events, but it has several methods that allow you to transfer data to and from the environment’s Clipboard. The Clipboard methods fall into three categories. The GetText and SetText methods are used to transfer text. The GetData and SetData methods transfer graphics. The GetFormat and Clear methods work with both text and graphic formats.

(2)  

image

Private Sub mnuCopy_Click ()
   Clipboard . Clear
   Clipboard . SetText Text1 . SelText
End Sub

Private Sub mnuCut_Click ()
   Clipboard . Clear
   Clipboard . SetText Text1 . SelText
   Text1 . SelText = ""
End Sub

Private Sub mnuPaste_Click ()
   Text1 . SelText = Clipboard . GetText()
End Sub

(3) You can actually place several pieces of data on the Clipboard at the same time, as long as each piece is in a different format.

(4) You can use the GetFormat method to determine whether the data on the Clipboard is in a particular format.

7. Understanding the Coordinate System

(1) Every graphical operation described in this chapter (including resizing, moving, and drawing) uses the coordinate system of the drawing area or container.

(2)

image

(3) When you move or resize a control, you use the coordinate system of the control’s container. If you draw the object directly on the form, the form is the container. If you draw the control inside a frame or picture box, the frame or the control is the container.

(4) Statements that resize or move a form always express the form’s position and size in twips. When you create code to resize or move a form, you should first check the Height and Width properties of the Screen object to make sure the form will fit on the screen.

(5) The upper-left corner of the screen is always (0, 0). The default coordinate system for any container starts with the (0, 0) coordinate in the upper-left corner of the container.

(6) twip : By default, all Visual Basic movement, sizing, and graphical-drawing statements use a unit of one twip. A twip is 1/20 of a printer’s point (1,440 twips equal one inch, and 567 twips equal one centimeter). These measurements designate the size an object will be when printed. Actual physical distances on the screen vary according to the monitor size.

8. Changing an Object's Coordinate System

(1) You set the coordinate system for a particular object (form or control) using the object’s scale properties and the Scale method.

You can use the coordinate system in one of three different ways: Use the default scale; Select one of several standard scales; Create a custom scale.

(2) Every form and picture box has several scale properties (ScaleLeft, ScaleTop, ScaleWidth, ScaleHeight, and ScaleMode) and one method (Scale) you can use to define the coordinate system.

(3) A pixel is the smallest unit of resolution on the monitor or printer. The number of pixels per inch depends on the resolution of the device.

(4) ScaleWidth and ScaleHeight always refer to the amount of room available inside the object. The distinction between internal and external dimensions (specified by Width and Height) is particularly important with forms, which can have a thick border.

image

或者这样写更方便:Scale (100, 100)-(200, 200)

(5) Use the ScaleX and ScaleY methods to convert from one scale mode to another scale mode.

如何实现高校科技成果转化的高效对接?.docx 科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。 立即下载

相关推荐

TinyML边缘智能振动诊断实战-ESP32完整工程-v1.0.zip

无硬件可完整体验:固件内置信号合成模拟器(严格复现训练物理模型),串口发 S0~S3 切换 4 种机器故障 算子级正确性:用 inspect_model_ops.py 从 tflite 解析出实际算子(EXPAND_DIMS/CONV_2D/RESHAPE/MEAN/FC/SOFTMAX),固件注册逐一对应——规避了 TFLite Micro 最常见的 "Op type not found" 坑 诚实标注:文档中明确区分“合成演示数据 / 工程近似 / 实测值”,并给出接入真实数据的完整流程

基于SpringBoot+Vue校园失物招领系统的设计与实现

校园失物招领系统的设计与实现前端采用了Vue框架,并结合ElementUI来实现界面的设计与布局。后端采用了SpringBoot框架进行开发设计,并结合了Java语言和MySQL数据库来实现。在功能上分为了前端用户模块和管理员模块。前端用户模块主要实现了招领物品信息的发布、查询与管理,失物信息的发布、管理以及自动匹配招领物品,查看校园相关通知公告。管理员模块主要实现了物品分类管理、校园通知管理以及物品招领信息的查询统计等功能。校园失物招领系统的实现优化失物招领的流程,提高了校园失物招领的效率,促进了校园文化的建设,营造了良好的诚信氛围。

ffmpeg-Muti-solve-rtspnogood.zip

多路推流MP4本地切换测试。跨平台arm_win

科技成果转化效率低怎么办?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

产业园区如何搭建统一的科技服务平台?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

复现基于改进秃鹰算法的微电网群经济优化调度研究(Matlab代码实现)

内容概要:本文围绕“基于改进秃鹰算法的微电网群经济优化调度”展开研究,提出了一种改进的秃鹰搜索算法(BES),旨在解决微电网群在复杂运行环境下的多目标、强约束、非线性及高维经济调度问题。通过引入特定优化策略,增强了基础算法的全局搜索能力和收敛效率,克服了传统智能算法易陷入局部最优的缺陷。研究构建了一个包含分布式电源、储能系统与多元负荷的微电网群调度模型,以最小化系统综合运行成本为核心目标,综合考虑功率平衡、设备出力能力、储能运行特性等多重约束条件。通过仿真实验验证了所提算法在调度精度、稳定性和计算效率方面相较于传统方法具有明显优势,并进一步展示了其在降低能源开支、提升可再生能源消纳水平方面的实际应用价值。; 适合人群:具备一定电力系统基础知识或优化算法背景,从事新能源调度、智能优化算法研究与应用等相关领域的研究生、科研人员及工程技术人员。; 使用场景及目标:①应用于微电网群、综合能源系统等场景下的经济调度优化;②为秃鹰算法及其他群体智能算法的改进、复现与性能对比提供参考范例;③服务于科研仿真、算法验证及工程化应用需求。; 阅读建议:建议读者结合文中提供的Matlab代码实现进行实践操作,重点关注算法改进机制与调度模型的构建逻辑,同时可借助网盘资源获取完整资料,以加深对算法性能表现与应用场景的理解。

Obsidian 是一款本地优先的笔记与知识管理工具,基于 Markdown 文件存储,以双链(Bidirectional Links)为核心,帮助你构建个人知识网络

Obsidian 是一款本地优先的笔记与知识管理工具,基于 Markdown 文件存储,以双链(Bidirectional Links)为核心,帮助你构建个人知识网络

政府科技管理部门如何推动区域科技创新资源配置优化?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

高校如何快速搭建技术转化平台并提升科研成果推广效率?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

产业园区如何搭建科技服务平台?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

【多种改进粒子群算法进行比较】基于启发式算法的深度神经网络卸载策略研究边缘计算(Matlab代码实现)

内容概要:本文围绕“多种改进粒子群算法在深度神经网络卸载策略中的比较研究”展开,系统探讨了边缘计算环境下基于启发式优化算法的DNN任务卸载问题。文章首先剖析了传统粒子群算法(PSO)的基本原理及其在收敛性和全局搜索能力方面的局限性,继而深入介绍四种代表性改进算法:自适应权重PSO、混合遗传PSO、模拟退火PSO以及多目标PSO,详述其在提升寻优效率、增强鲁棒性及应对复杂多约束场景下的机制与优势。研究通过构建DNN卸载模型,设计多维度性能评估体系,在延迟、能耗、资源利用率等关键指标上对各类算法进行对比实验分析,进而提出面向不同应用场景的算法选型策略与优化建议。该工作为边缘智能系统中的计算任务调度提供了理论支撑与实践指导。; 适合人群:具备一定人工智能与优化算法基础,从事边缘计算、物联网、智能系统优化等相关领域的研究生、科研人员及工程技术人员。; 使用场景及目标:① 掌握多种改进粒子群算法的核心思想与实现机制;② 理解深度神经网络在边缘-云协同环境下的任务卸载建模方法;③ 学习如何通过仿真实验对比不同启发式算法的性能差异,并根据实际需求选择最优算法方案; 阅读建议:建议结合提供的Matlab代码实现进行动手实践,重点关注算法参数调优、适应度函数设计及实验结果可视化分析过程,以深入理解算法行为与系统性能之间的内在关联。

Rust 系统编程与 WASM 分配器/并发/Actix-web、FFI/WASM/no-std

Rust 系统编程与 WASM 分配器/并发/Actix-web、FFI/WASM/no_std

上一篇: 重拾VB6(22):Mouse Pointer, Keyboard Events, Interrupting Background Processing
下一篇: 重拾VB6(24):Using Graphical Controls
slowgrace
博客等级 码龄18年 4613粉丝 205原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值