[Super Simple VB Intro] 2. Knowledge Preparation
Before you start programming, you need to first get familiar with various operations and terms, so that later when you learn programming it will come easily. First, the most important operation is of course… turning the computer on and off~ (just kidding haha). You must master installing and uninstalling software, and being able to write batch programs is also very helpful for everyday use. Here's a list of various operations~~ (Due to time constraints, I'll list the related points first, and I'll gradually fill in the detailed operations later~) l Viewing and editing the registry: Use regedit.exe to modify the system registry. When we write programs we sometimes need to save the program's related configuration to
Before you start programming, you need to first get familiar with various operations and terms, so that later when you learn programming it will come easily.
First, the most important operation is of course… turning the computer on and off~ (just kidding haha). You must master installing and uninstalling software, and being able to write batch programs is also very helpful for everyday use.
Here's a list of various operations~~
(Due to time constraints, I'll list the related points first, and I'll gradually fill in the detailed operations later~)
l Viewing and editing the registry: Use regedit.exe to modify the system registry. When we write programs we sometimes need to save the program's related configuration to the registry; learning to modify the registry can help with debugging programs
l Various file operations: I'm sure everyone already knows this~~ that is, copying, cutting, pasting files, creating folders, and the like
l Use internet search engines to look up information! This is very important. In the process of learning to program you'll often encounter all kinds of problems. When that happens, it's best to first search online yourself, and only ask others if you really can't solve it, because at the start we're still newbies, and the problems we encounter all look pretty dumb to the experts. So look it up yourself first, don't be a help vampire, lest you become a laughingstock~
l Familiarize yourself with registering and unregistering various ActiveX controls: Use regsvr32.exe to register ActiveX controls. VB programming needs to use some external controls to implement specific features. When we send our program to others to use, they don't have the corresponding controls on their computers, so we have to include them in the zip package for others, and the controls still have to be registered before they can run. At that point, writing a batch file to register the controls is very convenient~
l Simple image processing: VB's IDE doesn't support png format images, nor gif animations, so if we need to add these unsupported formats, we first have to convert these images to the jpg format that VB supports. That's when the usefulness of simple image processing knowledge becomes apparent~ (I generally use Photoshop and nEO iMAGING to process them)
l Making software icons: this is also very important. VB's default icon is pretty ugly. Giving your software a nice-looking image makes it look bigger and more high-end~
l Making software installers: Of course we hope to share the software we worked so hard to develop with our buddies so they can use it too, but our software usually consists of more than one file, so we need to know how to make an installer, packing all the involved files together for one-click installation, so our buddies can use our software conveniently~ (I generally use Inno Setup and Setup Factory; these two programs are very convenient to use)
l (That's all the related operations for now; I'll add more if I think of them later~)
Next is an introduction to related terms, so that classmates can have a preliminary understanding of programming.
(If you classmates find this too dry, you can skip it for now, and come back to look things up later when you run into something you don't understand~)
As usual, here's a list of related terms~
l "Program"–Program: "Article 3 of the Regulations on Computer Software Protection provides: A computer program refers to a sequence of coded instructions that can be executed by a computer or other device with information processing capabilities in order to obtain a certain result, or a sequence of symbolic instructions or symbolic statements that can be automatically converted into a sequence of coded instructions. The source program and object program of the same computer program constitute the same work."
Let me translate that into plain language~ Simply put, a program is machine language that a computer can understand, something that lets the computer execute directly and then complete the work we specify~
l "Software"—Software: (Baidu Baike) "Software (term used in mainland China and Hong Kong; called 软体 in Taiwan, English: Software) is a collection of computer data and instructions organized in a specific sequence. Generally speaking, software is divided into system software, application software, and middleware that sits between the two. Software does not only include computer programs that can run on a computer (here computer refers to computers in the broad sense); documentation related to these computer programs is generally also considered part of the software. Simply put, software is a collection of programs plus documentation. It also broadly refers to management systems, ideologies, political-ideological awareness, laws and regulations, etc. in social structures."
Translating again~ Software and programs are pretty much similar. Software has a somewhat broader meaning. Anyway, as long as it can run, that's the idea~ Don't overthink these things
l "Programming"—Programming or Coding: Programming is writing out your own ideas in a programming language that computers can understand (including low-level and high-level languages), and compiling them into a program for the computer to execute.
l "Low-level language": Generally refers to machine language and assembly language. Nowadays C is also classified as a low-level language, because these languages are closest to the hardware layer.
l "Machine language": That's the 010101 kind of stuff that humans simply cannot understand, but computers can read and execute directly. Programs written in machine language have the lowest redundancy and can theoretically achieve the highest execution efficiency, but they're super hard to write, and even harder to modify after writing~ so basically nobody uses it
l "Assembly language": Also called symbolic language, only a tiny bit better than machine language. Assembly language uses mnemonics (Mnemonics) to replace the opcodes of machine instructions, and uses address symbols (Symbol) or labels (Label) to replace the addresses of instructions or operands. Assembly language is essentially the same as machine language, just using simple symbols instead of 0101. Each of its instructions (except pseudo-instructions) can correspond to the respective machine language. Programs written in assembly are also very efficient, but you can imagine how hard they are to write. They're generally only used for directly operating at the hardware layer. We beginners don't need to worry about this; just knowing such a thing exists is enough~
l "C language": The C language was designed over 40 years ago by a guru named D.M.Ritchie at Bell Labs in the United States. The power of C lies in its portability, which machine language and assembly language do not have. Portability can be simply understood as: after you write a program in C, you can take it to another computer and it will still run, whereas machine language and assembly language cannot. But similarly, C is a relatively low-level language that can directly operate hardware, and is generally only used when developing low-level software or when there are special performance requirements.
l "High-level language": (Baidu Baike) "A high-level language (High-level programming language), relative to machine language (machine language, which is an instruction set architecture. This instruction set, called machine code (machine code), is data that a computer's CPU can interpret directly). It is a highly encapsulated programming language, as opposed to low-level languages. It is a programming language based on everyday human language, using text that ordinary people can easily accept (such as Chinese characters, irregular English, or other foreign languages), thereby making it easier for programmers to write, and also having higher readability, so that even people with relatively little computer knowledge can roughly understand its content. Because the early computer industry developed mainly in the United States, general high-level languages are based on English."
High-level languages, relative to low-level languages, are easier to understand, have better development efficiency, and are less difficult, but the corresponding cost is that they run relatively slowly. However, as computer performance improves, we basically don't need to care about this bit of slowness,
l "Compile": Compiling is translating program code through a compiler into machine language that the computer can understand and execute directly~
l "Compiled execution": The compiler compiles the program code into a program all at once, then the machine runs the program. E.g.: languages such as Delphi, C, C++, VB. More efficient than interpreted execution
l "Interpreted execution": Interpreted programming languages, after being compiled by a compiler, do not generate machine code, but generate an intermediate code, then the compiler packages this intermediate code into software, and when the software runs, an interpreter translates it into machine code for execution. The advantage of this approach is that it does not depend on the platform; the same program only needs to be written once to run on multiple platforms. For example, writing an HTML5 program once can run on PC (computer), phone, and tablet at the same time. The downside is that the running speed is not as fast as compiled execution. E.g.: Python, Java, and C# are all this type of language.
l "Procedure-oriented" (Procedure Oriented): Procedure-oriented is a process-centered programming philosophy. This concept is too abstract = =… I don't think I have the ability to explain it clearly, so I'll just quote the encyclopedia~
"Procedure-oriented is actually the most practical way of thinking. Even object-oriented methods contain procedure-oriented thinking. You could say procedure-oriented is a foundational method. It considers actual implementation. Generally, procedure-oriented is stepwise refinement from top to bottom. So the most important thing about procedure-oriented is the modular way of thinking. Compared with procedure-oriented, the object-oriented method mainly objectifies things, and objects include attributes and behaviors. When the program scale is not very large, the procedure-oriented method still shows an advantage, because the program flow is very clear, and it can be well organized according to the method of modules and functions. For example, let's talk about this procedure-oriented approach using what a student does getting up in the morning. Roughly, the process can be outlined as:
(1) Get up
(2) Get dressed
(3) Wash face and brush teeth
(4) Go to school
And these 4 steps are completed one by one; the order is very important, you just need to implement them one by one. Whereas if you used the object-oriented method, you might just abstract out a student class, which includes these four methods, but the specific order cannot be reflected."
l "Object-oriented": (Encyclopedia) "Object-oriented (Object Oriented, OO) is a software development method. The concepts and applications of object-oriented have gone beyond programming and software development, extending to fields such as database systems, interactive interfaces, application architecture, application platforms, distributed systems, network management structures, CAD technology, artificial intelligence, and more. Object-oriented is a method of understanding and abstracting the real world, a product of computer programming technology developing to a certain stage."
Simply put, in object-oriented thinking, everything is an object, which allows complex algorithms to be simplified through various class structures—pretty high-end, that's for sure~ The programming we're going to learn is this kind. VB, C++, and C# are all object-oriented (VB's object-orientation is still complete, which is also why learning VB became much easier), while C is procedure-oriented.
l "Event-driven": (Encyclopedia, easy to understand) "So-called event-driven, simply put, is: whatever button you click (i.e., whatever event is generated), the computer performs whatever operation (i.e., calls whatever function). Of course events are not limited to user operations. The core of event-driven is naturally events. From the event perspective, the basic structure of an event-driven program consists of an event collector, an event dispatcher, and an event processor. The event collector is specifically responsible for collecting all events, including those from the user (such as mouse, keyboard events, etc.), from hardware (such as clock events, etc.), and from software (such as the operating system, the application itself, etc.). The event dispatcher is responsible for distributing the events collected by the collector to the target objects. The event processor does the specific event response work; it often isn't fully determined until the implementation stage, so a virtual function mechanism needs to be used (the function name is often something like HandleMsg). For users of the framework, the only thing they can see is the event processor. This is also what they care about."
l "VB" (Visual Basic): (Official encyclopedia introduction) "Visual Basic is a structured, modular, object-oriented visual programming language developed by Microsoft that includes an assisted development environment and uses an event-driven mechanism. This is a language that can be used for developing Microsoft's own products. It originated from the BASIC programming language. VB has a graphical user interface (GUI) and a rapid application development (RAD) system, can easily use DAO, RDO, ADO to connect to databases, or easily create Active X controls. Programmers can easily use the components provided by VB to quickly build an application."
This VB is what we're going to learn, super convenient and easy to use~ After studying for not too long you can independently make practical little programs!
_EOF_
[Super Simple VB Intro] 2. Knowledge Preparation
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
【VB超简单入门】九、程序执行顺序-1
前言 最近作者很忙啦,这个系列的教程更新得也比较慢,在公众号后台看到有同学在催更了,所以抽出时间写一篇哈~ 有同学担心我没时间继续更新下去,这里再重申一下,只要有人看我就会抽出时间继续更新的啦,请大家放心哈。 关于程序执行顺序 我们写程序的时候,是一行一行的写的,在程序运行的时候,也是一行一行的运行,不过现实中的需求都是非常复杂的,如果只能一行一行运行的话,那我们的程序就不能叫做「程序」了,只能称
2022-11-13 · VB入门教程 · 约 1 分钟
关于《VB超简单入门》
查看全部内容请移步到我博客里的专题:DealiAxy's VB-Simple-Guide 有什么问题或者需要交流的同学可以通过微信公众号和我联系。 微信公众号:DealiAxy 博客地址:blog.deali.cn
2022-02-10 · VB入门教程 · 约 1 分钟
【VB超简单入门】八、四种运算
前言 这几天好像看这个VB系列教程的同学很多啊,有个小同学说写得不错嘿嘿,所以我又有动力继续更新下去。说一下哈,在公众号和博客里同步更新的哟,并且博客因为可以用Markdown写,所以排版会更舒服一点,建议大家方便的话来博客看,博客地址:blog.deali.cn 算术运算 算术运算包括加(+) 、 减(-) 、乘 (*)、除(/)、整除(\)(如7\2等于 3)、取余(Mod)(用来取余数,如7
2022-02-10 · VB入门教程 · 约 1 分钟
【VB超简单入门】一、写在前面
前言 每本书的前面总得写点什么,到我这里也自然不能免俗,前言这东西“存在即合理”,所以就随便写一点咯~ 首先这本书是给从未接触过编程的童鞋准备的,由于我学识疏浅,对VB也只是一知半解所以也只能讲一点点最基础的知识,入门之后便可以自由学习更高级的东西了~ 编程其实并不难,有很多人一看到屏幕上密密麻麻的代码就被吓呆了= =… 也有很多童鞋问我编程是不是得背很多代码= =…其实根本不用背,编程涉及的单词
2022-11-13 · VB入门教程 · 约 1 分钟
讨论
共 0 条加载评论中…