|
What time do you want to display? Please be a bit more specific about what you're trying to do.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
TextBox1.Text = DateTime.Now.ToShortDate();
---
Eat Bytes Everyday.
Zakaria Bin Abdur Rouf
zakaria7@gmail.com
|
|
|
|
|
I had a Menuitem with that i handeled the Click even for it by: Click += new System.EventHandler( .....
than after i added a range to that menuitem : Blabla[i].MenuItems.AddRange(XYZ);
and did the same
Blabla[i].Click += new System.EventHandler(method);
Now....when i'm clicking on the menuitem Blabla , nothing happens (unless i add an empty Range... wich equals to not adding range at all)
any1 knows how can i fix that?
Thx ahead!!!
|
|
|
|
|
vedmack wrote: Why AddRange to to certain MenuItem disables the EventHandler of that MenuItem???
MSDN topic of MenuItem.Click Event[^] clearly states that the event is not raised, if the MenuItems property for the MenuItem contains any items.
vedmack wrote: how to avoid it?
I doubt you can suppress this behaviour and wonder why you want to. In case you want to get informed that a menu item's list of menu items is going to be displayed, you can subscribe to the MenuItem.Popup Event[^].
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi
I need some link for a software which I can use in my own dot net application to capture number of still cars via Handheld device running on Win CE 4.2 or later. I've tried some I found after googling but they dont serve the purpose.
Thanks a lot.
Don't Quit
|
|
|
|
|
Every one that I've seen, that's any good, requires training for the plate your going to read (because of the different fonts used in each plate), or isn't free or anywhere close to cheap. Some are even proprietary and only exist in the vendors own systems and are not for sale at all.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave!Thanks for you reply.I'm aware of the fact that this software is not going to be available for free. Can u Pls give me links which works on the WinCE 4.2 or better platform.
Don't Quit
|
|
|
|
|
Windows CE?? I don't know of any. It's full Windows 2000/XP/2003 or nothing, AFAIK.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Please help;
For a couple days I've been battling with writing a report that has to tables linked by a Inner join.
I think I found a work around. I'm using an SQL SERVER database.
Crystal was creating the following query:
SELECT t_EMPINFO.c_EmpFName,
t_EMPINFO.c_EmpCode,
t_Employee_Salary.c_TotalIncome, t_Employee_Salary.c_TotalDeduction,
t_Employee_Salary.c_TotalSalary
FROM t_EMPINFO INNER JOIN
t_Employee_Salary ON t_EMPINFO.c_EmpID = t_Employee_Salary.c_EmpId
WHERE (t_EMPINFO.c_Softdelete = '1') AND (t_Employee_Salary.c_SoftDelete = '1') AND (t_Employee_Salary.c_Year = 'PARAMETER1') AND (t_Employee_Salary.c_Month = 'PARAMETER2')
IN Above Query In place of PARAMETER1 and PARAMETER2 I want to pass Differnt value at the run time (e.g 2007 , 01 ) how it's set dynamically
I have questions though:
1) Is it possible to change the sql that crystal generates without writing my own sql command?
Thanks again for all of your help on this!
|
|
|
|
|
ReportDocument rd = new ReportDocument();
rd.Load(ReportPath);
rd.SetParameterValue("@PARAMETER1", "valueAsYouWish");
crystalReportViewer1.ReportSource = rd;
|
|
|
|
|
Please help;
For a couple days I've been battling with writing a report that has to tables linked by a Inner join.
I think I found a work around. I'm using an SQL SERVER database.
Crystal was creating the following query:
SELECT t_EMPINFO.c_EmpFName,
t_EMPINFO.c_EmpCode,
t_Employee_Salary.c_TotalIncome, t_Employee_Salary.c_TotalDeduction,
t_Employee_Salary.c_TotalSalary
FROM t_EMPINFO INNER JOIN
t_Employee_Salary ON t_EMPINFO.c_EmpID = t_Employee_Salary.c_EmpId
WHERE (t_EMPINFO.c_Softdelete = '1') AND (t_Employee_Salary.c_SoftDelete = '1') AND (t_Employee_Salary.c_Year = 'PARAMETER1') AND (t_Employee_Salary.c_Month ='PARAMETER2')
IN Above Query In place of PARAMETER1 and PARAMETER2 I want to pass Differnt value at the run time (e.g 2007 , 01 ) how it's set dynamically
I have questions though:
1) Is it possible to change the sql that crystal generates without writing my own sql command?
Thanks again for all of your help on this!
|
|
|
|
|
ReportDocument rd = new ReportDocument();
rd.Load(pathOfCrystalReport);
rd.SetParameterValue("@PARAMETER1", "Value");
crystalReportViewer1.ReportSource = rd;
|
|
|
|
|
hi everyone,
can somebody tell me how to hide the notify icon from the system tray after quitting the application!! it's still stuck there untill i move the cursor on it only then it disappears, if i didnt, it'll just keep on duplicating each time im running my app!! please help.
thanx
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I've had similar problems. This is the best I came up with:
1)
create it in your main thread, not in some other thread
2)
Dispose of it in the Dispose method of your main form
protected override void Dispose(bool disposing) {
if(disposing) {
if (components!=null) components.Dispose();
notifyIcon.Dispose();
}
}
3)
If your program crashes, or you abort it using a debugger, the notify icon
remains visible until you hover over it.
Luc Pattyn
|
|
|
|
|
thanx that looks quite handy!! i'll give it a try now.
thank you Luc!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
just used the dispose methode!! thank you Luc
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
hi
i want to use Store Procedure for Insert,Update and Delete data in sql2005 and VC# 2005,but how to do?
please give an example or article or source for me.
thanks
|
|
|
|
|
When you create your SqlCommands, set the CommandType to CommandType.StoredProcedure. Also add the parameters needed by the stored procedure. E.g. something like this:
using (SqlConnection mySqlConnection = getConnection())
{
SqlCommand insertCommand = new SqlCommand("[dbo].[MY_INSERT_PROCEDURE]");
insertCommand.CommandType = CommandType.StoredProcedure;
insertCommand.Parameters.Add("@StringField", SqlDbType.VarChar);
insertCommand.Parameters["@StringField"].Value = "Nice new string";
insertCommand.Connection = mySqlConnection;
insertCommand.ExecuteNonQuery();
}
|
|
|
|
|
Hello all,
I was wondering if anyone of you could help me with inserting custom hyper links on a RichTextBox control. what i mean is, i want to insert a hyperlink of the form "link_here", and NOT "www.link_here.com", which the rtfbox can detect using DetectURLs...... On clicking on it, i want to open a messagebox.....
i would really be thankful to anyone who could help me....
-- modified at 13:38 Sunday 24th December, 2006
|
|
|
|
|
Have you tried searching the articles on this site? I recall an article on "arbitrary links" in a rich text box control.
|
|
|
|
|
Any one have written C# modbus code
SAS
|
|
|
|
|
A quick Google search of "C# modbus" seems to turn up some good hits.
|
|
|
|
|
The following code shows "Column1" as column caption.
Why ?
How to force DataGrid to display "Caption" as column caption ?
using System.Windows.Forms;
using System.Data;
static class Program {
static void Main() {
Application.Run(new Frm());
} }
class Frm : Form {
public Frm() {
DataTable dt = new DataTable();
DataColumn column = new DataColumn();
column.Caption = "Caption";
dt.Columns.Add(column);
DataGrid dg= new DataGrid();
this.Controls.Add(dg);
dg.SetDataBinding(dt, "");
} }
Andrus
|
|
|
|
|
The DataGrid uses the DataColumn's ColumnName as the column caption. The ColumnName defaults to Column1, Column2, etc., so that's why the code shows "Column1" as the caption. If you set the DataColumn's ColumnName to "Caption", then that will be the caption displayed in the DataGrid.
|
|
|
|
|
The following code causes error in Update() line
Npgsql.NpgsqlException was unhandled by user code
Why exception is not catched ?
catch MUST catch all exceptions!
------ code:
int RowsUpdated;
try {
RowsUpdated = datapter.Update(changes);
}
catch {
System.Windows.Forms.MessageBox.Show("error");
transact.Rollback();
throw;
}
error message details are:
Npgsql.NpgsqlException was unhandled by user code
Message="ERROR: 23505: duplicate key violates unique constraint \"konto_pkey\""
Source="Npgsql"
BaseMessage="duplicate key violates unique constraint \"konto_pkey\""
Code="23505"
Detail=""
ErrorSql="update \"firma1\".\"konto\" set \"kontonr\" = '2', ....
File="nbtinsert.c"
Hint=""
Line="277"
Position=""
Routine="_bt_check_unique"
Severity="ERROR"
Where=""
StackTrace:
at Npgsql.NpgsqlConnector.CheckErrors() in c:\Desenvolvimento\NpgsqlBuildOficial2.0\src\Npgsql\NpgsqlConnector.cs:line 359
at Npgsql.NpgsqlConnector.CheckErrorsAndNotifications() in c:\Desenvolvimento\NpgsqlBuildOficial2.0\src\Npgsql\NpgsqlConnector.cs:line 410
at Npgsql.NpgsqlCommand.ExecuteCommand() in c:\Desenvolvimento\NpgsqlBuildOficial2.0\src\Npgsql\NpgsqlCommand.cs:line 1479
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior cb) in c:\Desenvolvimento\NpgsqlBuildOficial2.0\src\Npgsql\NpgsqlCommand.cs:line 633
at Npgsql.NpgsqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior cb) in c:\Desenvolvimento\NpgsqlBuildOficial2.0\src\Npgsql\NpgsqlCommand.cs:line 601
at System.Data.Common.DbDataAdapter.UpdateRowExecute(RowUpdatedEventArgs rowUpdatedEvent, IDbCommand dataCommand, StatementType cmdIndex)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
Andrus
|
|
|
|