473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Sub InitializeComponent()

Hi,

I have been examining the default code for a typical
windows form. Everything seems to make sense. However,
the InitializeComponent() subroutine is proceeded with the
following syntax:

System.Diagnostics.DebuggerStepThrough()

What is the purpose of this code? Does this mean that the
VB compiler will double-check to make sure nobody has
altered the code within this procedure?

Thanks,
Mark
Nov 20 '05 #1
2 2198
Mark,
What is the purpose of this code? Does this mean that the
VB compiler will double-check to make sure nobody has
altered the code within this procedure?


No, it means that when you're stepping through your code in the
debugger it will not step into InitializeComponent().

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #2
* Mattias Sjögren <ma********************@mvps.org> scripsit:
What is the purpose of this code? Does this mean that the
VB compiler will double-check to make sure nobody has
altered the code within this procedure?


No, it means that when you're stepping through your code in the
debugger it will not step into InitializeComponent().


Often people have problems with their 'InitializeComponent' sub. Why
do the templates include this attribute?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ryan Liu | last post by:
I think there are two way to define user control. For example, I want to define a ComoBox with contains only AM, PM items. a.. One way I define a class extends...
1
by: Fulcrum | last post by:
My program has 4 tabs with a few usercontrols that each have a lot of controls on them. Added to that a few oleDb database connections etc. Because of this the program spends a lot of time during...
3
by: Tabo | last post by:
when i build the project using C#, the code in InitializeComponent lost sometimes. Is it a bug?? if yes, can some method fix it? thanks for help. Tabo
8
by: edster | last post by:
A *lot* of our teams code is being deleted from the InitializeComponent() section of a winform, such as Grid settings, event handler hooks, layout settings etc. This mainly seems to happen to 3rd...
0
by: Ryan Liu | last post by:
I have a user control, it must set a property when it is just created, so I set it in its constructor, which has an parameter to specify the property . For example: public class ExecQuest :...
2
by: Craig | last post by:
Is there any side effects to skipping InitializeComponent() and calling a custom method instead? I actually layed out the form, copied the InitializeComponent() method and put it in layout1()...
6
by: Winshent | last post by:
I have read many threads which indicate that this was a problem with version 2002. Why should i be suffering this? I am using VB.NET 2003 Standard Edition... is it still a problem with 2003? ...
3
by: David Cho | last post by:
I've noticed that my code in InitializeComponent where I am linking event handlers to events vanishes from time to time. One of the things that triggers the disappearance is when I do something...
3
by: Scott Kilbourn | last post by:
Hi, I added some custom code to the InitalizeComponent function of a control that I'm working on. Every once in a while, I've noticed that the code that I added disappears. I finally tracked...
3
by: Phoon Chee Keong | last post by:
Anyone know how to split InitializeComponent() in vb.net 2003? Regards PCK
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.