Multithreading is an old topic. Today I will talk about the most basic threads, UI threads and background threads.
An exception occurs when you directly operate the UI control in the background thread (the Inter-thread operation is invalid: access it from a thread that does not create the control "XX ). How can this problem be solved? The key points are in the proxy and invokerequired attributes, and the
1. How to construct a beautiful main formMainly about how to a new form of the beautification process, involving a number of frequently needed properties I will emphasize its usage, and constantly update it, because the landlord is also exploring ....The steps are as follows:VS Create a new WinForm project, by default there is a Form1 form, I give the example renamed to BASECUSTOMEFRM, referring to a file called Cskin.DLL, let Form1 inherit a base cla
Using System;Using System.Collections.Generic;Using System.ComponentModel;Using System.Drawing;Using System.Linq;Using System.Windows.Forms;Using System.Threading;Namespace Doworker{public partial class Form1:form{delegate void MyDelegate (int value);Thread T;int i = 0;Public Form1 (){InitializeComponent ();}Do a "long time" job in a new threadprivate void Button1_Click (object sender, EventArgs e){t = new Thread (doWork);T.start ();}Work to be done for a long timevoid DoWork (){MyDelegate d = n
)); } Else { } } Public voiddosome ()//the method that actually operates the UI, executed by the delegate {button1. Text="Hellow C #"; }3, consider the method with the parameter conditionPrivate voidButton1_Click (Objectsender, EventArgs e) {Thread Mythread=NewThread (NewParameterizedthreadstart (dosomething));//creates a new thread that associates the method that the thread will e
Review and description
We have summarized or demonstrated the "commodity Dictionary", "commodity warehouse receiving", and "commodity inventory query" modules in detail, these modules involve simple data addition, deletion, and repair, as well as complex business processing transactions and business layer extraction, common query and report printing technologies and basic dictionary cache query technologies in MIS systems.
Content
Today, we will use another technology to implement another
Most We have been working on winform-related systems for the past year. We have some ideas for winform's uidesign (mainly busy, so many of them are just ideas and there are no development instances yet)
As for winui, the ideal situation should be cool appearance, which gives users a good user experience and impression, while taking into account both powerful functions and easy development. However, based on the traditional. Net windowsforms, except f
Original http://www.cnblogs.com/SkySoot/archive/2012/03/14/2396552.html
Let's take a look at a piece of running will throwInvalidoperationexceptionAbnormalCodeSection:
Public Partial ClassTestthread: Form
{
PublicTestthread ()
{
Initializecomponent ();
}
Thread thread;
VoidSettext (StringStr)
{
This. Textbox1.text = STR;
}
VoidDosomething ()
{
// D
High Imitation Qqmusic (2008) player, VS2008 environment development, function development, on the map first (the right of the music library has no content, temporarily get a Web page put up sucks)
Software UI Development Method I am in the process of sorting, try to explore a simple and powerful UI production methods, and then publish the method discussed with you, recently busy ...
[February 13 UPDATE
Advertisement word: dotnetbar = professional applications
198 $30 days full function free trial
Http://www.devcomponents.com/dotnetbar/indexlw.asp
Uidesign is becoming more and more important. I guess there are many people working together to make innovations like ribbon UI.With WPF, uidesign will be more free. (But I believe that there will be a free and messy UI .)ProgramThe staff will gradually leave the position. The
.items. Clear (); For ( Int I = 0 ; I Count; I ++ ) Listbox1.items. Add (I );Listbox1.endupdate (); Long L2 = System. datetime. Now. ticks;MessageBox. Show (L2 - L1). tostring ());
For the simple control above, you can test that the first and last are two or three times less time. However, if we use a control such as DataGrid, and if we have handle for many events in each cell, the efficiency is very low. Common Phenomenon: You can see the cell cursor on the DataGrid and run ar
Preface: Why use IE to open WinForm personal feel, WinForm deployment client too trouble such as Kingdee · UF, Winfrom patching too much trouble, adding new features to deploy a lot of time, so why not use IE to open it? This does not require the deployment of the client, and the file update only needs to be done at server. If you have an idea, you must realize it.Advantages.
Why do I need to use ie to open winform? I personally think it is too troublesome to deploy the client using winform, such as Kingdee UFIDA and winfrom. It takes a lot of time to add new features and then deploy them; why can't I open it with IE? In this way, you do not need to deploy the client. File Updates only need to be performed on the server. If you have an idea, you must implement it ..Advantages:
Preface: Why use IE to open WinForm personally think, WinForm deployment client too troublesome such as Kingdee · UF, Winfrom hit patch too troublesome, add new features and then deploy very time, so why not to use IE open it? This does not require deploying the client, the file update only needs to be done on the server. If you have an idea, you must realize it.Benefits,
modules are a combination of multiple common modules. They may be the following common modules: general permission module, general dictionary module, general attachment management module, and general personnel management module.
3. Implementation of a hybrid framework
To better understand the Winform development framework, I will introduce the implementation of this hybrid framework through the general dictionary module, one of the auxiliary modules.
Document directory
1. Fan out of the framework
2. Integration of auxiliary modules of hybrid frameworks
3. Separation of projects and configurations of hybrid frameworks
4. Introduction to calling hybrid frameworks
5. Support for mixed framework code generation tools
6. Summary of mixed framework Optimization
I introduced the variants and hybrid frameworks of the Winform framework in both the evolution of the
It's okay at noon. I took a few pictures I drew when I graduated last year and introduced the process of running the Winform application and the application of TCP protocol in Winform. If you have basic information such as the Windows message mechanism, you can understand these two images.
(1) program running structure of the Winform Application
(2) Applicati
Guidance: How can virtual functions be called to implement virtual functions "? As a manifestation of C ++ polymorphism, it is estimated that many people are interested in its implementation mechanism. When talking about the powerful mechanism of
Asynchronously load data in WinForm and use the progress bar. winform progress bar
In the WinForm program, the UI may be suspended due to loading a large amount of data, which is unfriendly to users. Therefore, when loading a large amount of data, you should first load the data in another thread to ensure the
The Winform application implements the universal Mask Layer 2 and the winform mask.
Previously, we have published Winform application universal mask layer and Winform application universal message window. These two mask layers are based on the pop-up window, today we will share with you a simple but user-friendly imple
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.