What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

GUI issue

Dagradt

Community Developer
Joined
Jul 26, 2010
Messages
1,423
Reaction score
43
I am having a few issues with my GUI:

It is mainly centered around adding an background Image to my Tab Control. I have found a way to get around this but I would like to know if there is something I am doing wrong. Below is a description of the issue...

When I add a Background Image to my Tab Control the following code is generated:

//
// tabPage1
//
this.tabPage1.BackgroundImage = global::Gelu_Mors_Eques.Properties.Resources.GME_Background_Pic;
this.tabPage1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(702, 383);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Gelu Mors Eques";
this.tabPage1.UseVisualStyleBackColor = true;

The issue lies here:

"this.tabPage1.BackgroundImage = global::Gelu_Mors_Eques.Properties.Resources.GME_Background_Pic;"

I get this Error:

"File: GME UI.Designer.cs Line: 110 Error: The type or namespace name 'Properties' does not exist in the namespace 'Gelu_Mors_Eques' (are you missing an assembly reference?)"

Now the way around this is to add a picture box (Which if left alone will also generate the same error!), below is the generated code:

//
// pictureBox1
//
this.pictureBox1.Image = global::Gelu_Mors_Eques.Properties.Resources.GME_Background_Pic;
this.pictureBox1.Location = new System.Drawing.Point(6, 6);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(690, 371);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;

Again I get the same error, just on a different line... But if I delete from the above:

"this.pictureBox1.Image = global::Gelu_Mors_Eques.Properties.Resources.GME_Background_Pic;"

and add:

"pictureBox1.ImageLocation = Logging.ApplicationPath + @"\CustomClasses\Gelu Mors Eques\Resources\GME Background Pic.jpg";"

Here:
private void GME_UI_Load(object sender, EventArgs e)
{
GMESettings.Instance.Load();
pictureBox1.ImageLocation = Logging.ApplicationPath + @"\CustomClasses\Gelu Mors Eques\Resources\GME Background Pic.jpg";
}

The CC will load and the GUI will work with the picture... So my question is this: Am I doing something wrong? Or if this is just not possible using HB is there a way to do the same thing for a background image, something like: "Background.imagelocation = Logging.App..."

A quick side note: If I create this GUI outside of the CC (a brand new form with just the GUI), it works perfectly fine with no issue. So is this an HB issue?
 
@Serium,

I have, just seeing if anyone knows what the actual issue is.
 
Back
Top