473,396 Members | 2,068 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,396 software developers and data experts.

Source code generation in VS.NET IDE

I have wrriten a custom combobox control which
only have the name of months in it.

public class MonthCombo:ComboBox
{

MonthCombo()
{
base.add("Jan");
base.add(.....
.....
}
}

and nothing more than this

When I Used this control in mt form
Every time that i load the project to the IDE
the IDE Adds a code block which adds the month names
to combo box in the forms InitializeComponent()
WHAT SHOULD I DO ABOUT THIS
PLEASE AND PLEASE HELP ME
THIS BUG HURT ME VERY MUCH
IT IS SO ABUSING ME THAT MAKE ME CRY OF IT
PLEASE AND PLEASE HELP ME MICROSOFT MAN
Nov 15 '05 #1
3 1058
Hi Yaser,

Try adding the following method:
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Hidden)]

public new System.Windows.Forms.ComboBox.ObjectCollection Items

{

get { return base.Items; }

}
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Yaser Zia Sistani" <yz****@yahoo.com> wrote in message
news:72****************************@phx.gbl...
I have wrriten a custom combobox control which
only have the name of months in it.

public class MonthCombo:ComboBox
{

MonthCombo()
{
base.add("Jan");
base.add(.....
.....
}
}

and nothing more than this

When I Used this control in mt form
Every time that i load the project to the IDE
the IDE Adds a code block which adds the month names
to combo box in the forms InitializeComponent()
WHAT SHOULD I DO ABOUT THIS
PLEASE AND PLEASE HELP ME
THIS BUG HURT ME VERY MUCH
IT IS SO ABUSING ME THAT MAKE ME CRY OF IT
PLEASE AND PLEASE HELP ME MICROSOFT MAN

Nov 15 '05 #2
>blablablaabla
WHAT SHOULD I DO ABOUT THIS
PLEASE AND PLEASE HELP ME
THIS BUG HURT ME VERY MUCH it's not a bug
problem is by your side IT IS SO ABUSING ME THAT MAKE ME CRY OF IT
PLEASE AND PLEASE HELP ME MICROSOFT MAN

just read documentation

using System;
using System.Windows.Forms;
using System.ComponentModel;

namespace WindowsApplication5
{
public class MonthCombo:ComboBox
{
public MonthCombo()
{
base.Items.Add("Jan");
base.Items.Add("Feb");
//...
}
[DesignerSerializationVisibility(DesignerSerializat ionVisibility.Visible)]
new public System.Windows.Forms.ComboBox.ObjectCollection Items
{
get
{
return base.Items;
}
}
}
}

pozdrawiam
Przemek Sulikowski
Nov 15 '05 #3


THANKS FROM YOU

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #4

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

Similar topics

8
by: Max M | last post by:
Yesterday there was an article on Slashdot: http://books.slashdot.org/article.pl?sid=03/09/04/1415210&mode=flat&tid=108&tid=126&tid=156 It is about automatic code generation. I got interrested...
0
by: Rasmus Fogh | last post by:
Someone raised the question of automatic code generation a few weeks back. And yes, we (CCPN) are using automatic Python code generation in a major way. Basically we are making data models in...
1
by: Gina | last post by:
I need to add the cell generation to a templated program. I am using graphics magician, but my problem is with the math. I cannot figure out my cell generations. I do know that I need two...
10
by: Roberto Nunnari | last post by:
Hi all. I announce that there's a brand new, free FSM Generator in the Open Source arena: NunniFSMGen - release 1.0-RC1 http://nunnifsmgen.nunnisoft.ch NunniFSMGen is a java tool that...
4
by: kj | last post by:
I consider myself quite proficient in C and a few other programming languages, but I have never succeeded in understanding a largish program (such as zsh or ncurses) at the source level. ...
9
by: Hayato Iriumi | last post by:
Hello, I hear some hypes about creating code to generate C# or VB .NET code, that is, code generation (sounds straight forward enough). I haven't really seen how it's done in real world. I'm...
3
by: Stefan Behnel | last post by:
Hi! I need to generate source code (mainly Java) from a domain specific XML language, preferably from within a Python environment (since that's where the XML is generated). I tried using...
2
by: Gerard Kramer | last post by:
Hello, There is a slight problem with operator overloading in a program I attempt to start practising C++. It is a basic (not very original) game of life simulator. It uses two classes:...
31
by: eliben | last post by:
Hello, In a Python program I'm writing I need to dynamically generate functions and store them in a dict. eval() can't work for me because a function definition is a statement and not an...
0
by: Mitchel Haas | last post by:
I've noticed several inquiries in the past for libraries/toolkits to generate or parse xhtml. Although there are already a few libraries available for this purpose, I'd like to announce a new...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.