如何创建评论框C#windowform [英] How to create comment box C# windowform

查看:82
本文介绍了如何创建评论框C#windowform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是c#的新手,也是我第一次在窗口上工作。我需要一些帮助,为用户创建评论部分,但我不知道在哪里或如何启动它,因为我抬头看到它只适用于asp.net



我尝试了什么:



我有点卡住所以我认真需要一些建议

im novice in c# and its my first time working on window form. i need some help in creating a comment section for user but i dont know where or how to start it as i looked up and saw that it only works on asp.net

What I have tried:

im kind of stuck so i seriously need some advice

推荐答案

要回答您的问题,需要有关您的申请,要求等的更多信息。显而易见的问题是:

- 你想如何评论部分看起来像

- 需要什么功能。



一旦了解了这些,就可以开始研究Windows Forms所具有的各种控件,并探索它们提供的功能。这有助于您为每个用例选择正确的控件类型。



要从Windows窗体开始,请查看 Windows Forms控件| Microsoft Docs [ ^ ]和控件列表,请参阅在Windows窗体上使用的控件| Microsoft Docs [ ^ ]
To answer your question would require a lot of more information about your application, requirements and so on. The obvious questions are:
- how do you want the comment section to look like
- what functionality is required.

Once you know these, you can start investigating different kinds of controls Windows Forms has and explore the functionality they offer. This helps you to choose the correct type of control for each use case.

To start with Windows Forms, have a look at Windows Forms Controls | Microsoft Docs[^] and for a list of controls, see Controls to Use on Windows Forms | Microsoft Docs[^]


这不是我们真正能够回答的问题 - 我们对您的应用程序及其工作方式的了解不够答案。



最大的问题是没有显示评论对话框 - 这是微不足道的,你应该能够在没有我们帮助的情况下做到这一点 - 它是从开发人员给你的对话框!

这意味着知道你的应用程序可能与你沟通的方式:它是否与你分享的数据库对话?还是文件服务器?还是互联网?它可以访问远程网站上的日志或数据库,还是发送电子邮件?或者是否需要将其打印出来并要求用户将其放入邮箱?



我们不知道,我们无法猜测 - 所以在你开始尝试进入如何实现任何东西的机制之前,你需要坐下来思考用户和你之间的沟通媒介!我们不能为你做那件事,我很害怕。
This isn't a question we can really answer - we don't know enough about your application and how it works to answer.

The big problem is not displaying a "comments" dialog - that's trivial and you should be able to do that without our help - it's getting the comments from the dialog to you the developer!
And that means knowing how your app can possibly communicate with you: does it talk to a database you share? Or a file server? Or the internet? Can it access a log or database on a remote website, or send an email? Or does it need to print it out and ask the user to drop it in a post box?

We don't know, and we can't guess - so you need to sit down and think long and hard about the communications medium between your user and you before you even start trying to get into the mechanics of how to implement anything! And we can't do that for you, I'm afraid.


你好,



首先你需要创建一个简单的表单(有2个文本框,一个用于输入用户名(如果未登录),另一个文本区用于输入注释),用于将注释从用户保存到DB。在注释表中,您还可以在保存时插入日期值。然后使用数据网格视图显示这些数据。



创建一个这样的简单表并保存用户的注释,当添加新注释时刷新网格



Hi,

First of all you need to create a simple form (with 2 textboxes one for entering user's name (if not logged in) and another text area for entering comment) for saving the comments from the user to DB. In the comments table you can also insert date value while saving. Then using a data grid view display these data.

Create a simple table like this and save comments from user , when a new comment is added refresh the grid

Column Name	Data Type	
cId	int	set to auto increment
cPostedBy	varchar(50)	
cPostedComment	varchar(max)	
cPostedOn	datetime	





一些使用数据网格显示数据的有用链接



DataGrid分页 - C#Windows窗体 [ ^ ]



使用DataGrid控件 [ ^ ]


这篇关于如何创建评论框C#windowform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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