Display Windows dialog box in your application

Source: Internet
Author: User
Similar to the implementation in VB and other languages, Windows API is called.

Using System;
Using System. Windows. forms;
Using System. runtime. interopservices;

Namespace Jacky. WIN32API {
/**/ /// <Summary>
///Show windows about box
/// </Summary>
Public   Class Aboutbox {
[Dllimport ( " Shell32.dll " )]
Private   Static   Extern   Long Shellabout ( Int Hwnd, String Szapp, String Szotherstuff, Int Hicon );

Private   String _ Title = Application. productname;
Private   Int _ Formhandle =   0 ;
Private   Int _ Iconhandle =   0 ;
Private   String _ Version = Application. productversion;

/**/ ///   <Summary>
///  
///   </Summary>
///   <Param name = "formhandle"> </param>
///   <Param name = "iconhandle"> </param>
///   <Param name = "title"> </param>
///   <Param name = "version"> </param>
///   <Example> New aboutbox (this. Handle. toint32 (), this. Icon. Handle. toint32 (), "software name", "version 1.0"). Show (); </Example>
Public Aboutbox ( Int Formhandle, Int Iconhandle, String Title, String Version) {
This . _ Formhandle = Formhandle;
This . _ Iconhandle = Iconhandle;
This . _ Title = Title;
This . _ Version = Version;
}

/**/ ///   <Summary>
///  
///   </Summary>
///   <Param name = "formhandle"> </param>
///   <Param name = "iconhandle"> </param>
///   <Example> New aboutbox (this. Handle. toint32 (), this. Icon. Handle. toint32 (), "software name", "version 1.0"). Show (); </Example>
Public Aboutbox ( Int Formhandle, Int Iconhandle) {
This. _ Formhandle=Formhandle;
This. _ Iconhandle=Iconhandle;
}

Public   Long Show () {
ReturnShellabout (This. _ Formhandle,This. _ Title,This. _ Version,This. _ Iconhandle );
}
}
}

Call method:

New Aboutbox ( This . Handle. toint32 (), This . Icon. Handle. toint32 (), " Software name " , " Python SDK Version 1.0 " ). Show ();
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.