当前位置:编程学习 > C#/ASP.NET >>

用vb.net开发api viewer(1)

下面我们要做的是利用vb.net开发类似于vb6.0中的api viewer tools的工具,它可以向我们展示利用vb.net和C#如何调用win32 的api函数
利用vb.net或c#调用api不是一件容易的事,因为语法等已经发生了很大的变化,愿这篇文章给大家带来帮助
确信你的机器文件包含安装vs6.0所安装的 Microsoft Visual StudioCommonToolsWinapi目录下的win32api.txt等文件
我们要查看的就是这个文件,如同使用api viewer tools一样软件的界面如下
下面我将给出代码
新建vb.net应用程序命名为api.net
添加引用
system
system.data
system.drawing
system.windows.forms
system.xml
添加窗体(Viewer.vb)
代码如下
Public Class frmViewer
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        'This call is required by the Windows Form Designer.
        InitializeComponent()
        'Add any initialization after the InitializeComponent() call
    End Sub
    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
       If Not (components Is Nothing) Then
           components.Dispose()
补充:asp.net教程,Win开发 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,