|
But the problem is that Whatever the child window size the scroll bar is showing
for a fixed size. I want this autoscroll property for zooming in and out the images in a child window.
|
|
|
|
|
Then the autoscroll should be on the child form.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi All,
I am new to C# and OOP. I refered a article about Single instance child for in MDIhttp://www.codeproject.com/csharp/single_instance.asp?df=100&forumid=51798&select=1394073#xx1394073xx[^])
I tried to write a sub program to stop that code duplication as follows
private void frmLoad(Form frmNew)<br />
{<br />
Form[] charr = this.MdiChildren;<br />
if (charr.Length == 0)
{<br />
frmNew sus = new frmNew();<br />
sus.MdiParent = this;<br />
sus.StartPosition = FormStartPosition.Manual;<br />
sus.Location = new Point(0, 0);<br />
sus.Show();<br />
}<br />
else
{<br />
int count = 0;<br />
foreach (Form chform in charr)<br />
{<br />
if (chform.Name == "frmNew")
{<br />
chform.Activate();<br />
count = 0;<br />
break;
}<br />
else<br />
count++;<br />
}<br />
if (count > 0)<br />
{<br />
frmNew sus = new frmNew();<br />
sus.MdiParent = this;<br />
sus.StartPosition = FormStartPosition.Manual;<br />
sus.Location = new Point(0, 0);<br />
sus.Show();<br />
}<br />
<br />
}<br />
}
I want to pass a form name as a argument. what is wrong with this?
Please can anybody help me?
mWith
|
|
|
|
|
Just create a member variable for frmNew:
private Form2 frmNew = null;
private void CreateFrmNew()
{
if (frmNew == null)
{
frmNew = new Form2();
frmNew.MdiParent = this;
frmNew.StartPosition = FormStartPosition.Manual;
frmNew.Location = new Point(0, 0);
}
frmNew.Show();
}
Call CreateFrmNew, it will create frmNew if not exists, otherwise frmNew will be shown.
|
|
|
|
|
Hi im writing a TCP Server/Client application and i have a general Question.
When i have a TcpServer that will communicate with many clients.
Shall i communicate with the clients over one port
OR
Shall i communcate with the clients over one several port for each client ?
OR
Is it so, that the .NET-Framework handle this for itself and its no problem
to communicate with many client over one port ?
|
|
|
|
|
Everytime the client connected to your server, it will create a new TcpClient instance. That's why, you must use:
TcpClient tcpClient = tcpServer.AcceptTcpClient();
Just add this tcpClient to a list, and you can manage your connection to many clients using each tcpClient.
|
|
|
|
|
Yea i know but i use AcceptSocket().
But i thought that it can slow down the application when so many connections go over the same port =/
or did i though wrong ?
|
|
|
|
|
Im having a bit of difficulty doing a small simple Hangman game, im a novice at C# so any help would be handy thanks!
|
|
|
|
|
http://www.codeproject.com/netcf/hangman_dncf.asp
|
|
|
|
|
please explain your problem
|
|
|
|
|
What have you done so far?
|
|
|
|
|
Its something i was just assigned, so need a bit of guidance.
He's looking for arrays, 3 of them, like a easy/medium/hard version of the game. 6/8/10 lettered words.
|
|
|
|
|
Nobody here will do the work for you. But, they will be happy to help you along the way. You need to make an effort to create the project yourself. If/when you get stuck on a specific part, people here will definitely help you.
Since you haven't started the project, I suggest writing out the steps of the project (scope). You start with a high level overview of the project:
A Hangman program.
We select a random word from some source.
The user will guess letters.
We check if the letter exists in the word.
If the letter exists, display it in the correct place.
If the word is complete, the user wins.
If the letter does not exist, draw the next piece of the hangman.
If the hangman is complete, the user loses.
From there, get more specific about each of the steps until it looks like complete pseudo-code. From there, you can easily create the program based on the overview, which could possibly become the documentation of the project.
|
|
|
|
|
Thanks, ill post later on with a more detailed approach!
|
|
|
|
|
|
even if some one is in hurry or wants answer instantaneously,there is no harm.it is his need.if he has time why would he ask in a forum.he has every right to ask for an urgent response.nobody will ask urgent unless it is really so.there is no question of decreasing the willingness to answer.
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
What's your point???
This is not "The Loung" or the "Soap Box" to discuss those issues here.
This board is only for programmatic issues and questions and specially C# ones. so if you have some "Common Knowledge" posts, do it there
|
|
|
|
|
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&mpp=50&select=1278604&df=100#xx1278604xx
|
|
|
|
|
|
What is there to get angry and upset about?
|
|
|
|
|
Well he does live in India where they have that condom problem...
I know I'd be pissed off if I couldn't find a condom small enough to be of any real use... Silver lining: I think a company that makes zip-ties could really get a stranglehold on the "over-large" condom market there.
Ooops. Since I said "condom", does this thread need to be moved to the soapbox?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
No comment!
|
|
|
|
|
John Simmons / outlaw programmer wrote: Well he does live in India
Or is a comment on that, what you wanted?
If yes: Than it's really for the soapbox, where sombody can tell you that its not politicaly correct. (Not me)
|
|
|
|
|
How about clueless people that don't do their own homework, and believe that everyone should do their homework for them.
|
|
|
|
|