|
stil it gives the same error. and there is no property called "BackgroundImage".
|
|
|
|
|
Sorry it's the Image property on the PictureBox control.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
after using image property also,it gives the same error.
In FromFile we have to give the filename or the path of the image.
asdfd fghdfg
|
|
|
|
|
Kmurthy wrote: In FromFile we have to give the filename or the path of the image.
They're the same thing aren't they, you can use a relative path or an absolute one as long as the image is somewhere on the filesystem.
Check the documentation for the Image object and see which methods are supported by the CF (I don't use the compact framework so I'm guessing (intuitively) here).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
i m trying the to execute the code the following error occuring.
"Not all code path returns a value"
public DataSet RSopen(string sQuery, OleDbConnection ConnObj, string szUseTransactionObj)
{
try
{
m_ConnObj=ConnObj;
//szUseTransactionObj="";
m_Adapter.SelectCommand = new OleDbCommand(sQuery, m_ConnObj);
if ((szUseTransactionObj == "YES"))
{
m_Adapter.SelectCommand.Transaction = m_DataConrol.GetTransactionObj();;
}
//szUseTransactionObj="";
m_Adapter.Fill(m_Dataset);
m_CurrentRow = 1;
m_Table = m_Dataset.Tables["Chartofacct"];
m_TotalRows = m_Table.Rows.Count;
return m_Dataset;
}
catch (Exception e)
{
e.ToString();
}
}
Shahzad
|
|
|
|
|
try out
public DataSet RSopen(string sQuery, OleDbConnection ConnObj, string szUseTransactionObj)
{
try
{
m_ConnObj=ConnObj;
//szUseTransactionObj="";
m_Adapter.SelectCommand = new OleDbCommand(sQuery, m_ConnObj);
if ((szUseTransactionObj == "YES"))
{
m_Adapter.SelectCommand.Transaction = m_DataConrol.GetTransactionObj();;
}
//szUseTransactionObj="";
m_Adapter.Fill(m_Dataset);
m_CurrentRow = 1;
m_Table = m_Dataset.Tables["Chartofacct"];
m_TotalRows = m_Table.Rows.Count;
return m_Dataset;
}
catch (Exception e)
{
e.ToString();
return new m_Dataset();
}
}
rahul
|
|
|
|
|
The reason you get this compilation error is that you method declares that it will return an instance of DataSet, but not all paths return such an instance. Look at what happens if an exception is raised.
To solve this, you need only to put this line:
Shahzad.Aslam wrote: return m_Dataset;
outside of the try{}catch{} block.
public DataSet RSopen(string sQuery, OleDbConnection ConnObj, string szUseTransactionObj)
{
try
{
m_ConnObj=ConnObj;
m_Adapter.SelectCommand = new OleDbCommand(sQuery, m_ConnObj);
if ((szUseTransactionObj == "YES"))
{
m_Adapter.SelectCommand.Transaction = m_DataConrol.GetTransactionObj();;
}
m_Adapter.Fill(m_Dataset);
m_CurrentRow = 1;
m_Table = m_Dataset.Tables["Chartofacct"];
m_TotalRows = m_Table.Rows.Count;
}
catch (Exception e)
{
e.ToString();
}
return m_Dataset;
}
-- modified at 6:27 Monday 31st July, 2006
|
|
|
|
|
Hi all.
Quick question, I want to use cab file to update my app instead of reinstalling everytime I need to update, so I set the installer to create cab files, no I sit with a zip folder with 300 files in it, how do I actualy use them, also I have no idea what the cab files are, looke like it uses some kind of encryption with the anming of the files.
Can anyone help please or suggest where to look.
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi all,
How to set a startup form in c# windows application ?
|
|
|
|
|
In the Main method there will be a line like this:
Application.Run(new StartUpForm());
Change the form that is instantiated.
|
|
|
|
|
u can set the startup object or form from VS project menus project property
option
rahul
|
|
|
|
|
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace PrintForm
{
///
/// Summary description for frmTest.
///
public class frmTest : System.Windows.Forms.Form
{
#region UI Variables
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
#endregion
#region Constructors
public frmTest()
{
InitializeComponent();
}
#endregion
#region Windows Form Designer generated code
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.btnPrint = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// btnPrint
//
this.btnPrint.Location = new System.Drawing.Point(104, 328);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(120, 40);
this.btnPrint.TabIndex = 1;
this.btnPrint.Text = "Print this form";
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 32);
this.label1.TabIndex = 2;
this.label1.Text = "Name";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 24);
this.label2.TabIndex = 3;
this.label2.Text = "IC";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// button1
//
this.button1.Location = new System.Drawing.Point(24, 128);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(56, 32);
this.button1.TabIndex = 4;
this.button1.Text = "Receipt";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(128, 32);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(208, 20);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "textBox1";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(128, 80);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(208, 20);
this.textBox2.TabIndex = 6;
this.textBox2.Text = "textBox2";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(128, 136);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(208, 20);
this.textBox3.TabIndex = 7;
this.textBox3.Text = "textBox3";
//
// frmTest
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(360, 390);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnPrint);
this.Name = "frmTest";
this.Text = "Test Form";
this.ResumeLayout(false);
}
#endregion
#region Main
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new frmTest());
}
#endregion
#region UI Event Handlers
private void btnPrint_Click(object sender, System.EventArgs e)
{
try
{
this.Cursor = Cursors.WaitCursor;
PrintForm pf = new PrintForm(this);
pf.Print();
}
catch (Exception ex)
{
MessageBox.Show(this, ex.Message);
}
finally
{
this.Cursor = Cursors.Default;
}
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
int counter;
counter = 50;
int i;
Random r = new Random();
for(i =0;i
|
|
|
|
|
Hi,
Can u make ur problem more clearer please. tell me wht u want to do. is it just u want to print a form. or something like that.
Vipin
|
|
|
|
|
hi thanks for all help.. managed to log in only now.. i actually mean i have done a print application..however when i link it to my main application, it cant work as now i have 2 main entry point..how do i go abt doing this??
really appreciate yr help vipin
|
|
|
|
|
ok i got u now. What u have to do is from the print application u have developed remove the code. and paste it in the other form. the code u have to remove is
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
and since u have developed the print application and other application differently. u might have to remove the code only form the print application. there is no need to do anything else on the other form ok. even after doing this if its still not working then u just right click the solution of the project take properties there in the general tab u will see StartUp object there u set the form which u want to run first. ok do let me if it works ok.
Vipin
|
|
|
|
|
hi vipin i have tried doing yr method but it still cant work ... hhmm..think its rather hard to communicate like that.. maybe u can give me yr email and we can contact directly through that.. i really need yr help as my sch proj dateline is coming.. thanks
|
|
|
|
|
vipin1981@gmail.com and what is urs
Vipin
|
|
|
|
|
joyful_neon@hotmail.com
can i add u in instant messenger?
|
|
|
|
|
i dont use msn messenger. if u have yahoo messenger or if u have google account register in orkut.com and let me know. i will add u to my friends list. and by the by where r u from.
Vipin
|
|
|
|
|
hi vikin i have jus sent an email to u.. i dunno if u could actually open the attachment from there.. but like i mentioned in the email, i will add u in yahoo messenger when i get home.. so for now guess i jus keep trying. . thanks man
|
|
|
|
|
actually i cant access mails during my office hours. any way i will check out during our break. till then post ur doubt here. If i know i will surely help u.
Vipin
|
|
|
|
|
I am placing a textBox control in richtext Box.So by default the cursor will come to richtextbox control.How to place the cursor in textbox which is inside richtextbox.
|
|
|
|
|
It sounds something wierd "textbox in richtextbox". But...
if you want the cursor to come first in textbox, then change
the TabIndex property from textbox and richtextbox.
// Cursor go to textbox
this.textbox.TabIndex = 0;
this.richtextbox.TabIndex = 1;
// Cursor go to richtextbox
this.textbox.TabIndex = 1;
this.richtextbox.TabIndex = 1;
|
|
|
|
|
Personally speaking, this sounds like a REALLY stupid design. Why you would put a textbox inside a richtext box is beyond all normal reasoning. However, you need to either change tab order or do a textbox1.Focus() call.
|
|
|
|
|
Hi all!
Sorry for my poor english....
Here my problem, I created WebBrowser,and now I need to disable, "Select_all" and "Copy" fulctions in browser.
I disabled ContextMenu, but keys Ctrl+A, Ctrl+C working.
I tryed to using ProcessCmdKey,ProcessDialogKey,for catching this Keys but "Ctrl+A, Ctrl+C" are not catching....
If somebody knows how do it, please help me...
P.S. Sorry for my mistakes.
|
|
|
|