|
Hi! I'm quite new to c#, and i am currently learning a lot about interfaces and c#. Seriously, i never asked before for a problem, but THIS one drives me crazy!
Ok, first i'm using .Net Frameworks 2.0 with VC# Express Beta, on a XPSP2 system. The problem started when i tried to add custom icons for my forms. Every icons that I've added are handled in a xml file called resources.resx. I've removed some icons from this file whithin the editor and any declarations related to them and since, i got this exception every times i start the program:
ArgumentException was unhandled
ResourceManager base name should not end in '.resources'. It should be similar to 'MyResources', which the ResourceManager can convert into <base />.<culture>.resources, for example, 'MyResources.en-US.resources'.
Thats it. I've searched for hours on this problem and i wasn't able to find something about. In english, what does this exception means? Does my ResourceManager try to call an inexistant object?
Thanks if you can help me!
|
|
|
|
|
First of all, keep in mind that "Whidbey" is still in beta. Second, there is no reason that the ResourceManager should ever look for MyResources.en-US.resources if "en-US" is your neutral language (i.e., the language in which your application was written). You use the NeutralResourcesLanguageAttribute to specify the neutral language - an assembly attribute (prefix with "assembly:") - which avoids 4 or more look-ups for satellite assemblies.
Even without that attribute, the neutral language is simply "MyResources.resources" (for example).
To learn more about resources and the ResourceManager , read Resources in Applications[^] in the .NET Framework SDK.
If you're specifying a resource, you do not include the ".resources". You would only specify "MyResources". The ResourceManager and its derivatives like ComponentResourceManager take care of getting an object for the thread's UI culture (Thread.CurrentUICulture ), or another CultureInfo that you could specify. If you specified MyResources.resources or MyResources.en-US.resources, then the ResourceManager wouldn't play much role.
You only specify a Type or resource name without any localization information in it (like MyResources). The topics I linked above will explain more.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
problem: i have a web browser embedded in my form. the pages i am creating visually complicated enough that i don't want to do it by hand, so i'm going to make the pages in front page. the issue is getting that front page generated html back to my C# web app as a properly formed string. instead of having to manually do things like replace all the "s with \"s, i'm trying to embed the html page as a resource, and extract it at run time. will this solve all my formatting issues? how do i extract it at runtime? if i add the html page to my project, change build action to "Embedded resource", i thought i coudl do a resources.GetObject and pass it the name of the file, but i keep getting back null.
and please let me know if you know a better way to get html generated code from front page into C# as a properly formatted string. thanks!
|
|
|
|
|
ResourceManager.GetObject would not work. A ResourceManager is created for a specific .resources embedded resource.
If you change a build action for a file to "Embedded Resource", you use Assembly.GetManifestResourceStream with the full resource name ("namespace" plus file name):
private void ExtractResource(string resource, string destination)
{
using (Stream s = this.GetType().Assembly.GetManifestResourceStream(resource))
{
using (FileStream file = new FileStream(destination, FileMode.Create))
{
int read = 0;
byte[] buffer = new byte[4096];
while ((read = s.Read(buffer, 0, buffer.Length)) > 0)
file.Write(buffer, 0, read);
}
}
} To use this, specify the name of the embedded resource (like "MyProject.MyFile.htm" - however the concatenation of the root namespace (configured in the Project Settings) + sub-folders + filename would look) and the destination path of the file.
For the destination, I would recommend using isolated storage which requires fewer code access security (CAS) permissions than even writing to the TEMP directory (via Path.GetTempFileName or something). See the IsolatedStorage class in the .NET Framework SDK for more information. You wouldn't have to use it, but it would make your application more robust if you planned on deploying it from different security zones (intranet or Iternet, as opposed to just running it from a local machine).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I made a Minesweeper.
But i have a problem...
Every square in the program is a UserControl, and i use Bitmap for the imagens, setting the Background...
In the Master Level ( 50x50 ) the program is extremlly heavy and laggy
What can i do?
Other methods to put the images?
Thanks.
|
|
|
|
|
Don't use a UserControl when a simple Control will do. UserControl s are containers and have a lot of overhead. Controls are simple objects - like a Button , which might be a better control to extend for your use - and would have less overhead.
But, realistically, don't use a control at all. Use a single control (perhaps even the Form itself) that manages the grid and draws the grid accordingly, as well as handling the painting operations by overriding OnPaint . This is a much more common approach and will have much less overhead than using either UserControl s or Control s.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hello,
I am writing a C# windows application. I would like to open a command prompt and execute a few lines of code. I am able to open the command prompt using the following code:
System.Diagnostics.Process.Start("cmd.exe");
But I don't know how to actually write a command to the prompt once it is open. Can anyone help me out?
Thanks,
RC
|
|
|
|
|
If you read the documentation for the Process.Start method, the following should be evident:
Process.Start("cmd.exe", "/c someapp.exe"); Other documentation for members of the Process class show examples of how to capture console output.
Please note that if an application uses the console subsystem, you don't actually need to start cmd.exe (the command environment for Windows NT - command.com for Windows (9x/ME)). A console program in Windows NT (NT4, 2000, XP, and 2003, plus all future Windows platforms) will automatically start in a console window, which you can suppress by using the Process.Start(ProcessStartInfo) method override and set ProcessStartInfo.CreateNoWindow to true .
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hello,
I developed a Web-Service which i want to consume from a Smart Device Application. I developed the Smart Device Application and create a Web Reference to the Web Service, but when i want to test the Smart Device Application in the Emulator the following error occurs:
A managed WebException occured at SoapHttpClientProtocol:doInvoke+0x23f
Unable to connect to the remote server
SoapHttpClientProtocol::doInvoke+0x23f
SoapHttpClientProtocol::Invoke+0x9
Service1::GetHypotenuse+0x17
Form1::ctor+0x3a
Form1::Main+0x5
Ok to terminate
Other Desktop WebClients which consumes WebServices on my Desktop works, and also a MobileWebApplication which consumes the same WEb-Service as the SmartDeviceApplication works, only when i want to test the Smart Device Application in the Emulator the error occurs.
Can anybody help me??
thx
regards
mat
|
|
|
|
|
Is your emulator correctly configured to connect to the Internet through ActiveSync or some COM port? If not, you won't be able to establish a connection. The fact that applications on your desktop machine can connect, and that a Mobile ASP.NET web application can connect to the web services - but your smart device can'ts - points toward your device not being properly connected.
For help with configuring your device or device emulator correctly, please visit the Embedded / Mobile[^] forum here on CodeProject. It would not be a C# issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I would also be sure that you the reference to your web service is not set to "localhost". I had similar problems until I discovered this small, but important, problem.
|
|
|
|
|
So i think the emulator is configured in a right way, because the emulator works with other Smart Device Application which do not consume Web-Services. So think it is nearly the problem chris mentioned with the Web-Reference. I still thought that it might be something like this, but i deleted the Web-Reference and created a new one, but still the same problem..?? Do you know any further idea?
regards
mat
PS: i created the Web-Reference as usual. I go to the Reference Directory in the Smart Device Application solution, go to Add Web Reference and then search on the local base for my Web-Service and then click on Add Reference.
|
|
|
|
|
Just because one smart device application is working doesn't mean another would. The difference is that your web service consumer requires a network connection. Another smart device application may not (like a calculator or game or something).
If you search on your local host, the web reference that gets created would reference "localhost", which is always 127.0.0.1, or the local machine. You need to address your machine with the web service using a remote IP or name that resolves to something other than 127.0.0.1 like "localhost" would.
To determine if your emulator is not connected correctly, start pIE (Pocket Internet Explorer) and see if you can browse to an external site (either on your intranet or the Internet - not just a page loaded from the device like the default home page). If you cannot resolve a remote host then post a question aobut configuring the emulator to the mobile forum I posted a link to before.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Yes i tried to browse to an external web site on my emulator, it does not work...
regards
patrick
|
|
|
|
|
I am missing something in this private void DataGridUserManagementID_ItemDataBound(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
The index is not set approprately in my dropdownlist. Can someone help me with the coding.
string strStore
ListItemType oType = ((ListItemType)e.Item.ItemType);
if ((oType == ListItemType.EditItem))
{
Response.Write("The ItemDataBound Command has been fired");
DropDownList listStore = ((DropDownList) e.Item.FindControl("ddlStores"));
strStore = ((DropDownList)(e.Item.FindControl("ddlStores"))).SelectedItem.Text;
Response.Write (strStore);
// listStore.SelectedIndex = Convert.ToInt32(strStore);
listStore.Items.IndexOf(listStore.Items.FindByText(strStore));
Response.Write(listStore.Items.IndexOf(listStore.Items.FindByText(strStore)));
}
You can feel free to email me at mcupryk@sun.net.bb if you need more information. Thank you Sincerely,
Matt and Macsgirl
|
|
|
|
|
01: string strStore
02: ListItemType oType = ((ListItemType)e.Item.ItemType);
03: if ((oType == ListItemType.EditItem))
04: {
05: Response.Write("The ItemDataBound Command has been fired");
06: DropDownList listStore = ((DropDownList) e.Item.FindControl("ddlStores"));
07: strStore = ((DropDownList)(e.Item.FindControl("ddlStores"))).SelectedItem.Text;
08: Response.Write (strStore);
09:
10: listStore.Items.IndexOf(listStore.Items.FindByText(strStore));
11: Response.Write(listStore.Items.IndexOf(listStore.Items.FindByText(strStore)));
12: }
I'm having difficulty trying to read your code here. I've numbered the lines for ease of reference.
Line 1: Missing semi-colon;
Line 2: e.Item.ItemType[^] already returns an object of type ListItemType so I am curious as to why you are casting it.
Line 5: I am assuming this is for debugging only. If so, a better mechanism would be setting up tracing. See: Enabling Tracing for a Page[^] and Writing Trace Messages[^]
Line 7: Finding the control again is redundant here because you did that on line 6. Change the line to strStore = listStore.SelectedItem.Text
Line 8: See previous comments on tracing
Line 10: You perform an IndexOf operation but do not store the value anywhere.
Line 11: You perform the same IndexOf operation again.
Now, to answer your question:
On line 6 you get the DropDownList, once you have this you can use the SelectedIndex[^] property to get the index of the selected item.
Does this help?
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I did as you told me and still having problems. Also when I have to go back in edit mode I must have the dropdownlist index preselected. But one thing at a time. Below the code is the error, this is why I cast it. Now, if I want to save the index how to I go about doing so. I appreciate any help. Thanks.
private void DataGridUserManagementID_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
string strStore;
ListItemType oType = ((ListItemType)e.Item.ItemType);
if ((oType == ListItemType.EditItem))
{
DropDownList listStore = e.Item.FindControl("ddlStores");
strStore = listStore.SelectedItem.Text;
Response.Write(strStore);
}
}
Server Error in '/MSPOS' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.DropDownList'
Source Error:
Line 178:
Line 179:
Line 180: DropDownList listStore = e.Item.FindControl("ddlStores");
Line 181: strStore = listStore.SelectedItem.Text;
Line 182: Response.Write(strStore);
Source File: c:\inetpub\wwwroot\MSPOS\Administrator.aspx Line: 180
Mathieu Cupryk
|
|
|
|
|
In line 180 of your source code you need to cast to a DropDownList.
e.g.
DropDownList listStore = (DropDownList)(e.Item.FindControl("ddlStores"));
In case there was confusion with my earlier post. The line of your source code that reads: ListItemType oType = ((ListItemType)e.Item.ItemType); is the line that does not need the cast, as ItemType already returns a value of type ListItemType
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Thank you. I still have a problem when I return to edit mode the index for the dropdownlist starts at 0. How do I set this when we change the index. Can u help me please.
private void DataGridUserManagementID_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
string strStore;
ListItemType oType = (e.Item.ItemType);
if ((oType == ListItemType.EditItem))
{
DropDownList listStore = ((DropDownList) e.Item.FindControl("ddlStores"));
strStore = listStore.SelectedItem.Text;
}
}
|
|
|
|
|
macupryk wrote:
I still have a problem when I return to edit mode the index for the dropdownlist starts at 0
I'm not quite with you there. All collections in the .NET framework are zero based.
macupryk wrote:
How do I set this when we change the index
I still don't quite understand. How do you set what when the index is changed?
The only thing that I can think that you mean is that the index does not change in the editor - but I cannot imagine why anyone would want that, or that it would be useful. The index can only change within a running program.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
hi
I need to print text but the font height has to be configurable.
I know I can change the font size at run time, but changing the font size changes both height and width proportioally.
For example I need to increase the witdh X2 ,and the height X 4.
Thanks!
|
|
|
|
|
Fonts are graphical representation of characters and are designed to resize proportionally. If you need to resize them disproportionately, then you'll need to transform them.
One way would be to either create a new Graphics device or to adjust your math - if possible - to account for the transformation you'll be performing to the Graphics object.
To perform the transformation, you can use a myriad of methods on the Graphics class - all documented in the .NET Framework SDK. One such method follows:
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
class Test : Form
{
static void Main()
{
Application.Run(new Test());
}
Test()
{
StretchLabel lbl = new StretchLabel();
Controls.Add(lbl);
lbl.Dock = DockStyle.Fill;
lbl.ScaleHeight = 4f;
lbl.Font = new Font(Font.FontFamily, 20f);
lbl.ScaleWidth = 2f;
lbl.Text = "Sample";
Text = "Sample";
}
}
class StretchLabel : Label
{
SizeF size = SizeF.Empty;
float scaleWidth = 1f;
float scaleHeight = 1f;
[DefaultValue(1f)]
public float ScaleWidth
{
get { return scaleWidth; }
set { scaleWidth = value; }
}
[DefaultValue(1f)]
public float ScaleHeight
{
get { return scaleHeight; }
set { scaleHeight = value; }
}
protected override void OnTextChanged(EventArgs e)
{
using (Graphics g = CreateGraphics())
size = g.MeasureString(Text, Font, (SizeF)Size);
base.OnTextChanged(e);
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
g.ScaleTransform(scaleWidth, scaleHeight, MatrixOrder.Append);
g.DrawString(Text, Font, new SolidBrush(ForeColor), PointF.Empty);
base.OnPaint(e);
}
} Pay close attention to the Graphics.ScaleTransform , which I recommend reading about in the .NET Framework SDK.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
|
I think I got it to do what I want. Here is the code
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Drawing.Drawing2D;
namespace FontSizeTest
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtH;
private System.Windows.Forms.TextBox txtW;
private System.Windows.Forms.TextBox txtStr;
private System.Windows.Forms.Button btnGo;
private System.Windows.Forms.PictureBox pictureBox1;
private System.ComponentModel.IContainer components;
public Form1()
{
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form 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.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtH = new System.Windows.Forms.TextBox();
this.txtW = new System.Windows.Forms.TextBox();
this.txtStr = new System.Windows.Forms.TextBox();
this.btnGo = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// notifyIcon1
//
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.Visible = true;
//
// panel2
//
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.txtH);
this.panel2.Controls.Add(this.txtW);
this.panel2.Controls.Add(this.txtStr);
this.panel2.Controls.Add(this.btnGo);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 165);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(336, 80);
this.panel2.TabIndex = 12;
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.Location = new System.Drawing.Point(164, 30);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(128, 16);
this.label2.TabIndex = 16;
this.label2.Text = "Height (Millimeters)";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.Location = new System.Drawing.Point(20, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(128, 16);
this.label1.TabIndex = 15;
this.label1.Text = "Width (Millimeters)";
//
// txtH
//
this.txtH.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtH.Location = new System.Drawing.Point(164, 54);
this.txtH.Name = "txtH";
this.txtH.Size = new System.Drawing.Size(64, 20);
this.txtH.TabIndex = 14;
this.txtH.Text = "15.00";
//
// txtW
//
this.txtW.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtW.Location = new System.Drawing.Point(20, 54);
this.txtW.Name = "txtW";
this.txtW.Size = new System.Drawing.Size(64, 20);
this.txtW.TabIndex = 13;
this.txtW.Text = "80.00";
//
// txtStr
//
this.txtStr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtStr.Location = new System.Drawing.Point(20, 6);
this.txtStr.Name = "txtStr";
this.txtStr.Size = new System.Drawing.Size(268, 20);
this.txtStr.TabIndex = 12;
this.txtStr.Text = "This is the test string. change it or the box size";
//
// btnGo
//
this.btnGo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnGo.Location = new System.Drawing.Point(288, 40);
this.btnGo.Name = "btnGo";
this.btnGo.Size = new System.Drawing.Size(48, 32);
this.btnGo.TabIndex = 11;
this.btnGo.Text = "&Go";
this.btnGo.Click += new System.EventHandler(this.btnGo_Click);
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.White;
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(336, 165);
this.pictureBox1.TabIndex = 13;
this.pictureBox1.TabStop = false;
this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(336, 245);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.panel2);
this.Name = "Form1";
this.Text = "Form1";
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
void PrintScale(
Graphics gfx,
float widthMM, float heightMM, string text,
Brush color, float xMM, float yMM)
{
xMM /= widthMM;
yMM /= heightMM;
gfx.ScaleTransform(widthMM, heightMM, MatrixOrder.Append);
gfx.DrawString(text, new Font(Font.FontFamily, 1),color,xMM,yMM);
//restore
gfx.ScaleTransform(1/widthMM, 1/heightMM);//, MatrixOrder.Append);
}
void DoPaint2 (System.Windows.Forms.PaintEventArgs e)
{
SizeF sz;
string str5 = txtStr.Text;
int strLen = str5.Length;
float boxW=float.Parse(txtW.Text), boxH=float.Parse(txtH.Text);
float charW, charH;
float scaleX, scaleY;
Pen pen ;
e.Graphics.PageUnit = GraphicsUnit.Millimeter;
sz = e.Graphics.MeasureString(str5,new Font(Font.FontFamily,1)); //Find string length using font of size 1
charH = sz.Height; // character height
charW = sz.Width / strLen; // avg. character width
scaleY = boxH / charH;
scaleX = (boxW/strLen) / charW;
pen = new Pen(Brushes.Red,0.2f);
e.Graphics.DrawRectangle(pen, 5f,5f,boxW,boxH);
PrintScale(e.Graphics,scaleX,scaleY,str5, Brushes.Black,5f,5f);
}
private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
try
{
DoPaint2 (e);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnGo_Click(object sender, System.EventArgs e)
{
pictureBox1.Refresh();
}
}
}
|
|
|
|
|
Hi,
I was making a very simple windows application in C#. the application runs fine when i create a new windows application but when i add a button on the form a problem occurs. Although the application compiles correctly, but when i run the application it gives an exception saying,
"An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll
Additional information: Overflow or underflow in the arithmetic operation."
I am really confused here because i am placing the button on the form using the form designer. i have not even touched the code itself. i also tried to add the button to the form by coding myself but the same problem exists.
please help me i will be really thankful.
bye.
|
|
|
|
|