|
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?
|
|
|
|
|
|
the file didn't open... i'm using visual studio 2005
|
|
|
|
|
If you download project , you can see CaptureNET - capturing test .
CaptureNET need DShowNET.dll.
And there are have DShowNET project for dll.
All projects written under Visual Studio 2005 - C# language .
Try one more time!If you have visual studio , files need open.
Good luck. We are haven't bug,just temporarily undecided problems.
|
|
|
|
|
Hi everyone. I'm a newbie to C# and I'm having trouble with the following -- I'd like to know whether it's possible, or learn some alternative way of doing it:
I'm writing a system that underlies applications and manages access to shared data to ensure concurrent accesses don't end up making a mess. Basically, I'd like application programmers to be able to write their code as they normally would, without worrying about concurrence, and then simply tag their methods with [Atomic] if they want the system to treat them as such. Now, my question isn't how to make the methods be atomic -- I have already implemented all that. What I want to know is how I can control access to the fields of atomic objects. I'll explain.
Say they define following class:
class MyClass {
private int x;
private int y;
public void doStuff() {
x = y + 10;
}
}
I don't want them to access x and y like that. What I want to do use ILGenerator to create an extended version of MyClass in which I handle the access to fields safely:
* I modify the names of the fields to FORBIDDEN_x and FORBIDDEN_y .
* I define properties x and y (i.e., with the old name of the fields), so that where the application programmer used to directly access a field, he will now access the corresponding property.
* I define the methods get and set of each property so that they handle the accesses safely.
So, once again (sorry for the insistence):
* I want the programmer to be able to write their code as seen above, with unsafe access to fields.
* I then want to go and hack the names of the fields and add properties so that I can handle the access safely.
This way the programmer doesn't need to make any special effort in their code, because I'll hack it later.
And now for the problem: I cannot change the name of the fields. It's read-only.
So, is there any way in which I can do this, or something similar, so that the programmer still has the illusion that he's accessing the fields directly? The only thing I can think of is that the programmer defines the properties himself like so:
class MyClass {
private int x;
private int y;
public int xProp {
get { return x; }
set { this.x = value; }
}
public int yProp {
get { return y; }
set { this.y = value; }
}
public void doStuff() {
xProp = yProp + 10;
}
}
and then I'll go in and hack xProp and yProp 's get and set methods, but now the programmer has to make the extra effort to define the properties and to never forget to use them instead of the fields. Is there any way I can achieve what I originally intented to do?modified on Monday, February 22, 2010 9:23 AM
|
|
|
|
|
Hi,
1.
public int x {get; set;}
is all it takes to have an "automatic value-with-property".
2.
IMO if you insert locks automatically, rather than having the programmer design and code for parallelism, one of two things will happen:
- either your locks are at too low a level and don't offer any real protection;
- or a typical multi-threaded app will dead-lock right away.
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.
|
|
|
|
|
Luc Pattyn wrote: is all it takes to have an "automatic value-with-property".
Ooh, great. It was a newbie question . That's great news for me!
Luc Pattyn wrote: IMO if you insert locks automatically, rather than having the programmer design and code for parallelism, one of two things will happen:
- either your locks are at too low a level and don't offer any real protection;
- or a typical multi-threaded app will dead-lock right away.
I don't insert locks . I'm translating a transactional memory system that has proven to perform very well with different workloads. The appeal of transactional memory is that you get a scalability that's comparable to that of fine-grain locking (depending on the transactional memory system, of course) and none of the headaches. Plus no deadlocks or livelocks.
Thanks a lot for your answer, this is was a really important point.
|
|
|
|
|
I didn't have time to try your suggestion until now, but now that have I've run into some serious issues. If anyone can give me some insight I'd really appreciate it. I explain the problems I've encountered with each approach I've tried:
1) I tried doing as you suggested and having the programmer use auto-implemented properties, like this:
public int x {get; set;}
But then I have found no way to dynamically modify the accessors' code, which was the whole point. The only thing I can do is get the MethodInfo of the accessor, but as far as I can see there is no way to get a MethodBuilder from that, so I can't modify anything. Is there something I'm missing?
2) I tried not having the programmer use auto-implemented properties and just define the fields like this:
private int x;
And then I went in and tried to add a property with the same name as the field (x ), to do as if the programmer had declared the field+property like this:
public int x {get; set;}
And then work from there, this time having the MethodBuilder and being able to work with the code.
Of course, this doesn't work. The surprising thing is I don't get an exception when add the property, despite the fact that I'm declaring two symbols (the field and the property) with the exact same name in the same namespace. I don't know how that's possible, and if I do that by hand (i.e., writing the following code) I get a compiler error, as would be expected.
private int x;
public int x {get; set;}
If I add it dynamically (with DefineProperty) it simply doesn't seem to have any effect.
Ideally this would be the solution I'd like to use, as it requires no effort from the programmer, but I don't see how I can get this to work.
The thing is I need the programmer to be able to write their code normally, and then I'll fix the accessors so that it's safe. For them to able to write normally, I need to create properties that have the same name as the fields they declared, or have them declare automatic properties and then somehow I'll add code to the accessors.
This is crucial for my project. Is it possible at all?
Thanks a lot.
|
|
|
|
|