Click here to Skip to main content
15,908,581 members
Home / Discussions / C#
   

C#

 
GeneralRe: Issue using .dll in Program vs Service Pin
Luc Pattyn24-Jan-08 12:04
sitebuilderLuc Pattyn24-Jan-08 12:04 
GeneralCustom tab control Pin
DanB198324-Jan-08 7:58
DanB198324-Jan-08 7:58 
GeneralRe: Custom tab control Pin
led mike24-Jan-08 9:41
led mike24-Jan-08 9:41 
GeneralRe: Custom tab control Pin
DanB198324-Jan-08 9:50
DanB198324-Jan-08 9:50 
GeneralRe: Custom tab control Pin
led mike24-Jan-08 10:31
led mike24-Jan-08 10:31 
GeneralRe: Custom tab control Pin
DanB198325-Jan-08 0:14
DanB198325-Jan-08 0:14 
GeneralRe: Custom tab control Pin
led mike25-Jan-08 5:56
led mike25-Jan-08 5:56 
GeneralRe: Custom tab control Pin
DanB198326-Jan-08 1:29
DanB198326-Jan-08 1:29 
Hey.

I am using VS2008 and .NET 3.5

Yeah I had missed InitializeComponent() so have added that but am still having no luck.

The control is in a dll and is referenced in my gui project then instantiated like this:


<code>private void C_GmaGui_Load(object sender, EventArgs e)
{
//Set the main panel to be from where it starts to the edges of the screen
/*SetControlSize(mainPanel, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Right - mainPanel.Left,
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Bottom - mainPanel.Top);*/

SetControlSize(panelMain, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Right - panelMain.Left,
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Bottom - panelMain.Top);

this.tabbedPanelPictureBox1 = new TabbedPanelPictureBox.TabbedPanelPictureBox();

SetControlSize(this.tabbedPanelPictureBox1,
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Right - this.tabbedPanelPictureBox1.Left,
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Bottom - this.tabbedPanelPictureBox1.Top);

//ClearOffScreenBitmap();
//DrawOffScreenBitmapToScreen();
}</code>

This creates the component fine and adds the first tab. However when this bit of code is called:

private void addTabToolStripMenuItem_Click(object sender, EventArgs e)
{
this.tabbedPanelPictureBox1.AddTab();
}

no tab is added. Just to be clear the code in the tabbedpanelpicturebox control is now:

public partial class TabbedPanelPictureBox : UserControl
{
TabPictureBox m_tabPbx;

public TabbedPanelPictureBox()
{
InitializeComponent();
m_tabPbx = new TabPictureBox();
this.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.Controls.Add(m_tabPbx);
this.Dock = DockStyle.Fill;
}

private void TabbedPanelPictureBox_Load(object sender, EventArgs e)
{
}

public void AddTab()
{
m_tabPbx.AddTab();
}
}

and

public class TabPictureBox : System.Windows.Forms.TabControl
{
private List<PictureTab> m_pictureTabList = new List<PictureTab>();

public TabPictureBox()
{

AddTab();
}

public void AddTab()
{
//PictureTab a_picTab = new PictureTab("Test Title");
TabPage a_picTab = new TabPage("Test Title");
this.TabPages.Add(a_picTab);
//this.m_pictureTabList.Add(a_picTab);
//this.Dock = DockStyle.Fill;
}
}

I will try building it under VS2005 and .NET 2.0

Thanks

Dan

At university studying Software Engineering - if i say this line to girls i find they won't talk to me

Dan
QuestionWPF Transparent Window - can it still detect events? Pin
Member 429406224-Jan-08 7:44
Member 429406224-Jan-08 7:44 
AnswerRe: WPF Transparent Window - can it still detect events? Pin
i_want_to_learn_c#24-Jan-08 8:11
i_want_to_learn_c#24-Jan-08 8:11 
AnswerRe: WPF Transparent Window - can it still detect events? Pin
Paul Conrad24-Jan-08 8:39
professionalPaul Conrad24-Jan-08 8:39 
GeneralRe: WPF Transparent Window - can it still detect events? Pin
DaveyM6924-Jan-08 11:01
professionalDaveyM6924-Jan-08 11:01 
QuestionShould I do MCSD certification for Framework 2.0 or wait for 3.0? Pin
i_want_to_learn_c#24-Jan-08 7:23
i_want_to_learn_c#24-Jan-08 7:23 
GeneralC# Tool Kit for studio 2008 Pin
bigjoe11a24-Jan-08 6:15
bigjoe11a24-Jan-08 6:15 
GeneralRe: C# Tool Kit for studio 2008 Pin
Ed.Poore24-Jan-08 8:46
Ed.Poore24-Jan-08 8:46 
GeneralProblem with making Outlook appointments Pin
NewToAspDotNet24-Jan-08 6:06
NewToAspDotNet24-Jan-08 6:06 
GeneralRe: Problem with making Outlook appointments Pin
Paul Conrad24-Jan-08 7:01
professionalPaul Conrad24-Jan-08 7:01 
GeneralRe: Problem with making Outlook appointments Pin
NewToAspDotNet24-Jan-08 8:05
NewToAspDotNet24-Jan-08 8:05 
GeneralRe: Problem with making Outlook appointments Pin
Paul Conrad24-Jan-08 8:23
professionalPaul Conrad24-Jan-08 8:23 
GeneralRe: Problem with making Outlook appointments Pin
NewToAspDotNet24-Jan-08 8:32
NewToAspDotNet24-Jan-08 8:32 
GeneralRe: Problem with making Outlook appointments Pin
Paul Conrad24-Jan-08 8:36
professionalPaul Conrad24-Jan-08 8:36 
GeneralRe: Problem with making Outlook appointments Pin
NewToAspDotNet24-Jan-08 11:52
NewToAspDotNet24-Jan-08 11:52 
GeneralRe: Problem with making Outlook appointments Pin
Jimmanuel24-Jan-08 12:18
Jimmanuel24-Jan-08 12:18 
GeneralRe: Problem with making Outlook appointments Pin
NewToAspDotNet24-Jan-08 13:53
NewToAspDotNet24-Jan-08 13:53 
GeneralDatagrid - Real time databinding (WinForms) Pin
J a a n s24-Jan-08 5:10
professionalJ a a n s24-Jan-08 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.