|
That remark will be of a lot of help....
|
|
|
|
|
Hey
whats the best way to get the containing directory eg. c:\gello\ from a filepath eg. c:\gello\txt.xtx?
Thanks
|
|
|
|
|
|
Or indeed try: System.IO.Path.GetDirectoryName(string path);
For your example calling System.IO.Path.GetDirectoryName("c:\\gello\\txt.xtx"); will return the string "c:\\gello" .
HTH
|
|
|
|
|
hi there,
i have created my own DateTimePicker ,but i have a problem,how can i place the calendar in top of all controls like ContextMenu and also how can i hide it when user leaves the control(the leave event does not work in this contol and i dont knkow why)..
thanks
|
|
|
|
|
Good evening,
I have a problem in retrieving active ip addresses(with computer name) in a network, using C#. I could able to retrieve through dns entry, but it has to retrieve only if the computer is active. But my code retrieves even if the computer is off.
can someone help in this view?
Amar
|
|
|
|
|
DNS doesn't work that way, AFAIK. There are designated name servers which your computer will use to resolve IP addresses, so you'll get the addresses regardless of whether the PC with that IP address is alive.
You can always try connecting to the IP address (say ping) to see if the other side is really alive.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
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?????
|
|
|
|