|
Yes, if you write an app that runs on that remote machine, it can read and broadcast the IP address if you like. Of course, it needs somewhere to send it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi every body. i was working on a project and faced a problem. the problem is i have 4 columns in the table in my database and i am reading the contents of the table through data reader and shows it on the data gridview now what i want is to customise the gridview to show only two columns here is my code
private void Form1_Load(object sender, EventArgs e)
{
DBHandler ObjDBHandler = new DBHandler();
dataGridView3.DataSource = ObjDBHandler.GetAllPrograms();
}
suppose i have four columns in my data base and i want to show only two of them which is ID and Name what i do please explain me...
Thankyou
|
|
|
|
|
Format your grid to show those columns. This is basic stuff. You should buy a winforms book and read it, or try reading MSDN.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
datagridview.datasource=(come data from database i think 4 column);
datagridview.columns["colname"].visible=false//what u dont need to show
Shafik
press a bamboo to graus pleas
|
|
|
|
|
Dearest Coder,
i want to delete mail which in pop3 mail server programmatically using C#.
Can u give me the C# source code.
thanks in Advance.
Shafik
|
|
|
|
|
|
thanks for your reply.but i need specific code where i send the server info it delete the all mail.
would u help me
|
|
|
|
|
Just open port 110 on server via NetworkStream and then send text-commands to it.
It's that easy. That's why I said 'simple' text protocol.
If it's to simple use link[^]
|
|
|
|
|
|
would you help me by C# code
thanks
|
|
|
|
|
yes of course, just send the code and the question.
|
|
|
|
|
//my method it works but mail is not deleted
Spartan.Net.Mail.POP3 objPOP = new Spartan.Net.Mail.POP3();
objPOP.Connect(Properties.Settings.Default.POP3Server, Properties.Settings.Default.POP3Port, frmLogin._currentUser.fldUserEmail, password);
try
{
objPOP.DeleteMessage(_ReceiveMailNumber);
return true;
}
catch(Exception ex)
{
XtraMessageBox.Show(ex.Message.ToString());
return false;
}
//connection code
public MAIL_ERROR Connect(string host, int port, string username, string password)
{
try
{
_conn.Host = host;
_conn.Port = port;
_conn.Connect();
System.Threading.Thread.Sleep(_TimeOut);
return Login(username, password);
}
catch (Exception e)
{
System.Diagnostics.Trace.Write(e.ToString());
return MAIL_ERROR.ERROR_CANTCONNECT;
}
}
//i send mail receive number
public MAIL_ERROR DeleteMessage(int id)
{
if (this._state != POP3_STATE.POP3_LOGGEDIN)
{
throw new MailException("You are not logged into the mail server");
}
string ret = "";
SendCommandSynchronous(string.Format("DELE {0}\r\n", id), out ret, false);
if (ret.Contains("OK") == false)
{
throw new MailException(ret);
}
else
{
return MAIL_ERROR.ERROR_NONE;
}
}
private MAIL_ERROR SendCommandSynchronous(string cmd, out string response, bool bMultiLineResponse)
{
// Remove any data that was left over on the buffer
string deadData = _conn.Receive();
_conn.Send(cmd);
response = WaitForResponse(bMultiLineResponse);
return MAIL_ERROR.ERROR_NONE;
}
private string WaitForResponse(bool bMultiLine)
{
int timeout = 5000; // wait 10 seconds for response
int waitedTime = 0;
string strRet = "";
while (waitedTime < timeout)
{
System.Threading.Thread.Sleep(_TimeOut);
strRet += _conn.Receive();
if (CommandComplete(strRet, bMultiLine) == true)
{
return strRet;
}
waitedTime += _TimeOut;
}
return strRet;
}
|
|
|
|
|
What he's saying is, do your own work. He's told you how it's done, if you can't even try to do it based on this, then you should consider doing a programming course, so you can one day hope to be a programmer.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi cristian graus,
its really very good news that u r only programmer in the world who's programming knowledge is like God. u can tell u as second god.
Shafik
|
|
|
|
|
khosnur wrote: its really very good news that u r only programmer in the world who's programming knowledge is like God. u can tell u as second god.
Well, I can program, AND I can spell. I can even use google. If I ask for help, I tend to first try to think for myself and ask questions where I tell people what I've tried instead of asking them to send me code. This does not make me 'god', but I guess it does make me working for a real wage in the real world, instead of being hired because I am cheap, by people who don't realise I am not worth it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Graus,
i think u dont see that i thought and i up;oad my code but it doesnt work. why i dont know would u see....
then complement....
Shafik
|
|
|
|
|
It looks to me like you're using some sort of third party library. What error you get, is still a mystery. No-one can help based on that lack of information.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Graus,
i supply the mail receive number which i got when i received mail.interesting it shows no error when i debug. but mail is not deleted.
would u help me by any ires
thanks in advance
|
|
|
|
|
motherchod reply des na ken?
|
|
|
|
|
Please read the sticky at the top of the thread "How to get an answer to your question". So far you have broken rules: 2, 4, 7 8 pretty close to breaking 11 and also the unwritten rule about not using textspeak in message boards.
99.9% of the people on the message boards are unpaid and helping as an act of altruism. We are not here to supply you with code, just helping to provide guidance. You should ask a specific question or ask about a specific fault, otherwise you aren't going to get a better answer than the ones you have.
|
|
|
|
|
please dont misunderstand me. i upload my code. but grause complement me without see that code.its really unwanted.
thanks
|
|
|
|
|
Hi,
I need information from the hardware of the system.( for example the CPU temperature.)
Anybody know how to get it?
|
|
|
|
|
|
The replies here are all "It doesn't work" - the reason why is described here[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
The chances are you can't, unless the CPU motherboard manufacturer has provided the info via WMI, which is unlikely - most don't so there is no simple, generic way to do it.
If you aren't after a generic solution, then you will have to look at the manufacturer of your specific hardware for details (if they give them!)
[edit]Monday morning disease - replace CPU with motherboard. Ooops![/edit]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
modified on Monday, September 7, 2009 5:17 AM
|
|
|
|