I have been developing. Net winform for some time and have some knowledge of. net interface design. I think that all these things I learned are summed up after reading the experts online. I wrote these things for the first time.
Please give us some advice on some bad things.
Let's take a look at the results!
I have also seen a lot of examples of.
Part 1
Original article:
Last month (vol. 2, issue 9), I gave an executive overview of the conversion process, and started looking at converting General VB6 code to VB. net. this month I will finish General conversions, including DLLs, then start on Database conversions. next month, in the final segment, I will cover converting ASP. net web pages, and look at
interface has a method, Dispose, that separates the. NET Framework objects from the Windows object and frees the Windows objects so that the computer is in good condition.
You only need to do one task: Make sure that the Dispose method is invoked after the object is used.
The classic form of this content is shown in Visual Basic. NET code: First create the obj
Asp.net| Interaction | Design to use a drawing object in a Windows forms application
We've talked about drawing object classes, and here's how to use these classes in Windows forms applications. First, let's talk about how Windows forms applications work.
The main part of a Windows forms application
A simple Windows Forms application contains a main window (or form) that contains child items of a control.
= new FORM4 (); F4. MdiParent = this ; F4. Show (); }Because this method is in class Form1, this is referring to the Form1 we want.The MDI form has a method LayoutMDI () that controls how the subform is arranged, and the parameter is an enumeration type of mdilayout.Private void transverse arrangement toolstripmenuitem_click (object sender, EventArgs e) { LayoutMDI ( mdilayout.tilehorizontal); } Privat
First word: Smobiler is a development platform that uses. NET language in the VS environment to develop the app, perhaps more convenient than Xamarin
One, the target style
To achieve the effect shown in the above illustration, we need to do the following:
1. Drag a TableView control from the "Smobiler components" on the toolbar to the form interface
2. Modify the properties of the GridView control
Asp.net| Interaction | Design button Click event handler
Next is the button click event handler for each button. Most simply add a new, drawn object to the drawing list, and then call the Invalidate on PictureBox to redraw with the updated drawing list. The typical button event handler code looks like this:
C#
private void Addpoint_click (object sender, System.EventArgs e) {
Drawinglist.add (New Dpoint (Getrandompoint (), Color.Blue));
Drawing.inval
filledlist
I.fillbrushcolor = Color.hotpink
Next
Helper methods and classes to break out common code
You may notice that the Draw and Fill methods have many common code. Specifically, the code that creates pens or brushes in each class, the code that establishes the try/finally block, and the code that cleans the pen or brush is the same-the only difference is the actual method that is invoked when drawing or populating. (because the using syntax in C # is very concise, the amount of extra cod
The data table displays a table in the form that can come from any custom source:Data type: Specifies the data source type of the table1. DataTable, or System.Data.DataTable in. Net2, HTML, that is, the form of HTML string:3. JSON, which is the form of a JSON string: [[[1,2,3,4],[1,2,3,4]]Data Source: Specify the data source for the table1, SQL, that is, the data
Clicking the text Box button on the Form Designer toolbar pops up the Text Box Properties dialog box:bound field: The text box is bound to a field in the table selected in the form's property settings (the value in the text box is saved to the field).Default value: The initialization value of the text box.width: The width of the text box, such as: 200px,60% format.Maximum number of characters: The maximum number of characters the text box can enter, c
The radio button group is: bound field: binds to a field in the data table.Data Source:1. Data dictionary: Select the corresponding in the data dictionary item in the following field item.2. Custom: Input string expression, Format: Option text 1, option value 1, option text 2, option value 23. SQL statement: The columns queried by an SQL statement have as an option, the first field of the query result is text, the second field is a value, and the text and value are the same if there is only one
. NET Open-Source Workflow RoadFlow-Form Design-text field, workflow roadflow-
Click the text field button on the toolbar to bring up the text field property settings:
Binding field:It is bound to a field in the data table.
Default Value:The initial value of the text field.
Maximum characters:The maximum number of characters that can be entered in a text fi
VB.net can implement many functions that C # cannot do, such as when statement, optional parameter, local static variable, object instance access static method, handles binding event, on error handling exception, Object direct late binding, and so on. VB and C # belong to the same. NET language, compiled with the same CIL, but why VB support a lot of interesting
Program | control | Design VB Add-ins design one, get the control of VB first, external, so the name thinking, of course, must be with VB to start together! After creating a new external project. In the new project, there are CONNCET.DSR in the designer, which has one of the
VB. NET Winform and vb. netwinform
Recently, a winform program is required for development. Use VB. NET to write.
At the beginning of development, you need to implement a form set as a multi-Document Interface (MDI) Sub-
A pallet program is a program that creates an icon for this program in the system tray area (or state area) after the program runs, you can click the menu that appears to control the running status of the program. The pallet program has many advantages, such as no screen occupation, background operation, and easy control. So now more and more programs are made into pallets. In VB. NET, it is convenient and
psinfo as new _ system. Diagnostics. processstartinfo _ ("C:/somepath/somefile.txt ")
Psinfo. windowstyle = _ system. Diagnostics. processwindowstyle. Normal
Dim myprocess as process = _ system. Diagnostics. process. Start (psinfo)
Because the process class has a startinfo attribute and is a processstartinfo object, another way to produce the same result is to create a process object and set its startinfo attribute.
You can only call the start method of a pre-created process object without usin
.
To create a compiled server-side code
In addition to the new Windows Form engine,. NET also includes a form engine that is specifically designed to create Web forms. These forms, called Web form, are smart, just as VB makes it easy for you to create forms for traditional
divided into two layers: The program design layer and the execution layer .. Net is a program design layer, becoming a. Net programmer, not a Windows programmer
Compile the software into. NET software instead of Windows software.
C,. NE
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.