|
You'd have to ask the router what the IP address is. How you do that depends entirely on the router and the interfaces it provides that your code can talk to.
|
|
|
|
|
|
thanks
but as i said before i dont have a static IP but i think every time i connect to net i should have IP address and if i disconnect and reconnect i think i got another IP address so how can i get this address every time
|
|
|
|
|
Always read before you reply:
sanforjackass wrote: but as i said before i dont have a static IP
Yes. This is called Dynamic IP system. It happens because your ISP keeps a number of IP addresses reserved with it. Since at any point of time, all users are not connected, same IPs are being allocated to different people.
Som wrote:
You need to ask your ISP to provide you with a static IP address. Depending on your plan, it may be a free or paid service.
To have the same IP address everytime, you need to have a Static IP (same IP everytime). Speak to the customer service of your ISP and request for a static IP. I repeat. it can be a paid service.
|
|
|
|
|
do you really read my last reply!!
i know there is a different IP every time and I dont want to make it static from my ISP I just want to know the IP every time.
|
|
|
|
|
|
|
sanforjackass wrote: have you tried
Why would I give you a link without knowing what it is? This is a website you can visit to see your ip everytime you connect to internet.
|
|
|
|
|
|
|
have you tried
every time I open these pages at the same time each one give me different IP so what is the real IP
|
|
|
|
|
sanforjackass wrote: every time I open these pages at the same time
clarify!!
|
|
|
|
|
thanks
but have you see www.spyber.com
modified on Tuesday, February 16, 2010 4:44 AM
|
|
|
|
|
Hi guys,
How can we adjust the size of our individual controls & the main section (eg: group box in which our individual controls are placed), based on the screen resolution.
ie, We develop an application in 1024*768 resolution. In the GUI, we have one or two group-boxes. Each group-box have different control which are added at run time. Now, if the user opens the application in 1024*768 resolution, all the controls are neatly positioned. But, if the user uses a different resolution, the size of the controls are not proportional. How can we achieve the proportional re-size of all the individual controls irrespective of the screen resolution
Best Regards,
Abhilash Chandran
|
|
|
|
|
You should use SplitterBox controls and the Dock property of the group boxes (i.e. DockStyle.Fill ).
|
|
|
|
|
Thank you for the reply.
Using the splitter box we can have only 2 splitters. right?
I feel tablepanel layout may be a better option.
Still, i have to check if the requirement can be met fully using it.
Because, as per the requirement, we must not simply increase the size of the controls based on the screen resolution.
We must keep the alignment & size (may be a proportionate increase in size is ok).
Ideally, the look must be similar to what happens if we change the resolution & see in our desktop. ie, still all the icons in desktop are proportional & no area is simply empty.
Is there any other way to achieve the same.
|
|
|
|
|
Hi,
i got a AppSettings.exe.xml to read and write to. it looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dir" value="\directory"/>
<add key="fieldname1" value="\value1"/>
<add key="fieldname2" value="\value2"/>
</appSettings>
</configuration>
reading frm xml is not of a problem. but writing is..
everytime i write to the xml, the last char will get trim off.
for example if i wanna write or append, the xml will look like this
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dir" value="\directory"/>
<add key="fieldname1" value="\value1"/>
<add key="fieldname2" value="\value2"/>
</appSettings>
</configuration
note: the missing '>'. And if writing continue, more chars will get trim off
im using this class to do the read and write to xml:
namespace used:
using System;
using System.Xml;
using System.Configuration;
using System.Reflection;
using OpenNETCF.Configuration;
using System.Windows.Forms;
public class ConfigSettings
{
private ConfigSettings() { }
public static string ReadSetting(string key)
{
return ConfigurationSettings.AppSettings[key];
}
public static void WriteSetting(string key, string value)
{
XmlDocument doc = loadConfigDocument();
XmlNode node = doc.SelectSingleNode("//appSettings");
if (node == null)
throw new InvalidOperationException("appSettings section not found in config file.");
try
{
XmlElement elem = (XmlElement)node.SelectSingleNode(string.Format("//add[@key='{0}']", key));
if (elem != null)
{
elem.SetAttribute("value", value);
}
else
{
elem = doc.CreateElement("add");
elem.SetAttribute("key", key);
elem.SetAttribute("value", value);
node.AppendChild(elem);
}
doc.Save(getConfigFilePath());
}
catch
{
throw;
}
}
public static void RemoveSetting(string key)
{
XmlDocument doc = loadConfigDocument();
XmlNode node = doc.SelectSingleNode("//appSettings");
try
{
if (node == null)
throw new InvalidOperationException("appSettings section not found in config file.");
else
{
node.RemoveChild(node.SelectSingleNode(string.Format("//add[@key='{0}']", key)));
doc.Save(getConfigFilePath());
}
}
catch (NullReferenceException e)
{
throw new Exception(string.Format("The key {0} does not exist.", key), e);
}
}
private static XmlDocument loadConfigDocument()
{
XmlDocument doc = null;
try
{
doc = new XmlDocument();
doc.Load(getConfigFilePath());
return doc;
}
catch (System.IO.FileNotFoundException e)
{
throw new Exception("No configuration file found.", e);
}
}
private static string getConfigFilePath()
{
return @"\Program Files\AppSetting.exe.xml";
}
}
|
|
|
|
|
i have 3 textboxes.i want to give 2 nos in two textboxes and their result will display in 3rd textbox automatically after entering the 2nd no in second text box.result changes when i will update the data in corresponding textboxes.no button is dere.only 3 textboxes.plz send me the code.its urgent.plzzz
|
|
|
|
|
sudhir behera wrote: i have 3 textboxes.i want to give 2 nos in two textboxes and their result will display in 3rd textbox automatically after entering the 2nd no in second text box.result changes when i will update the data in corresponding textboxes.no button is dere.only 3 textboxes.plz send me the code.its urgent.plzzz
I checked with everyone here, and they all agree: it's not urgent.
But I'm feeling generous:
Use the TextBox.TextChanged event.
Now go away, and do your homework earlier next time.If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
OriginalGriff wrote: do your homework earlier next time
can't do that. starting earlier, the only difference is it takes longer to realize it's going nowhere.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
i want when a user write a text in a text box then the letters will appear like that ******* i mean just like when you write your password in a password texbox
|
|
|
|
|
Set the property PasswordChar of a textBox.
TextBox1.PasswordChar = "*"; Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
As Abhinav says, use TextBox.PasswordChar, or you can just set TextBox.UseSystemPasswordChar = true[^] to use the system "blob" character.
[edit]Corrected spelling of Abhinav - sorry![/edit]If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
modified on Monday, February 15, 2010 10:00 AM
|
|
|
|
|
OriginalGriff wrote: [edit]Corrected spelling of Abhinav - sorry![/edit]
Thanks.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
i want to show what my webcam is "seeing" in a picture box so how can i do this?
|
|
|
|