|
hi ....
i wanto write an application that login to my yahoo messanger id that list all my friend list.
how can i do that
|
|
|
|
|
Go to the Yahoo site and look for their documentation on how their program works.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What you tried for this?
What error you got?
tell your error and problem ? we are here to solve your problem?
Regards,
Satips.
|
|
|
|
|
dear im in trouble of how comand in c#.net to run an exe file in a C#.net program .. i anyone knows pls let me know sooner
thanks
thushara
|
|
|
|
|
Hello,
System.Diagnostics namespace contains the Process and ProcessStartInfo class.
the Process class contains a Start method.
This should help you.
All the best,
Martin
|
|
|
|
|
Refer to Process class.
Use this method[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
System.Diagnostics.Process.Start(@"C:\YourFilePath\YourFile.exe");
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Always gotta love the third person who feels they need to give the same answer....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm sorry and I know it's totally unprofessional but take a hint from the guy's post title "ch#.net"
I though he needs a working code snippet instead of reading about some class documentation.
Christian Graus wrote: Always gotta love the third person
Thanks, I love you tooChristian
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: Thanks, I love you tooChristian
My point is always to wait for an answer with at least a sign of "tried it myself and failed" statement!
All the best,
Martin
|
|
|
|
|
Hi all. I have an application with two listviews that implement drag and drop (cod from this site), and when I'm dropping an item in the other listview, I need to get the address of the listview where the drag began.
I have an event: protected override void OnDragDrop(DragEventArgs drgevent)
How can I get, from drgevent, the listview who is the father of the control?
Regards,
Diego F.
|
|
|
|
|
I think your event should have an (object sender) and you could cast that into a ListView to have a reference. I thought all events always had (object sender) , but obviously they don't. You could probably add it manually.
protected override void OnDragDrop(object sender, DragEventArgs drgevent)
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Thank you, but I tried that and it gets a compilation error.
Regards,
Diego F.
|
|
|
|
|
you have to change everything that calls the event of course. I'll try to make some testcode when I have a minute. If you have some test-code you could send it...
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
I get the code from here and I'm dealing with the onDragDrop event.
My idea is to add to the LargeImageList in the second ListView the image from the drag item in the first ListView. I tried that:
int indice = ((ListViewItem)data.DragItems[i]).Index;
ListView lv = data.ListView; base.LargeImageList.Images.Add(lv.LargeImageList.Images[indice]);
But it doesn't work.
Regards,
Diego F.
|
|
|
|
|
I get the code from here and I'm dealing with the onDragDrop event.
My idea is to add to the LargeImageList in the second ListView the image from the drag item in the first ListView. I tried that:
int indice = ((ListViewItem)data.DragItems[i]).Index;
ListView lv = data.ListView; base.LargeImageList.Images.Add(lv.LargeImageList.Images[indice]);
But it doesn't work.
Regards,
Diego F.
|
|
|
|
|
I changed the code and now it is that:
if (data.ListView.LargeImageList.Images.Count > 0)
foreach (Image im in data.ListView.LargeImageList.Images)
base.LargeImageList.Images.Add(im);
Now it partially works. The problem is that if I open two documents and move items from one to the other, each one mantain it's imagelists and we have:
listview 1 listview2
---------- ---------
image1_1 image2_1
now I move image2_1 to listview1 and it takes the picture from image1_1, so I get two images with the same picture.
Regards,
Diego F.
|
|
|
|
|
Hi,
I have an application which runs without any prob but takes 5 hours to run.
I am readin 112*8 dBase tables an write in 8 sql tables.
Please help me.
Regards
Ruwandi
rkherath
|
|
|
|
|
Have you made any attempt to find out where the applicaction's bottlenecks are? To find out where the application is inefficiently?
Since you have provided no useful information for us to help you, you will have to do some work in order to narrow down the location of the code that is not performing well.
|
|
|
|
|
Hi,
ya its like this i have created oledb connection to create connection to the dbase tales.
I have 112 folders containing 6tdbase tables in each.
coding:
//reading from dbase
public void PluFill(string DBFpath)
{
try
{
oledbConnectionMethod(DBFpath);
oledbselctString = "SELECT PLU_NUM AS SKU,DESC AS Description,O_CP*Q_OPEN AS OpeningCP,Q_OPEN AS OpeningQty,Cost_Price*Qty AS ClosingCP,Qty AS ClosingQty FROM PLU";
oledbSelectMethod(oledbselctString);
oledbDataAdapterMethod();
oledbDataadapter.Fill(this.dsPlu);
}
catch (Exception Exp)
{
AppendToFile(DBFpath, Exp.ToString() + oledbselctString.ToString());
}
}
//writing to sql:
public void PluUpdate(string locationNam,string Year,string Month)
{
//opening the sql connection
if (sqlConnection.State == ConnectionState.Closed)
{
sqlConnection.Open();
}
//passing the dataset values to the data table
DataTable dt = dsPlu.Tables[0];
SqlCommand sqlInsertCommand=new SqlCommand();
sqlInsertCommand.Connection = sqlConnection;
//reading from the data table and wrinting to the sql table
foreach (DataRow dr in dt.Rows)
{
try
{
if (dr["OpeningCP"].ToString() == "")
dr["OpeningCP"] = 0;
if (dr["OpeningQty"].ToString() == "")
dr["OpeningQty"] = 0;
if (dr["ClosingCP"].ToString() == "")
dr["ClosingCP"] = 0;
if (dr["ClosingQty"].ToString() == "")
dr["ClosingQty"] = 0;
sqlInsertCommand.CommandText = "Insert into tblBalance_Monthly(cYear,cMonth,cLocationCode,cCategoryCode,cSubCategoryCode,cSKU,cDescription,nO_CostPrice,nO_Qty,nC_CostPrice,nC_QTY) values(\'" + Year + "\',\'" + Month + "\',\'" + locationNam + "\',\'" + dr["SKU"].ToString().Substring(0, 2) + "\',\'" + dr["SKU"].ToString().Substring(0, 3) + "\',\'" + dr["SKU"] + "\',\'" +
dr["Description"].ToString() + "\'," + dr["OpeningCP"] + "," + dr["OpeningQty"] + "," + dr["ClosingCP"] + "," + dr["ClosingQty"] + ")";
sqlDataAdapter.InsertCommand =sqlInsertCommand;
sqlInsertCommand.ExecuteNonQuery();
}
catch (Exception Exp)
{
AppendToFile(locationNam, Exp.ToString() + sqlInsertCommand.ToString());
}
}
}
//and i read the locations of the dbase tables through a class and for each location i perform writing and reding
void callTranfer(string Year, string Month, DateTime TXNDATE, string User_ID, string DriverLoc)
{
//object []retArray=new object[2];
DBCon dbcon = new DBCon();
DataTable dt = dbcon.LocationsFill().Tables[0];
Transfer.TransferClass tran = new Transfer.TransferClass();
int value=0;
foreach (DataRow dr in dt.Rows)
{
string folNam = (dr["Dir"].ToString());
DirectoryInfo forlderPath = new DirectoryInfo(string.Concat(DriverLoc, folNam));
//trnsName = forlderPath.ToString();
tran.PluFill(forlderPath.ToString());
tran.PluUpdate(folNam,Year,Month);
tran.Stk_tranRecieptFill(forlderPath.ToString());
tran.Stk_tranRecieptUpdate(Year, Month, folNam, TXNDATE, User_ID);
tran.Stk_tranIssuesFill(forlderPath.ToString());
tran.Stk_tranIssuesUpdate(Year, Month, folNam, TXNDATE, User_ID);
tran.salesFill(forlderPath.ToString());
tran.SalesUpdate(Year, Month, folNam, TXNDATE, User_ID);
tran.adjustmentsFill(forlderPath.ToString());
tran.adjustmentsUpdate(Year, Month, folNam, TXNDATE, User_ID);
tran.reclassificationsFromFill(forlderPath.ToString());
tran.reclassificationsFromUpdate(Year, Month, folNam, TXNDATE, User_ID);
tran.reclassificationsToFill(forlderPath.ToString());
tran.reclassificationsToUpdate(Year, Month, folNam, TXNDATE, User_ID);
DisplayText(folNam);
value = value + 1;
backgroundWorker1.ReportProgress(value);
}
}
plz help me
Regards
Ruwandi
rkherath
|
|
|
|
|
How many rows are you updating?
If it's a lot you might want to concatenate like 100 or more inserts before executing (delimit with ";") (INSERT INTO ... (...) VALUES (...);INSERT INTO ...
You also might want to try the StringBuilder object instead of concatenating strings.
hope this helps
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
Well in one table i ahve to update more than 25000 for sure
also can you explain the answer bit more.
I am really in need of this.
Regards
Ruwandi
rkherath
|
|
|
|
|
You need to not make a full round trip for each row. Instead, create SQL that updates several records for each round trip. This is your bottleneck.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
well instead of concatening string like this:
string test = "Test " + var + "\n'testmore'" + anothervar;
do this:
StringBuilder test = new StringBuilder("Test ");
test = test.Append(var);
test = test.Append("\n'testmore'");
test = test.Append(anothervar);
if you pass more than one query into the ExecuteNonQuery function (for example 100 queries) you save 99 calls to the ExecuteNonQuery function (which itself goes through enough other functions)
I'm not sure how this is done with SQL-Server but for Ms-Acces eg, the query will pass through the ExecuteNonQuery through the OleDb layer, through the mdac layer to the database.
Hope this helps.
|
|
|
|
|
You're gonna have to give us some (a lot) more information before we can help you. Have you stepped through your code, or analyzed it in some other way? Do you know what takes the most time? Have you timed individual lines of code or methods?
Please do so and provide us with the details.
I don't know much about code analysis, but System.Diagnostics has a really cool stopwatch
gluck!
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|