473,386 Members | 1,820 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.

WinForms problem...

I wrote my own WinForm controls inherited from
standard controls f.e. formatted TextBox etc...
All worked perfectly with Vs.net 2002 but when i
add my controls to a form visually with 2003 version
it's bahaviour is strange. F.e. I add my simple label control
to a form tab control. It looks ok but when i'm running the project
it disapperas. In the windows forms generated code i see
that this control wasn't addes to a tab control really. There is no
this.tabControl0.Controls.Add(this.label0);
Control itself have no text property even if i set this before. There is no
this.label0.Text = "My text";
And the control size isn't set. There is some bug in WinForms generator?
Or I'm doing something wrong?

My control's code:

using System;
using System.Drawing;
using System.Collections;
using System.Diagnostics;
using System.Windows.Forms;
using System.ComponentModel;
namespace Datacomp.DatacompControls
{
/// <summary>
/// DatacompLabel [Jacek 2002-11-19]
/// </summary>
public class DatacompLabel : System.Windows.Forms.Label
{
#region Members
private System.Windows.Forms.ToolTip toolTip1;
private System.ComponentModel.IContainer components;
#endregion

#region Constructors [Jacek 2002-10-20]
/// <summary>
/// Konstruktor komponentu.
/// </summary>
public DatacompLabel()
{
InitializeComponent();
}
/// <summary>

/// Konstruktor komponentu.
/// </summary>
/// <param name="container">Kontener rodzicielski.</param>
public DatacompLabel(System.ComponentModel.IContainer container)
{
container.Add(this);
InitializeComponent();
}
#endregion

#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.toolTip1 = new
System.Windows.Forms.ToolTip(this.components);
//
// DatacompLabel
//
this.AutoSize = true;
this.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.Size = new System.Drawing.Size(0, 13);
}
#endregion

#region Propertys implementation [Jacek 2002-10-24]
/// <summary>
/// Czy automatyczne dopasowanie rozmiaru?
/// </summary>
[DefaultValue(true)]
public override bool AutoSize
{
get{return base.AutoSize;}
set{base.AutoSize = value;}
}
/// <summary>
/// Rodzaj spłaszczenia.
/// </summary>
[DefaultValue(System.Windows.Forms.FlatStyle.System )]
public new System.Windows.Forms.FlatStyle FlatStyle
{
get{return base.FlatStyle;}
set{base.FlatStyle = value;}
}
#endregion
}
}
Nov 15 '05 #1
0 1116

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

Similar topics

10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
by: frank_ulbricht | last post by:
Hi folks, I'm a Java programmer and now I have to use C# for a new large project. The language is the best I've ever seen. In some points it goes far beyond Java. I like that. But then there...
0
by: sean | last post by:
From a parent process, I created a custom windows station and desktop. I then CreateProcess using that new station/desktop. There are no problems launching a plain windows app with this...
2
by: Kurt Denhoff | last post by:
I have an odbc connection on a Winforms UserControl when used within a WinForms project it works fine but when I use it on an aspx page the object doesn't show. The IIS log indicates code...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
1
by: Pieter | last post by:
Hi, In my application VB.NET 2005 application I placed a ReportViewer, and link it to a server-report: Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote...
4
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
4
by: parez | last post by:
Hi, Whats the winforms equivalent of asp.net page load event? I am trying to clear a status message field every time a user clicks on any of the buttons..
23
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
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.