|
Not sure if it'd work but how about using the C# "loader" program to have the ShowInTaskbar property of the main form set to false? I don't think this will work because if you simply execute the program (I.e. you can't link into it) then it will display it's icon.
There may be an API for this but as I hate WinXPs guts I have no idea on how to do this
|
|
|
|
|
Ed.Poore wrote: Not sure if it'd work but how about using the C# "loader" program to have the ShowInTaskbar property of the main form set to false?
Interesting, I didn't think of that. I'll have to give it a try and see what happens. Cheers.
|
|
|
|
|
Depends on how you load the program, I'm pretty sure if you just the shell to execute it then it won't work.
|
|
|
|
|
Ed.Poore wrote: I'm pretty sure if you just the shell to execute it then it won't work.
Yes, I am just using the shell to execute. From the Process class I can get the handle of the main window, but now I need to figure out if there is a way to use that to stop it from displaying a taskbar button.
|
|
|
|
|
|
Okay, I think I found a way to stamp out one of the toolbar buttons, so that will do for me. I had to import functions from user32.dll and use SetWindowLong with the WS_EX_TOOLWINDOW extended window style. That works fine so long as I hide the window (with ShowWindow and SW_HIDE) first and then show it again afterwards.
I'd tried using ITaskbarList to remove the taskbar button but that only worked until you clicked back on the remaining button and it recreated the missing button.
|
|
|
|
|
Good to see that it's beginning to come together.
|
|
|
|
|
hi,
how do i make my search go over my entire table, i can do it on one colmn:
db1DataSet.Tabel1.DefaultView.RowFilter = " column1 LIKE '%" + txt_sort.Text + "%' ";
dataGridView1.DataSource = db1DataSet.Tabel1.DefaultView;
can somebody help?
thx
|
|
|
|
|
faladrim wrote: how do i make my search go over my entire table
What do you mean? A search will go over your entire table (i.e. every row in the table matching the row filter). Do you mean how do you filter multiple columns? In that case you can just AND (or OR) your filters together:
MyDataTable.DefaultView.RowFilter = "column1 LIKE '%" + myCol1String + "%' AND column2 LIKE '%" + myCol2String + "%'";
|
|
|
|
|
what if i have 100 columns??
|
|
|
|
|
faladrim wrote: what if i have 100 columns??
Then it is likely that your database needs redesigning.
Disclaimer:
I understand that there are cases where tables require 100+ columns. But, from what I've seen, most tables of this size should in fact be broken up into smaller tables with one to one relationships.
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
even 10 i find alot to write the query over and over for every colmn
i need something were i could say:
allcolmns like'%"+textbox.text"%'";
or is there no sutch thing?
|
|
|
|
|
i am trying to figger something out to recreate the query
for (colnr =1; colnr =colamount;colnr++)
{
string colname= dataset.table.colmns[colnr].tostring();
}
by this i get all the names of the colmns wright?
so if i could get this in the query, ill try it for one column:
string colname = dataset.table.colmns[1].tostring(); // get name of col 1
db1DataSet.Tabel1.DefaultView.RowFilter = colname+" LIKE '%" + txt_sort.Text + "%' ";
dataGridView1.DataSource = db1DataSet.Tabel1.DefaultView;
this should do the same as entering the real name of the column just befor" LIKE"
but here i get an error...
|
|
|
|
|
int colnr;
int colamount = db1DataSet.Tables[0].Columns.Count;
string cFilter = "";
for (colnr = 0; colnr < colamount; colnr++)
{
cFilter = cFilter + (cFilter.Length > 0 ? " OR [" : "[") + db1DataSet.Tables[0].Columns[colnr].ColumnName + "] LIKE '%" + txt_sort.Text + "%' ";
}
db1DataSet.Tables[0].DefaultView.RowFilter = cFilter;
dataGridView1.DataSource = db1DataSet.Tables[0].DefaultView;
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
thxxx
im sure it will work, but i most have made an mistake somewere cause i get this error:
System.Data.EvaluateException was unhandled
Cannot perform 'Like' operation on System.Int32 and System.String."
this only happens on a colmn named numbers, in acces i specifided it as text, but i wrote a function to make sure it were numbers.
have you ever come across anything like this? its probebly a stupid mistake
anyway thx for the help
grz
|
|
|
|
|
faladrim wrote: what if i have 100 columns??
So firstly I agree with EricDV, you probably need to rethink the way you are organizing your data.
Secondly, you can create the query string in a loop. Something like this (untested code):
StringBuilder sb = new StringBuilder;
for (int i=0; i <myTable.Columns.Count; i++)
{
sb.Append(myTable.Columns[i].ColumnName + " LIKE '%" + colFilters[i] + "%'");
if (i <myTable.Columns.Count-1)
sb.Append(" AND ");
}
.
.
.
MyTable.DefaultView.RowFilter = sb.ToString();
|
|
|
|
|
Hi.
I want to send voice over phone line.
Suppose I have a wav file, I want to play it on phone line.
I think there is a command for this purpose
Best wishes
|
|
|
|
|
Hi,
You have to use TAPI 3.0 for that.
Codeproject has one article for that,please go through that article.You will definatly get help.
<marquee>nishu
|
|
|
|
|
How can we invoke subclass(derive class) default constructor and base class parametarized constructor at a time from derive class parametarized constructor, Is there any way?
BSK
|
|
|
|
|
No. You can only invoke one contructor in the base class.
---
b { font-weight: normal; }
|
|
|
|
|
kumar.bs wrote: How can we invoke subclass(derive class) default constructor and base class parametarized constructor at a time from derive class parametarized constructor, Is there any way?
I don't think I understand your question. You want to invoke the base constructor from the derived constructor. The base constructor has values, the derived is the default (parameterless) constructor. I'm with you so far. But I don't understand "at a time from derive class parametarized constructor".
class A
{
A(int number, string text)
{
}
}
class B : A
{
B() : base (1, "some text")
{
}
}
B b = new B();
|
|
|
|
|
class A
{
A(int number, string text)
{
// Do stuff
}
}
class B : A
{
B()
{}
B(int i,string str) : base (1, "some text")
{
// Do stuff
}
}
B b = new B(1,"test");
I want to invoke Class B's Default contructor(as well) along with Class A's parametarised constructor, is that possible?
bsk
|
|
|
|
|
kumar.bs wrote: I want to invoke Class B's Default contructor(as well) along with Class A's parametarised constructor, is that possible?
In that situation I create a method called Initialise or some such thing and do something like this:
class B : A
{
B()
{
Initialise();
}
B(int number, string text) : base(number, text)
{
Initialise();
}
private void Initialise()
{
}
}
Also, your code: B(int i,string str) : base (1, "some text") is a bit pointless. What do you do with i and str if you don't do anything with them.
|
|
|
|
|
My Stored procedure in oracle is
CREATE OR REPLACE PROCEDURE GETSOME(ctest out INTEGER) AS
BEGIN
select count(*) into ctest from test;
END;
My Code in C# is
OracleConnection con = GetConnection();
con.Open();
OracleCommand cmd = new OracleCommand("GETSOME", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter op = new OracleParameter("Emp_ID",OracleType.Int32);
op.Direction = ParameterDirection.Output;
cmd.Parameters.Add(op);
cmd.ExecuteScalar();
con.Close();
Its giving me an error
wrong number or types of arguments in call to GETSOME. Can somebody please
explain me what iam doing wrong
|
|
|
|
|
Check the number and type of parameters in your Stored procedure,
and number and type of parameters you are passing to it from your C# code.
Good Luck!
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|