|
Hi John,
For communicating across a firewall I believe you have to set the HttpChannel on the client side to port 80 or a port that is not blocked. I haven't tried this myself since I'm still coding the message/user handling routines for my chat server. If you have time on your hands could you verify this? Thanks.
Nathan.
|
|
|
|
|
It's not the port number that you've got to worry about. It's more the address translation and usual firewall rules base which are going to be issues. Firewalls, in general, don't allow incoming requests to an arbitrary machine protected by them, whatever the port number, unless they have been specifically configured to do so. It's quite usual for them to allow outgoing connections to any server on port 80, but that's a very different thing.
And no, I'm not going to setup a firewall with machines on both sides just so I can test something for you which I don't think will work anyway. Sorry mate, I'm not quite that helpful ...
|
|
|
|
|
Hallo
I have one problem with component MonthCalendar (C#).I need build calendar to my project but set for specific days different background color!!!Can you someone help me?
Robert
|
|
|
|
|
|
Hello, I'm looking for any tutorials on windows messages in C#.NET. what i'm trying to do is look at the windows messages sent to any running application.
TIA
|
|
|
|
|
You might not find anything like that relating to C#, since there is nothing new about messaging in .Net. Still the same old WndProc() function, and PreProcessMessage() much as in MFC/ATL. Pretty much anything you find for windows messaging in C/C++, will hold true for C# too.
Cheers
|
|
|
|
|
yeah i kept looking but found nothing specific to c# or .net so have to use wndproc().
cheers.
|
|
|
|
|
I have a dll I made and have a set property to accept an int. I would like to fill this property by using the textbox class in a form. I call the Convert.ToInt32
like this
property = Convert.ToInt32(TextBox.Text);
now I get a stack overflow in the dll at the
public int property
{
set {property = value;} //This throws the exeption
}
Am I calling everything correctly? Or am I missing somthing?
|
|
|
|
|
djkno3 wrote:
public int property
{
set {property = value;} //This throws the exeption
}
You're assigning the value to the property itself which is wrong.
You'll need a member varible of type int, so change the code to this:
public int MyPropertyName
{
set{ myMemberInt = value; }
}
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Thanks that was the problem. To get the value do I use the same variable eg return myMemberInt? It works like this but is it the correct way?
|
|
|
|
|
To create the read/write property you want, you will want to create a get:
<br />
public int MyPropertyName<br />
{ <br />
set{ myMemberInt = value; }<br />
get{ return myMemberInt; }<br />
}<br />
RabidK
|
|
|
|
|
thanks that's what I have I was just wondering if it was correct or if I was just getting the right answer by chance and have a nice bug pop up later because of it. thanks
|
|
|
|
|
It looks like the value entered in the TextBox is too big for an Int32.
MDSN:
The Int32 value type represents signed integers with values ranging from negative 2,147,483,648 through positive 2,147,483,647.
Pyt
Pyt.
|
|
|
|
|
I guess I should have said that the value was less then the max for an int 32 (eg It was 32) sorry
|
|
|
|
|
i have developed an application in dot net and i want to get its class diagram is there any facility available for that purpose in visual studio dot net ?
|
|
|
|
|
I thought, but I could be wrong, that VS .Net came with some version of Visio that would let you do this.
|
|
|
|
|
If you have the Architect version then you should find a copy of Visio on the installation media. It isn't installed by default. When installed there is an option to Reverse Engineer added to the Project menu.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
There is an add-in project here on CodeProject that might be useful to you if you don't have a copy of VSNET Ent Arch and Visio for Ent Arch.
It's called PocketUML and from what I have seen, it does a pretty fair job:
http://www.codeproject.com/macro/pocketuml.asp[^]
I've downloaded it, but don't really use it much because I have the Ent Arch editions of both.
On a side note, does anyone know if Visio for Ent. Arch. supports full round-trip engineering? Or team collaboration?
RabidK
|
|
|
|
|
Hi all,
Since I have seen some of the greatest C# code on this site; I'd sure appreciate your contribution to a presentation I will be delivering. I'm looking for radical cool C# tips & tricks to demo. You will be mentioned in my presentation, if you do not object. So any cool stuff with unsafe code; com interop; or even general .Net cool tricks are welcome.
You (already) have my eternal gratitude.
Rudi
|
|
|
|
|
I've given this type of talk a bunch of times since .NET came out and it really depends on the type of audience.
If you use instant messenger then we can chat: simon_stewartDEFINITELYNOTFORSPAM@hotmail.com -- removing capital words.
Cheers,
Simon
"From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.
|
|
|
|
|
I have finally found a good use for looping in a small tool I am creating.
maxBits: is defined elsewhere in the code as a maximum integer that cannot be passed.
subs: is also defined elsewhere as an integer that needs to be passed by at least a value of 2.
---------------------------------------
A little more in depth:
IE- (2^x), where "x" is an integer value.
What this is really trying to find is the "x" power of 2's value, that is right after the value of "subs" but that power cannot be higher than "maxBits" and if it is, it is invalid and a message needs to be passed to the user.
Here is my code:
------------------------------------
// newSubs is the value of the "x" power of 2 right after the value of "subs" int newSubs = 0; int n = 0; for (int i = 0; i <= maxBits; i++) {
while (n < subs)
{
newSubs = 2^i;
n = tSubs;
}
}
------------------------------------
It just isn't working and I don’t know why. I have tried many different cominations of looping structures to get the effect I need. With the code given above, the program crashes when a value of 3 is assigned to "subs".
Can anyone help me with the looping structure? I am going insane just thinking about it
Thanks for the help.
Regards,
********************
* SteveMcLenithan
* <a href="mailto:steve@steve-mac.com">steve@steve-mac.com</a>
* <a href="http://steve-mac.com">http://steve-mac.com</a>
********************
|
|
|
|
|
looks like my code didnt paste right the first time. hopefully it will work now...
// newSubs is the value of the "x" power of 2 right after the value of "subs"
int newSubs = 0;
int n = 0;
for (int i = 0; i <= maxBits; i++)
{
while (n < subs)
{
newSubs = 2^i;
n = tSubs;
}
}
********************
* SteveMcLenithan
* steve@steve-mac.com
* http://steve-mac.com
********************
|
|
|
|
|
Well, in C# the '^' operator is the XOR operator. To accomplish what you need you can:
1. Use Math.Pow method
2. If you need 2x you can always use 1 << x , which will operate only in integral types (byte, short, int and long) and is super fast.
I see dumb people
|
|
|
|
|
I have a richtextbox where things will be printed in it from other textbox's. But when the richtextbox is filled with text, instead of the scrollbar automatically scrolling down as new text is appended to the richtextbox, the scrollbar stays at the top and the new text can't be seen unless the person moves the scrollbar himself. Is there a property which allows me to change the location of the scrollbar so that the scrollbar automatically moves down as new text is appended to the richtextbox?
Thanks
|
|
|
|
|