zoukankan      html  css  js  c++  java
  • Using System.Windows.Forms.OpenFileDialog

    The following example demonstrates

    • The use of the System.Windows.Forms.OpenFileDialog DotNetControl as alternative to the MAXScript GetOpenFileName..
    • The main advantage of the DotNet version is the ability to select multiple files at once.

    theDialog = dotNetObject "System.Windows.Forms.OpenFileDialog" --create a OpenFileDialog
    theDialog.title = "PLEASE Select One Or More Files" --set the title
    theDialog.Multiselect = true --allow multiple files to be selected
    theDialog.Filter = "HTML Files (*.html)|*.html|All Files (*.*)|*.*" --specify the filter
    theDialog.FilterIndex = 2 --set the filter drop-down list to All Files
    result = theDialog.showDialog() --display the dialog, get result into variable
    result.ToString() --when closed, convert the result to string
    result.Equals result.OK --returns TRUE if OK was pressed, FALSE otherwise
    result.Equals result.Cancel --returns TRUE if Cancel was pressed, FALSE otherwise
    theFilenames = theDialog.fileNames --the selected filenames will be returned as an array
  • 相关阅读:
    hover动画
    杀毒软件性能比较
    python文件转exe
    react 踩的坑
    js前端模块化(一) commonjs
    iframe嵌套页面 音频在微信公众号环境无法播放
    js正则表达式
    js修改伪类元素样式
    OAF 开发 Q&A
    JS打开窗口问题
  • 原文地址:https://www.cnblogs.com/softimagewht/p/1784123.html
Copyright © 2011-2022 走看看