Hi all,
I'm sort of very new to C# and haven't programmed in OO for a while.
I'm trying to override the backgroundimage to the tabcontrol but it just
doesn't seem to want to do it, can someone please help me and tell me what
I'm doing wrong?
namespace RHInvestmentApp lication
{
public class FormRHMain : System.Windows. Forms.Form
{
public class tabMainNewBackg round: System.Windows. Forms.TabContro l
{
public override Image BackgroundImage
{
set
{
System.Resource s.ResourceManag er resourcesII = new
System.Resource s.ResourceManag er(typeof(FormR HMain));
BackgroundImage =
((System.Drawin g.Image)(resour cesII.GetObject ("tabCustomer.B ackgroundImage" )
));
}
}
}
private System.Windows. Forms.PictureBo x ImgRHLogo;
private System.Windows. Forms.PictureBo x ImgISNLogo;
private System.Windows. Forms.TabPage tabCustomer;
private RHInvestmentApp lication.FormRH Main.tabMainNew Background tabMain;
private System.Windows. Forms.TabPage tabAppointment;
private System.Componen tModel.Containe r components = null;
public FormRHMain()
{
InitializeCompo nent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Disp ose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeCompo nent()
{
System.Resource s.ResourceManag er resources = new
System.Resource s.ResourceManag er(typeof(FormR HMain));
this.ImgRHLogo = new System.Windows. Forms.PictureBo x();
this.tabMain = new
RHInvestmentApp lication.FormRH Main.tabMainNew Background();
this.tabCustome r = new System.Windows. Forms.TabPage() ;
this.tabAppoint ment = new System.Windows. Forms.TabPage() ;
this.ImgISNLogo = new System.Windows. Forms.PictureBo x();
this.tabMain.Su spendLayout();
this.SuspendLay out();
//
// ImgRHLogo
//
this.ImgRHLogo. Image =
((System.Drawin g.Bitmap)(resou rces.GetObject( "ImgRHLogo.Imag e")));
this.ImgRHLogo. Location = new System.Drawing. Point(8, 16);
this.ImgRHLogo. Name = "ImgRHLogo" ;
this.ImgRHLogo. Size = new System.Drawing. Size(512, 72);
this.ImgRHLogo. TabIndex = 0;
this.ImgRHLogo. TabStop = false;
//
// tabMain
//
this.tabMain.An chor = (((System.Windo ws.Forms.Anchor Styles.Top |
System.Windows. Forms.AnchorSty les.Bottom)
| System.Windows. Forms.AnchorSty les.Left)
| System.Windows. Forms.AnchorSty les.Right);
this.tabMain.Co ntrols.AddRange (new System.Windows. Forms.Control[] {
this.tabCustome r,
this.tabAppoint ment});
this.tabMain.Fo nt = new System.Drawing. Font("Verdana", 9.75F,
System.Drawing. FontStyle.Regul ar, System.Drawing. GraphicsUnit.Po int,
((System.Byte)( 0)));
this.tabMain.It emSize = new System.Drawing. Size(82, 26);
this.tabMain.Lo cation = new System.Drawing. Point(15, 100);
this.tabMain.Na me = "tabMain";
this.tabMain.Pa dding = new System.Drawing. Point(5, 5);
this.tabMain.Ap pearance = System.Windows. Forms.TabAppear ance.Buttons;
this.tabMain.Ri ghtToLeft = System.Windows. Forms.RightToLe ft.Yes;
this.tabMain.Se lectedIndex = 0;
this.tabMain.Si ze = new System.Drawing. Size(760, 500);
this.tabMain.Ta bIndex = 1;
//
// tabCustomer
//
this.tabCustome r.BackgroundIma ge =
((System.Drawin g.Bitmap)(resou rces.GetObject( "tabCustomer.Ba ckgroundImage") )
);
this.tabCustome r.Location = new System.Drawing. Point(4, 30);
this.tabCustome r.Name = "tabCustome r";
this.tabCustome r.Size = new System.Drawing. Size(752, 466);
this.tabCustome r.TabIndex = 0;
this.tabCustome r.Text = "Customer";
//
// tabAppointment
//
this.tabAppoint ment.Background Image =
((System.Drawin g.Bitmap)(resou rces.GetObject( "tabAppointment .BackgroundImag e
")));
this.tabAppoint ment.Location = new System.Drawing. Point(4, 30);
this.tabAppoint ment.Name = "tabAppointment ";
this.tabAppoint ment.Size = new System.Drawing. Size(752, 466);
this.tabAppoint ment.TabIndex = 1;
this.tabAppoint ment.Text = "Appointmen t";
//
// ImgISNLogo
//
this.ImgISNLogo .Anchor = (System.Windows .Forms.AnchorSt yles.Bottom |
System.Windows. Forms.AnchorSty les.Right);
this.ImgISNLogo .Image =
((System.Drawin g.Bitmap)(resou rces.GetObject( "ImgISNLogo.Ima ge")));
this.ImgISNLogo .Location = new System.Drawing. Point(624, 616);
this.ImgISNLogo .Name = "ImgISNLogo ";
this.ImgISNLogo .Size = new System.Drawing. Size(150, 49);
this.ImgISNLogo .TabIndex = 2;
this.ImgISNLogo .TabStop = false;
//
// FormRHMain
//
this.AutoScaleB aseSize = new System.Drawing. Size(5, 13);
this.Background Image =
((System.Drawin g.Bitmap)(resou rces.GetObject( "$this.Backgrou ndImage")));
this.ClientSize = new System.Drawing. Size(792, 673);
this.Controls.A ddRange(new System.Windows. Forms.Control[] {
this.ImgISNLogo ,
this.tabMain,
this.ImgRHLogo} );
this.Name = "FormRHMain ";
this.Text = "FormRHMain ";
this.Load += new System.EventHan dler(this.FormR HMain_Load);
this.tabMain.Re sumeLayout(fals e);
this.ResumeLayo ut(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run (new FormRHMain());
}
private void FormRHMain_Load (object sender, System.EventArg s e)
{
}
private void tabPageAppointm ent_Click(objec t sender, System.EventArg s e)
{
}
private void ImgISNLogo_Clic k(object sender, System.EventArg s e)
{
}
}
} 0 4656 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DraguVaso |
last post by:
Hi,
I 'wrote' my own DataGrid, using the normal DataGrid, and overriding some of
the DataGridTextBoxColumn-methods (mostly the Paint-method). I based most of
my changes on the Windows Form FAQ:
- http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q745q
- http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q758q
- http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q837q
Basicly it works like this: Every time a cell has...
|
by: Dino M. Buljubasic |
last post by:
I would like to be able to compare BackgroundImage Property of two picture
boxes on my form.
How can I do that?
I am using :
if (pctOne.BackgroundImage Is pctTwo.BackgroundImage) then
// blah, blah, blah
end if
|
by: Mike |
last post by:
Hi,
I have such problem:
On my form I have TabControl. I want to move from one tab to another
using "Next" and "Prev" button. This part works fine.
But control also supports switching between TabPagess using
combination of buttons Ctrl+Tab (forward) and Ctrl+Shift+Tab (back). I
would like to suppress such possibility.
|
by: kjon |
last post by:
Hi, I'm trying to get the BackgroundImage of a form/control and draw it
again in runtime. But if the Backgroundimage is "None", the DrawImage
command will give an error.
Is it possible to programmaticaly check the Backgroundimage property of the
form/control in runtime whether it is "None" or has an image inside? Please
advice. Thanks in advance.
Regards,
KJon
|
by: John |
last post by:
Hello all,
I was wondering, does this property really exist in VB.NET 2003? Because
it's listed in Intellisense, but setting it doesn't seem to have the
slightest effect on the visual look of the control. I can set it for forms,
checkboxes, radiobuttons, buttons, pictureboxes, and it works for everything
except for textboxes. Does anyone know what's wrong?
For the record, when testing I simply put the following in the procedure
that...
| |
by: VB Programmer |
last post by:
I am trying to check which image is currently the BackgroundImage (VB.NET
2005). Can you help me out?
Me.BackgroundImage.ToString doesn't work.
Here's the sample code...
Select Case Me.BackgroundImage.ToString
Case "MyApp.My.Resources.Resources.BaseCurrencyControlNoChange"
Me.BackgroundImage =
|
by: Sharon |
last post by:
I’m using a Panel control in my form to display a background image.
So in the Form OnPaint() I wrote:
myPanel.BackgroundImage = m_bmp;
While the m_bmp is the Form Bitmap member.
The problem is that the image is not shown on the screen.
But if change the code in the OnPaint() to:
Bitmap bmp = new Bitmap(m_bmp, m_bmp.Width, m_bmp.Height);
|
by: moi.romanowsky |
last post by:
Does anyone know why the backgroundImage does not display in VB? I
have tried setting it in the properties window (where the thumbnail
shows) and explicitly in my code like so:
Me.BackgroundImage = WindowsApplication1.My.Resources.Resources.Chile
Nevertheless, nothing happens. Incidentally, setting the BackColor
works just fine, such as:
Me.BackColor = Color.Blue
|
by: fehays |
last post by:
Hello,
Can someone please tell me why this code leaks? The handle count for IE
continues to increase.
var newimage = "url(images/" + res.value.Image + ")";
if( imagetd.style.backgroundImage != newimage )
{
imagetd.style.backgroundImage = "";
imagetd.style.backgroundImage = newimage;
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |