最小化表格 [英] Minimize The Forms

查看:54
本文介绍了最小化表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想最小化一种形式,但是它可以在VB.net中运行,但是当我将其构建为EXE文件时却无法正常工作

I want to do minimize the the one form but it works as a run in the VB.net but when i build it as EXE file it did not work

我的列表就像我这样,请帮助

my listing is like i this Please help

Copy_From_USB_To_HD()  将数据从USB复制到硬盘驱动器"  
                             Form3.WaitLBL.Text =请等待PEACHTREE运行..."
                             Form3.Update()

                             Form3.WindowState = FormWindowState.Minimized '在运行Peachtree之前最小化Form3
                             Form3.WindowState = System.Windows.Forms.FormWindowState.Minimized

                             'Form3.Enabled = False
             'Form3.Update()

             'Dim L1作为整数
             '对于L1 = 1至35000

             '下一个

                             ShellCMD()             nbsp; bsp ; '运行桃树
                             Form3.Enabled = True
                             Form3.WindowState = FormWindowState.Normal '从桃树退出后,正常使用Form3

                             Form3.WaitLBL.Text =""
                             Form3.Update()

Copy_From_USB_To_HD()   'Cop[y the Data from USB to Hard Drive    
                Form3.WaitLBL.Text = "Please Wait for the PEACHTREE to Run ..."
                Form3.Update()

                Form3.WindowState = FormWindowState.Minimized       'Minimized the Form3 Before run the Peachtree
                Form3.WindowState = System.Windows.Forms.FormWindowState.Minimized

                'Form3.Enabled = False
               ' Form3.Update()

               ' Dim L1 As Integer
               ' For L1 = 1 To 35000

               ' Next

                ShellCMD()                                          'Run the Peach Tree
                Form3.Enabled = True
                Form3.WindowState = FormWindowState.Normal          'Normal the Form3 After the Exit from Peachtree

                Form3.WaitLBL.Text = ""
                Form3.Update()

推荐答案

我想最小化一种形式,但是它可以在VB.net中运行,但是当我将其构建为EXE文件时却不起作用

I want to do minimize the the one form but it works as a run in the VB.net but when i build it as EXE file it did not work

上面的代码的确切部分没有按照您的预期去做?

Exactly what part of the above code is not doing what you expect it to do?

大概此代码未在Form3中运行.不建议将类名('Form3')用作表单实例的变量名.当您创建Form3的实例时,将新实例分配给一个新变量,并使用该变量 而不是类名.

Presumably this code is not running in Form3.  It is not recommended to use the class name ('Form3') as the variable name for the form instance.  When you create the instance of Form3, assign the new instance to a new variable, and use that variable instead of the class name.

 将newForm3变暗为新Form3
  newForm3.Show
  newForm3.WaitLBL.Text  = ...

  Dim newForm3 as New Form3
  newForm3.Show
  newForm3.WaitLBL.Text = ...


这篇关于最小化表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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