Chat topic: How to customize personalized interface controls with C #
Moderator and expert introduction
Moderator: Guest_JSWANG_MS
Microsoft Expert: Han Dingyi (Guest_Danny_ms), Zhao Yan (Guest_FRANCS_MS)
Host Guest_JSWANG_MS SAYS:
Welcome everyone to participate in Microsoft online technology chat.
Host Guest_JSWANG_MS SAYS:
How is this chat topic How to customize personalized interface controls with C #
Host Guest_JSWANG_MS SAYS:
First, let us welcome Zhao Yan, from Microsoft Global Technology Center Engineer, Han Dingyi
Host Guest_FRANCS_MS SAYS:
Hello everyone, I am from Microsoft Global Technology Center Technical Commissioner Zhao Yan, I am very happy to discuss it here today.
Host Guest_DANNY_MS SAYS:
Hello everyone! I am from the Microsoft Global Technology Center (Shanghai) Technical Commissioner Han Dingyi. Welcome everyone to discuss problems with us.
Guest question Q and expert answer A
[Q] Sarillafan: Hi, I Want To ask One Question, IS THERE ANY METHOD TO CHANGE THE WAY Appliation STYLE IN A Simple Way?
[A] You can set the FLAT attribute of the control to System and write a manifest file.
[A] Want to make the control in the program show up XP style under Windows XP, please refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html /VBTCHUSINGWINDOWSXPVISUALSTYLESWITHCONTROLSONWINDOWSFORMS.ASP.
[Q] xiaohei: Manifest file mainly includes those content
[A] I have just given the link given:
XML Version = "1.0" Encoding = "UTF-8" Standalone = "YES"?>
Version = "1.0.0.0" Processrarchitecture = "x86" Name = "Microsoft.winWeb. TYPE = "Win32" /> TYPE = "Win32" Name = "Microsoft.Windows.common-Controls" Version = "6.0.0.0" Processrarchitecture = "x86" PublickeyToken = "6595b64144ccf1df" Language = "*" /> dependentassembly> dependency> dependency> ...... [Q] i When the control is redrawn, how can I achieve irregular gradient effect? [A] .NET class library has system.drawing.drawing2d.LineargradientBrush, which can draw a gradient effect, http://www.codeproject.com/cs/misctrl/cutebutton.asp [A] If it is drawline, it can customize richer effect, but it is more complicated. [Q] Can you customize the formula of the gradient? [A] Everything starts from the bottom, of course, you can define gradient formulas yourself. [Q] Sarillafan: Can you demonstrate how to draw a flat control (FLAT Control) [A] Examples of Heavy Pictures have: http://www.codeproject.com/cs/misctrl/vsnetMenu.asp, this example draws an example of Visual Studio .NET style. [A] Examples of Heavy Picture Toolbar include: http://www.codeproject.com/cs/misctrl/vsnettoolbar.asp. [A] You need a flat drop-down box control, you can refer to the example of http://www.codeproject.com/cs/misctrl/vsnetcomboBox.asp. [Q] Seventh: Can I change the background color of the MAINMENU? [A] Yes, you can overload menuitem.ondrawItem () [Q] liuliu: Can all controls are heavy? It seems that some controls are complicated. [A] Yes. There is a complicated class. For example: ComboBox, Toolbar. [Q] liuliu: So how do you retain those who are more complicated than buttons? For example Toolbar? [A] You need to overload many event response functions, http://www.codeproject.com/cs/misctrl/vsnettoolbar.asp has an example. [Q] xiaohei: Examples and methods of self-painting irregular forms [A] You can set the form to transparent and use the map to achieve [Q] Seventh: If a large number of maps during the redraw process seem to make the program very slow, how can I solve this problem? [A] You can open a Cache Graphics object, draw it there, then display it on the screen. [Q] What is msil? [A] That is the abbreviation of Microsoft Intermediate Language [A] .NET compiles all the languages to IL, in which it can make different languages have almost the same performance on the .NET platform, provided that they follow the standards and can be compiled into IL [Q] Shall We Study IL Just AS WE SHOLD STUDY ASM? [A] No, IL is transparent to the writer of the upper language, if you understand the IL specification, you can develop a new language supported by .NET support. [Q] In the text, I found that the RGB value of the picture color sometimes changed, affecting the interface effect. Why does this cause this happening? Can you avoid? [A] Maybe it is too low because you have a picture of the picture. [Q] Seventh: If I need to post some irregular pictures, do you have to set the picture into a background transparent GIF picture, sometimes it is very troublesome ~! ! [A] Bitmap.makeTransparent () You can see an example on http://www.codeproject.com/cs/misctrl/outlookbar.asp like Outlook. For information on system.windows.forms.control classes, see MSDN: MS-help: //ms.vscc/ms.msdnvs/cpref/html/frlrfsystemwindowsformsbuttonMemberstopic.htm [Q] Maraachow: Question: if i created a c # Program, Can I Run it on window98? [A] If your Windows98 is installed .NET Framework, it is [Q] Do you have an example of the control of the property window in vs.Net? [A] You can look at the example on MSDN: Property Grid Http://samples.gotdotnet.com/quickstart/winforms/doc/controlref/propertygridctl.aspx http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotNet/html/ USINGPROPGRID.ASP http://msdn.microsoft.com/library/default [A] You can use System.Windows.froms.PropertyGrid class http://www.codeproject.com/cs/misctrl/globalizedpropertygrid.asp [Q] MMUD: I said that the function of automatic docking? Does the PropertyGrid class? [A] The control has the property of Dockable, which can be set [Q] xiaohei: You can set the form to transparent, use the map to implement, how to implement the map function, is it ok? [A] Add a PictureBox on the Form [Q] C # how to implement XML? [A] XML is just a specification, .NET is based on XML build, C # can use this standard, unrelated to this standard [Q] Seventh: The menu bar in the unsuitable state is usually gray. Can I sure, how to redraw? [A] Overloads the MenuiteM class onpaint event response function [Q] MMUD: Where can I see chat history, such as those before? [A] The last chat record can be at http://www.microsoft.com/china/community/article.asp?obody=chat/chatrecord/chat0724&oxslt=chat/chat summary Host Guest_DANNY_MS SAYS: I will do some summary. [Q] What is control Heavy painting: [A] Control Heavy painting is the interface control that meets special requirements by overloading an existing control class or overloading the System.Windows.Forms.Controls class. These controls can have special STYLE, special event responses, and the like. For information on system.windows.forms.control classes, see MSDN (MS-Help: //ms.vsccc/ms.msdnvs/cpref/html/frlrfsystemWindowsFormsButtonMemberstopic.htm) For examples of localization system.windows.forms.propertygrid, see http://www.codeproject.com/cs/misctrl/globalizedpropertygrid.asp For examples of heavy painting button controls, please see http://www.microsoft.com/china/community/article.asp?oBODY=TechZone/TechArticle/TechDoc/redrawcomponent&oXSLT=TechZone/TechArticle/TechContent and http://www.codeproject.com/cs/miscctrl/cutebutton. ASP requires special effects, such as gradient, etc. You can use system.drawing.drawing2d.LineargradientBrush Class MS-help: //ms.vscc/ms.msdnvs/cpref/html/frlrfsystemdrawingdrawing2dlineargradientbrushmemberstopic.htm You need to draw a shortcut bar like Outlook to see an example http://www.codeproject.com/cs/misctrl/outlookbar.asp You need a flat pull box control, you can refer to the example http://www.codeproject.com/cs/misctrl/vsnetcomboBox.asp For the control in the program, please refer to the style of XP in Windows XP. Http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchusingwindowsxpvisualstyleswithControlsonWindowsForms.asp Required folder browser can refer to the example http://www.codeproject.com/cs/misctrl/folderbrowser.asp For example, please refer to the example of TextBox, see: http://www.codeproject.com/cs/misctrl/masKedcsedit.asp For examples of TRAYICON in the taskbar, see http://www.codeproject.com/cs/misctrl/notifyiconex.asp Examples of heavy painting menus are: http://www.codeproject.com/cs/misctrl/vsnetMenu.asp This example draws an example of Visual Studio .NET style. Examples of heavy painting toolbars are: http://www.codeproject.com/cs/misctrl/vsnettoolbar.asp Examples of SKIN mechanism are: http://www.codeproject.com/cs/misctrl/skinnedslider.asp Conclude Host Guest_JSWANG_MS SAYS: Ok, thank you for participating in Microsoft expert technology chat. Host Guest_JSWANG_MS SAYS: At the same time, I would like to thank Zhao Yan and Han Dingji engineer to take the time to participate in the chat. Host Guest_JSWANG_MS SAYS: Our chat time is 4: 00 ~ 5: 00 in the afternoon. I hope that everyone can see you next time. Host Guest_JSWANG_MS SAYS: The next topic is .NET Passport Host Guest_JSWANG_MS SAYS: If you have any questions, please take our newsgroups. Microsoft.public.cn.dotNet.framework Microsoft.public.cn.dotNet.csharp Host Guest_JSWANG_MS SAYS: Microsoft's mail server is: msnews.microsoft.com This time, I'm here, thank you!