Windows窗体开发API列表:在哪里可以找到? [英] Windows Forms development API list: Where to find?

查看:116
本文介绍了Windows窗体开发API列表:在哪里可以找到?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows Forms不是这里的命名空间,它是一种为Windows开发应用程序的技术。

有.Net Framework类库,

但据我所知Windows表单不能访问所有表单,

它只访问其中的一部分。对吗?



我可以在Visual Studio中找到Windows Forms API列表,点击:

解决方案/项目/参考文献/添加参考.. ./.Net



但我很好奇是否有其他地方可以找到API列表,例如,在msdn网站上?

Windows Forms is not a namespace here, it is a technology to develop apps for Windows.
There is .Net Framework Class Library,
but as i understand Windows Forms does not access to all of them,
it accesses only a part of them. Right?

I can find Windows Forms API list in my Visual Studio by clicking:
Solution/Project/References/Add Reference.../.Net

But i am curious is there another place to find API list, for example, on msdn website?

推荐答案

System.Windows.Forms [ ^ ]是一个很好的起点!
System.Windows.Forms[^] is a good place to start!


Windows Forms是一个使用.NET FrameWork的高级元构造;它在它使用的低级API调用之上创建了一个抽象级别:它隐藏了偶然视图中的低级用法。当然,Windows Forms不会使用FrameWork中的所有内容!



Windows Forms包含自己的图形引擎GDI +;与使用基于矢量的图形引擎的WPF不同的选择。



Windows窗体被组织成各种功能库,通过引用dll提供,并使其可见 通过使用语句。



Windows Forms实现了一个应用程序模型,默认情况下实例化并显示单个主窗口(Form),该窗口在单线程中调用 - 公寓(STA)ApplicationContext在静态'静态类中的主方法'程序中。



通常情况下,关闭此主表格会终止申请。



我建议您考虑一下仔细考虑你对API:这个词的使用,从最广泛的意义上说,它可以直接或间接地为你提供编程环境的整个范围,但是,如果你说它是一切,那么这个词有什么价值呢? br />


Windows Forms通过NameSpaces,Forms,UserControls,File Operations,Linq,Classes,Structs,Properties,Methods,Fields,Collections,Generic的预定义语法直接提供的内容集合等是API,是的,但大多数情况下,该术语已用于描述需要使用特殊方法的更有限的子集,如通常称为PInvoke和低级系统调用,如WndProc等
Windows Forms is a high-level meta-construct that uses the .NET FrameWork; it creates a level of abstraction above the lower-level API calls that it uses: it hides the lower-level usage from casual view. Of course, Windows Forms does not use everything in the FrameWork !

Windows Forms incorporates its own graphics engine, GDI+; a different choice than WPF which uses a vector-based graphics engine.

Windows Forms is organized into various functional Libraries which are made available through referencing dll's, and made "visible" through Using statements.

Windows Forms implements an Application Model with a default of instantiating and showing a single main window (Form) which is invoked in a single-threaded-apartment (STA) ApplicationContext in a static 'Main method in a static class 'Program.

In common use, closing this "Main Form" terminates the Application.

I suggest you think carefully about your use of the word "API:" in the broadest sense it can the entire gamut of what a programming environment offers you directly and indirectly, but, if you say it's "everything," what value is there in the word ?

What Windows Forms offers directly, through its predefined syntax for NameSpaces, Forms, UserControls, File Operations, Linq, Classes, Structs, Properties, Methods, Fields, Collections, Generic Collections, etc. is an API, yes, but most often that term has been used to describe a more limited sub-set that requires special methods to use, as in what are often referred to as PInvoke, and low-level system calls, such as WndProc, etc.


Ziya1995写道:
Ziya1995 wrote:



伙计们,我真的问了一个简单的问题,你把我的问题视为有道理d,但不是,看看:

我在Visual Studio中打开新的Windows Forms项目,然后我添加了像System.Drawing这样的引用。

但是怎么能我知道如何添加引用,如果我不知道引用的名称。

我重复一遍,我使用命名空间,添加引用等等,现在我想添加一个引用来使用它,如果我不知道引用名称如何添加???

直到今天我转到.NET Framework类库并复制引用名称,但Windows窗体只提供对部分的访问整个框架,它不仅仅是关于System.Windows.Forms命名空间,它也是关于例如下一个:


Guys, I really ask a simple question, you get my question as something hard, but it is not, look:
I open new Windows Forms project in Visual Studio, then I add references like System.Drawing and so on.
But how can I know how to add a reference, if I don't know names of references.
I repeat, I use namespaces, add references and so on, and now I wanna add a reference to use it, how to add if I don't know a name of reference???
Until today I go to .NET Framework Class Library and copy reference names, but Windows Forms provides access only to a part of the whole Framework and it is not only about System.Windows.Forms namespace, it is also about, for examples, next ones:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;



现在我是一个简单的人,我必须知道名字引用,编写和添加,这是最简单的问题之一。



我读了你写的东西,明白你是聪明聪明的人,但问题你是如此专业,不理解我的简单问题,因为你把它作为一个非常难的东西。


And now I am a simple guy, I must know names of references, to write them and add, that is one the easiest questions.

I read what you write and understand you are really smart and wise people, but the problem that you are so professional that don't understand my simple question, because you get it as something very hard.

只是现在你越来越接近你的问题了。以前,你从来没有提到你有问题,因为你不知道参考名称。你说你很好奇。



首先要明白的是:你列出了一些使用声明一些命名空间但名称空间不是引用。引用是程序集。我不想在命名空间上添加多余的解释,但是要指出:程序集名称靠近命名空间,但这只是为了方便起见。从技术上讲,这些名字完全不相关。此外,这些名称之间没有任何预定义的对应关系。特别是,它意味着:

  • 任何程序集都可以使用不同的名称空间定义类型,这些不同的名称空间不必相关。
  • 两个不同的程序集可以使用相同的名称空间定义类型。这种方法实际上是在.NET FCL中使用的。例如,名称空间System用于通过两个程序集定义类型:System和System.Core。
  • 程序集名称(这是一个很大的独立主题:强名称可以使用或不使用,主可执行模块的名称可用于引用)不必与任何名称空间匹配。例如,据我所知,.NET FCL没有声明名称空间 System.Core
  • 在极少数情况下,您甚至可以获得完全相同的完整类型名称来自不同的图书馆。解决方案有一个鲜为人知的功能, extern别名。我们的询问者有时会遇到这种情况;我帮助解决了这种情况,可能只有几次。
  • Only now you are getting a bit closer to your question. Before, you never mentioned that you there is problem because you "don't know a name of reference". You said that you were "curious".

    First thing to understand is: you listed some using declarations with some namespace. But namespaces are not references. References are assemblies. I don't want to add redundant explanation on what namespaces are, but want to point out: the assembly names are close to the namespaces, but this is done only for convenience. Technically, those names are totally unrelated. Also, there are no any predefined correspondence between those names. In particular, it means:

    • Any assembly can define types using different namespaces, those different namespace don't have to be related.
    • Two different assemblies can define types using the same exact namespace. This approach is actually used in .NET FCL. For example, the namespace "System" is used for defining types by two assemblies: "System" and "System.Core".
    • The assembly name (this is a big separate topic: strong names can be used or not, the names of the main executable module can be used for referencing) does not have to match to any namespace. For example, as far as I know, .NET FCL doesn't declare namespace "System.Core".
    • In rare cases, you can even get fully identical full type names which come from different libraries. There is a little-known feature for the resolution, extern alias. Our inquirers sometimes faces such cases; I helped to resolve such situation, maybe just couple of times.

    • 这篇关于Windows窗体开发API列表:在哪里可以找到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆