|
Senthil is right. DNS resolves address and names regardless of the hosts actual status. You can resolve addresses and names for machines that don't even exist, so long as there is an entry in the DNS tables.
If you want to resolve a host name, you'll have to do the DNS lookup first to get the address(es) of the host, then ping that address to see if it is alive. For an address, you'll just ping the address first to see if it's alive, then if it is, do the DNS lookup for the host names.
But, keep in mind, that not all machines will respond to a ping, even if it alive and reachable.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
HELP...!!!
Can any one show me the interface of Gina in XP??
I define my own MyGina.dll in XP and replace System's gina.dll ,but when i login,it meet bluescreen error ??what's wrong with this?? it works correctly in 2000 and 2000/server,
is there any more interface in Xp than in 2000?what are they??
|
|
|
|
|
Open Google.
Search for "Gina DLL".
Click the MSDN-Entry.
Sorry, no more help to offer, I just looked this up myself. I just wanted to make sure we were not talking about desktop dancers/strippers.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
i would like add ScrollToRow method to datagrid
can you please show me how do i do this
i found this code:
public void ScrollToRow(int theRow)
{
//
// Expose the protected GridVScrolled method allowing you
// to programmatically scroll the grid to a particular row.
//
if (DataSource != null)
{
GridVScrolled(this, new ScrollEventArgs(ScrollEventType.LargeIncrement, theRow));
}
}
|
|
|
|
|
please
|
|
|
|
|
HELLO
I need a code when i press a key from keyboard that's key show in the text box.
For exampel:
we need add two number like 2+2=4 what code or functions can do work + and =
THANKS ALOT
|
|
|
|
|
You should check msdn.com for OnKeyDown event
Regards Marco
|
|
|
|
|
I'm trying to capture text from a rich edit textbox. I have a section of code I took from the PInvoke website. it correctly determines the length of the text to be captured, however it doesn't actually capture any text. I'm using this code:
<br />
private static String GetWindowText(IntPtr hWnd)<br />
{<br />
IntPtr txtLength;<br />
IntPtr retValue;<br />
IntPtr zeroVal = new IntPtr(0); <br />
uint WM_GETTEXTLENGTH = 14;<br />
txtLength = SendMessage(hWnd, WM_GETTEXTLENGTH, zeroVal, zeroVal);<br />
<br />
StringBuilder sb = new StringBuilder(txtLength.ToInt32() + 1);<br />
<br />
uint WM_GETTEXT = 13;<br />
retValue = SendMessage(hWnd,WM_GETTEXT,txtLength,sb);<br />
<br />
return sb.ToString(); <br />
}<br />
The retValue variable equals zero after it is updated and sb contains no characters. Any help would be greatly appreciated.
jake
|
|
|
|
|
im trying to make an xml search method
for example this is my xml file
<deportes>
<deporte folder="" nombre="Ajedrez" permit="pp">
<item nombre="Participantes" link="resultados/ajedrez/">
<item nombre="Calendario" link="Resultados/ajedrez/">
<item nombre="Resultados" link="Resultados/ajedrez/">
<deporte folder="" nombre="Apnea">
<item nombre="Resultados Generales" link="">
<item nombre="Dia 1" link="resultados/apnea/apnea_resultados.htm">
what i wanna do its get movinh trought the xml and when i get the looking for attribute the method will give me back an string with this caracteristics
d=0&n=1 where d its equal to the current <deportes> node and n its equal to the current item node where the looking attribute was found for example
d=0&n=1 the atribute nombre = calendario
but if i im on a child of a item node for example <item nombre="Dia 1" ...="">
the result it will be d=1&n=0,0
please if some one can helpme plese email me quickly
|
|
|
|
|
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<Deportes><br />
<Deporte folder="" nombre="Ajedrez" permit="pp"><br />
<item nombre="Participantes" link="resultados/ajedrez/"><br />
</item><br />
<item nombre="Calendario" link="Resultados/ajedrez/" /><br />
<item nombre="Resultados" link="Resultados/ajedrez/" /><br />
</Deporte><br />
<Deporte folder="" nombre="Apnea"><br />
<item nombre="Resultados Generales" link=""><br />
<item nombre="Dia 1" link="resultados/apnea/apnea_resultados.htm" /><br />
</item><br />
</Deporte><br />
|
|
|
|
|
Try checking the "Do not treat <'s as HTML tags" checkbox so we can actually read your xml...
mav
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
<Deportes>
<Deporte folder="" nombre="Ajedrez" permit="pp">
<item nombre="Participantes" link="resultados/ajedrez/">
</item>
<item nombre="Calendario" link="Resultados/ajedrez/" />
<item nombre="Resultados" link="Resultados/ajedrez/" />
</Deporte>
<Deporte folder="" nombre="Apnea">
<item nombre="Resultados Generales" link="">
<item nombre="Dia 1" link="resultados/apnea/apnea_resultados.htm" />
</item>
</Deporte>
|
|
|
|
|
private string DumpIndex(XmlNode node)
{
string sAns = "";
if (node.ParentNode != null)
{
int iPos = -1;
foreach (XmlNode c_Node in node.ParentNode.ChildNodes)
{
iPos++;
if (c_Node.Equals(node))
{
sAns = this.DumpIndex(node.ParentNode);
if (sAns.Length > 0) sAns += ".";
sAns += iPos;
break;
}
}
}
return sAns;
}
|
|
|
|
|
i think that the code its perfect but can u explainme how do i know what node i must send to this funtion first for examle
string dumindex(myfirsnode)
|
|
|
|
|
using System.Xml;
XmlDocument c_Doc = new XmlDocument();
c_Doc.Load(...) or LoadXml(...);
XmlNodeList c_List =
c_Doc.DocumentElement.SelectNodes("//*[nombre='???']");
... or ...
c_Doc.DocumentElement.SelectNodes("//item[nombre='???']");
foreach (XmlNode c_Node in c_List)
{
... Do the DumpIndex with c_Node and whatever else ...
}
I am writing this away from my computer, so I cannot check it. Use the first SelectNodes methods to include all nodes, the second if you want to include only the item nodes. Of ccource the ??? needs to be replaced with the name that you are searching for.
Anyway, you should be able to get the idea on how to use XPath (If you need to learn more, check the w3schools.com site)
|
|
|
|
|
I already read the article in codeproject site that shows how to get the screenshot for the whole desktop screen in http://www.codeproject.com/csharp/cscapturescreen1.asp
BUT what I'm looking for is how to get the updated screen area of desktop, since I'm sending the image data via network so I will reduce the bandwith and sent data size by getting the updated screen area....any suggestions?
|
|
|
|
|
|
you mean that I use Equals like following
Bitmap oBmp = GetDesktopScreen();
Bitmap oBmp2 = GetDesktopScreen();
if(oBmp.Equals(oBmp2))
//What to do in either cases equal or not?????
|
|
|
|
|
|
I'm referring to this article:
http://www.codeproject.com/cs/media/CsTranspTutorial3.asp?df=100&forumid=36208&select=1146413#xxxx
the question is:
I'm using the per-pixel form about the "aqua mala" bottle.
I want add over the image some form component as a label.
How could i do?
|
|
|
|
|
|
I just want an easy way to get tracert (Trace Route) information programmatically in C#...
Can anyone help me plz???
Thnx
|
|
|
|
|
You can simply use Process.Start() to execute tracert and to read back its output.
Otherwise I doubt that there's an easy way...
Regards,
mav
|
|
|
|
|
Tracert basically uses echo information to create a route to your target. That means, it constantly changes the TTL (Time-To-Live) in the IP header of and echo request and then pings all routers and hosts reporting a timeout.
It works this way:
START-----------------NODE1------------------NODE2---------------END
START sends a package with a small TTL (like, 1 hops) to END. As the package reaches NODE1, NODE1 decrements the TTL hop-counter by 1, making it 0. This means, it may not forward the information and will send an ICMP error package back instead. START receives that package and pings NODE1 (with a normal TTL) to get a response time to display, then sends another package to END with a TTL of 2. Game repeats for NODE2.
Thats how the trace information is built. Sophisticated tools will then try a WHOIS on each node and use the address information to draw the approximate location on a map (e.g. by ZIP codes).
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I'm trying to print a form with Labels, textboxes and checkboxes.
I have added the PrintDocument1, printDialog1 and printpreviewDialog1 controls.
I have added some code, when I print preview, the preview is blank, and a blank sheet comes out. When I just hit the print button, it askes me to pick a printer, and then prints a blank piece of paper.
I know I have to somehow 'build' the image of my form, to send to the printer. I have the subroutine (called Drawall), and I was wondering what the code
If I could just print even the first Label (called label1), that would be enough to get going.
Any suggestions? Some of my code is below:
private void button3_Click(object sender, System.EventArgs e)
{
Close();
}
private void PreviewMenu_Click(object sender, System.EventArgs e)
{
try
{
PrintPreviewDialog printPreviewDialog1 = new PrintPreviewDialog();
printPreviewDialog1.Document = this.printDocument1 ;
printPreviewDialog1.FormBorderStyle = FormBorderStyle.Fixed3D ;
printPreviewDialog1.SetBounds(20, 20, this.Width, this.Height);
printPreviewDialog1.ShowDialog();
}
catch(Exception exp)
{
System.Console.WriteLine(exp.Message.ToString());
}
}
private void printPreviewDialog1_Load(object sender, System.EventArgs e)
{
}
private void button2_Click(object sender, System.EventArgs e)
{
printDialog1.Document = this.printDocument1;
if (printDialog1.ShowDialog() == DialogResult.OK)
{
this.printDocument1.Print();
}
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
DrawAll(e.Graphics);
}
private void DrawAll(Graphics g)
{
}
}
Any help would be appreciated...
|
|
|
|