C#表单查询 [英] C# forms query

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

问题描述

我是使用Visual Studio C#的新手。我正在创建一个关闭许可证的EPOS系统,目前我正在使用Windows窗体使自己处于气候变化的状态。


这就是我计划设置它的方式:


我创建了一个主表单。在左侧,有两个组合框,一个在另一个的顶部。在右侧,我将它留作一个大空白广场。左上角的框列出了扫描的商品及其价格。左下角的框有按钮,例如''Total'',''Void Sale'','No Sale'等等。我计划的是,EPOS上的每个屏幕都使用这个主窗体,并有自己独立的控件在右边的大空白广场上。


我现在正在创建登录屏幕,所以我点击Add New Item并选择''Inherited Form''(选择要继承的默认主表单) 。这个继承的表单称为Login,并且与我希望的主表单具有相同的布局。现在我已将我的登录控件添加到右侧的大空白方块中,但是当我点击运行来测试应用程序时,它显示的是原始主窗体,带有大的空白方块而不是登录控件。


有人可以指出我出错的地方。也许我不能正确理解继承的表单选项?


谢谢

Hi i''m pretty new to using Visual Studio C#. I am creating an EPOS system for an off license and at the moment I am climatizing myself to using Windows Forms.

This is how I plan for it to be set up:

I have created a main form. On the left hand side there are two group boxes one on top of the other. On the right hand side I am leaving it as a big blank square. The top left box lists the items scanned in with their prices. The bottom left box has buttons for example ''Total'', ''Void Sale'', ''No Sale'' etc. What I am planning is that every screen on the EPOS uses this main form and has its own separate controls in the big blank square on the right.

The stage I am at now is creating the log in screen and so I have hit Add New Item and chosen ''Inherited Form'' (choosing the default main form to inherit from). This inherited form is called Login and has the same layout as the main form as I had hoped. Now I have added my log in controls into the big blank square on the right but when I hit run to test the app, all it shows is the original main form with the big blank square and not the log in controls.

Can someone please point me out where I have gone wrong. Maybe I''m not understanding the inherited form option correctly?

Thanks

推荐答案

在Program.cs文件中,将有一个部分包含Application.Run(...)

。无论什么形式,()将是程序启动时运行的表单。它可能是你的模板。表单,因为它是添加到项目中的第一个。
In your Program.cs file, there will be a section with the line Application.Run(...)
Whatever form is in that ( ) will be the form that runs at program startup. It''s probably your "template" form since it was the first one added to the project.


是的,它显示的是什么,但我的登录表单有以下设置:

Yeh that''s what it shows, but my login form has the following setup:

展开 | 选择 | Wrap | 行号


所以如果你把这行作为:

Application.Run(new Login());


它仍然不起作用?
So if you make the line be this:
Application.Run(new Login());

It still does not work?


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

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