|
Chistain,
I dont understand what you wan to say ! I aleard tried with google api. I have to register on google and it is paid .
One more is i want to search and show .torrent files form many torrent finder sites.
Have you checked the www.torrent-finder.com site. then we will have better idea ? what i want
|
|
|
|
|
Umesh8738 wrote: then we will have better idea ?
A better idea is just to pay for stuff and not use torrents at all.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Hello,
Im using visual studio .NET Version 1.0 and unfortunately because of cash flow reasons i cant upgrade to a new version .. so i would appreciate if answers would be based on the 1.0 version
I made a program who needs to select a desktop computers out of a list taken from the AD and to remote connect the computer and silent install the specified Software.. so far it went good.. but when i have tried to use this code based on a multiply computers (using threads ofcourse) i cant seem to transfer the parameter i want .. i have tried using delegation and to for the function and i haven't succeeded,so i ended up with declaring a private class variable
im adding the code:
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
string s="";<br />
<br />
int count=listBox2.SelectedItems.Count;<br />
Thread[] th=new Thread[count];<br />
<br />
for(int i=0;i!=listBox2.SelectedItems.Count;i++)<br />
{<br />
th[i]=new Thread(new ThreadStart(button1C));<br />
ComputerName=s;<br />
th[i].Start();<br />
<br />
}<br />
}<br />
<br />
private void button1C()<br />
{<br />
<br />
string Software="";<br />
int i=0;<br />
ProgramPath="";<br />
string path =Application.StartupPath + @"\SCRIPTS.txt"; <br />
try<br />
{<br />
if((comboBox1.SelectedItem == null) || (textBox2.Text==""))<br />
throw new Exception();<br />
<br />
}<br />
catch <br />
{<br />
MessageBox.Show("áçø úåëðä åîçùá","ùâéàä!");<br />
return;<br />
}<br />
Software=comboBox1.SelectedItem.ToString();<br />
for (i=0;i<DBScript.Count;i++)<br />
{<br />
if (Software==DBScript[i].ToString())<br />
{<br />
ProgramPath=DBScriptname[i].ToString();<br />
break;<br />
}<br />
}<br />
<br />
creating_batchfile(ComputerName,ProgramPath);<br />
pictureBox1.Image = new System.Drawing.Bitmap(Application.StartupPath + @"\2.png");<br />
MessageBox.Show("ääú÷ðä äåùìîä!");<br />
<br />
}<br />
<br />
private void creating_batchfile(string Compname,string script)<br />
{<br />
string source = @"\\"+ Compname + @"\c$\" + @"silent.bat";<br />
StreamWriter sw;<br />
sw=File.CreateText(source);<br />
sw.WriteLine(script);<br />
sw.Close();<br />
<br />
<br />
System.Diagnostics.Process PP = System.Diagnostics.Process.Start("cmd.exe",@" /c " + @"psexec " + @" \\" + ComputerName + @" -u user -p 1234567 -i c:\silent.bat");<br />
while (PP.HasExited != true){}<br />
System.IO.File.Delete(source);<br />
<br />
}
now the error the program writes me (when im trying to send couple of threads away - each for every computer) is that it cant create sw=File.CreateText(source); because some other program is using it ..
i looked it through and from my point of view it doesnt pass the Compname parameter right..
Thanks for all of your help!
Liran.
modified on Monday, May 12, 2008 3:37 AM
|
|
|
|
|
I don't know if .Net 1.0 has ParameterizedThreadStart , this, but this is how I do it:
public class ThreadData
{
public string m_threadName = "";
public int m_threadID = 0;
}
private void CreateThread()
{
Thread thread = new Thread(new ParameterizedThreadStart(button1C));
ThreadData threadData = new ThreadData();
threadData.m_threadName = "Test Thread";
threadData.m_threadID = thread.ManagedThreadID;
thread.Start(threadData);
}
private void button1C(object obj)
{
ThreadData data = (ThreadData)obj;
}
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
it doesnt
any other ideas?
|
|
|
|
|
Update to .Net 2.0. It's ubiquitous now, so everyone should have it. VS2005 is selling at ridiculously low prices now that 2008 is out, so you should grab a copy (even if it's used).
On the other hand, you could write a lot of code to marshal access to a structure allowing synchronous reads/writes. there's an article on that here at CP.
EDIT: Another thought - download VS2008 Express Edition. It's free.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Monday, May 12, 2008 11:33 AM
|
|
|
|
|
hi!
I am trying to create a console application that accepts a directory path. for eg.
c:\folder
it should read all the files with in this folder with extension .sql and merge into single file. there could be more than one files in the folder. I need to create a new file which should merge all the contents of these files and delete all originals. could someone please help me how to do this.
so far i am stucked here..
public void ProcessDir(string sourceDir)
{
string[] fileEntries = Directory.GetFiles(sourceDir, "*.txt", SearchOption.TopDirectoryOnly);
FileStream fout;
// open output file
try
{
FileStream fsw = new FileStream("C:\\work\\7.5.08\\testmsbuild\\Foo\\Foo\\Z.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
}
catch (IOException exc)
{
Console.WriteLine(exc.Message + "\nError Opening Output File");
return;
}
foreach (string fileName in fileEntries)
{
// do something with fileName
Console.WriteLine(fileName);
StreamReader tr = new StreamReader(fileName);
}
|
|
|
|
|
uglyeyes wrote: foreach (string fileName in fileEntries)
{
// do something with fileName
Console.WriteLine(fileName);
StreamReader tr = new StreamReader(fileName);
}
foreach (string fileName in fileEntries)
{
byte [] b = File.ReadAllBytes(fileName);
fsw.Write(b, s.Length, b.Length);
File.Delete(fileName);
}
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi, i have a main form (FrmMain.cs) that have a MenuStrip with
File | Staff | Catalogue | Inventory | Order | Help|
I have a child form (FrmLogin) to show the login page.
Inside form_load of FrmMain.cs, I have the following code to hide
| Staff | Catalogue | Inventory | Order | and only show them after they login.
private void FrmMain_Load(object sender, EventArgs e)
{
this.toolStripStaff.Visible = false;
this.toolStripCatalogue.Visible = false;
this.toolStripProduct.Visible = false;
this.toolStripOrder.Visible = false;
this.toolStripInventory.Visible = false;
FrmLogin childLogin = new FrmLogin();
childLogin.MdiParent = this;
childLogin.Show();
}
So, when the user login from the childLogin, how do i set the FrmMain's menu to show those hidden menu again
|
|
|
|
|
Get The parent form from MDIPArent property of child form, than nest it to a main form type class, then set visiblity to TRUE.
FrmMain frmMain=this.MdiParent;<br />
frmMain.toolStripStaff.Visible = true;<br />
frmMain.toolStripCatalogue.Visible = true;<br />
frmMain.toolStripProduct.Visible = true;<br />
frmMain.toolStripOrder.Visible = true;<br />
frmMain.toolStripInventory.Visible = true;
|
|
|
|
|
hmm i got this error
else if ((txtUsername.Text == username) && (txtPassword.Text == password))
{
FrmMain frmMain = this.MdiParent;
frmMain.toolStripStaff.Visible = true;
this.Hide();
}
Error 2 Cannot implicitly convert type 'System.Windows.Forms.Form' to 'EBMS.FrmMain'. An explicit conversion exists (are you missing a cast?) F:\Temasek_Poly\Year_2\CSAD\Assignment\EBMS\EBMS\FrmLogin.cs 33 35 EBMS
|
|
|
|
|
FrmMain frmMain = this.MdiParent as FrmMain;
|
|
|
|
|
Hi all
iam working on outlook connector.i have one doubt and help.....i want to get the meeting status using safeappointment Item from outlook calender.
For Ex:
iam get the description,Meeting Status from outlook calender its display one pop-up window for security purpose.for avoid that pop-up i write the code using redemtion.
SafeAppointmentItem desc = new SafeAppointmentItem();
desc.Item = item;
desc.body.Tostring();
like that am geting description with out pop-up.wats problem means same thing i write for geting Meeting Status.
but it not doing well plz help me its very urgent.
Regards
Mohan.T
Mohan t working for N.I.C
|
|
|
|
|
I have a windows Form. I need to have a link for the Microsoft Excel Worksheet which will contain an embedded spreadsheet. When clicked, Excel will launch and allow the user to edit the spreadsheet. How can i do this in C#? Pls help
|
|
|
|
|
|
Thanks for the link but that would not work for my requirement. Sorry i was not clear in the earlier message. Pls ignore my previous message
My requirement on C# windows form is to provide a link to the spreedsheet and user clicks on that link it should open the .xls file. How to do this?
|
|
|
|
|
Process.Start(pathToSpreadsheet);
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello All,
I am working on an application through which i need to open a webpage which has to bypass the login page. The website is hosted on linux PC and apache server, i will be provided with the username and the password. i would like to know how to by pass login page from winform application to login to that page .
Thanks in advance
Ron
|
|
|
|
|
You need to basically access the page using the DOM inside your web browser control, insert the right username and password and press the login button through code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have purchased a code signing certiicate from verisign.. now i need to sign my assemblies so that i can distribute my software.. can any one please suggest me the step by step procedure to do the code signing... Is code signing generally done through click once application??
|
|
|
|
|
please help!
I want create a label that its text can move back and forward. I think that to do it, I have to import html into label! please help me!!
|
|
|
|
|
You are completely incorrect in your assumption. You need to write your own control, perhaps derived from the label class, but I'd just derive it from the base control class. It would just draw the text, and use a timer to change the text location, and redraw it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how can i write a component with c#.net that when a mouse enter a word, it recognize the word and show it on a tooltip. this component saport html, word document and adobe acrobat (pdf files). help me. thanks if you can help me send me to mehrnoosh_alz@yahoo.com
|
|
|
|
|
mehrnoosh wrote: when a mouse enter a word
what does it mean ?
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|