|
Hello!
I have a windows form that, by use of a menu, opens another window (not an MDI child). When I close this new window, the form also closes. How can I prevent this from hapenning?
Thank you,
Patrícia Gonçalves
|
|
|
|
|
You can try with a modal window...
<br />
Form1 form = new Form1;<br />
form.ShowDialog();<br />
try this..
hope it helps ^^
|
|
|
|
|
how can i connect two clients knowing their ip addresses but each one
may be using different or same connection type Like may be DSL or
Dialup connection by knowing ip addresses ?
Additionally, i programmd two applications one is the server and one is
the client.
I gave the client application to my friend on the internet through
yahoo messenger chatting and i gave him my ip address and then i ran my
server listening on specific port and on my current ip address which i
took from my dial up connection but this is not useful because the
client gave him an exception telling him that (the server can't be
found) That means he didn't see my ip address as connected device
through the network may be this is because iam behind firewall but my
pc already doesn't have any firewall plugged in or may be Iam behind
NAT !!!! ok but if my ip address is private address which made my
friend can't logged in into my server application so what is the
solution ?
Mess With The Best And Die Like The Rest
|
|
|
|
|
Find out your public IP address.
whatismyip[^]
---
b { font-weight: normal; }
|
|
|
|
|
I am looking for a TextBox control that would allow entering numbers only and with a digit grouping, the same way that Calculator does it in Windows XP when digit grouping is switched on.
Is there a control that can do it, or is it possible with standard windows forms textbox control?
Tnx in advance
Dragan
|
|
|
|
|
Just try in it, and post here your problems and questions, and try to use the standard TextBox and use its events like TextChanged and do your custom code within it.
"I am a lair" Is this statement true or false ?
|
|
|
|
|
Yea - roll your own and the keep it for use in other projects...
LongHC - Yes you are, you must be... if your were not then you would not be able to make that statement.
MCSD(VB6/SQL7)
MCAD(C#/SQL2000)
MCSD(C#/SQL2000)
-- modified at 6:52 Friday 4th November, 2005
|
|
|
|
|
If I am, then I am in this statement, thus it is not true; thus I am not
"I am a lair" Is this statement true or false ?
|
|
|
|
|
If you are not a liar then you can not make that statement.
If you are a liar then you don't always have to lie, so you can make that statement.
Therefore you are.
You must be....
MCSD(VB6/SQL7)
MCAD(C#/SQL2000)
MCSD(C#/SQL2000)
-- modified at 8:41 Friday 4th November, 2005
|
|
|
|
|
I got this:
Process tx = Process.GetProcessesByName("process name");<br />
tx.Kill();
but it says that you cant convert System.Diagnostics.Process[] to just System.Diagnostics.Process.
|
|
|
|
|
Well, that's because GetProcessesByName returns an array of Process objects, which is exactly what the error message says. You need to iterate through the array and Kill() on each one.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I dont know how to do that
|
|
|
|
|
I think it would be better if you read a book that teaches basic C# constructs before proceeding any further. You really should know how to loop over an array.
foreach(Process process in Process.GetProcessesByName(...))
{
process.Kill();
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Ahhh. I was, doing something like that. I made a new process (in this case 'tx') then tried to do foreach( Process in...)
Well. Thanks, you've been a great help!
|
|
|
|
|
Hi.. I'm doing a project on C# web application. On one of the part i need to retrieve user list and from there i can select one of the user and do the edit and delete on just the user we have selected. I have manage to retrieve the database of user list but now i was unsure about how can i select just the particular user and do the edit and delete from there.. Anyone, can help me with it? Thankz..
Cheese_kid =p
|
|
|
|
|
Hi there,
Your question is so generall . You need to ask a scpecific question.
Cheese_kid wrote: i need to retrieve user list
where do u retrieve user list? (Database, or just normal file)
if u decide which technology used as ur back-end, so then you should go ahead with some next steps
<< >>
|
|
|
|
|
Hi All,
I wanna get the width and height of a character with font "Arial" or any fonts, do you have any solution for this case ?
Thanks
|
|
|
|
|
The following function will return a SizeF having the width and height that you need...
System.Drawing.Graphics.MeasureString(String, Font)
|
|
|
|
|
hi,
I have to implement transactions in my code, using enterprise services.
I have no idea about it. Could anyone please tell me some links where i could know how to work with it? even sample codes would help
Thank,
Dee
|
|
|
|
|
I'm not experienced with enterprise services, but have you looked at System.Transactions namespace in the .NET 2.0 framework?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Morality Apart from God
Judah Himango
|
|
|
|
|
Enterprise services is simply another name for COM+/MTS.
Basically this wraps all calls to objects within the COM+/MTS container in a transaction. So You write a DLL with a method (or several of course) and put it into COM+. All calls to the DLL will then be wrapped in a DB transaction.
If you look on MSDN for Enterprise services you will find a lot of information on them. It is not really that complex from a development point of view, from what I remember you simply implement an interface or two.
MCSD(VB6/SQL7)
MCAD(C#/SQL2000)
MCSD(C#/SQL2000)
|
|
|
|
|
Hi, I have the following code
Stream stream = File::Open(fileCFDPath, FileMode::Open, FileAccess::Read);
how could I clone the stream into a MemoryStream so I dont have to access again the file?
The reason I´m doing this is that the following constructor closes my stream, and after the XPathDocument ends loading the stream, I need to use it later in the code
XPathDocument doc = new XPathDocument(stream);
Thanks in advance
Isaac B
|
|
|
|
|
FileStream fs = File.Open(...)
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, ...); // read the whole file stream into the buffer
MemoryStream stream = new MemoryStream(buffer);
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Morality Apart from God
Judah Himango
|
|
|
|
|
You could call stream = File::Open(fileCFDPath, FileMode::Open, FileAccess::Read); after you call XPathDocument doc = new XPathDocument(stream); . That would reopen the stream, and you wouldn't incurr the performance hit of reading the entire file several times that you would by reading it into a memory stream:
Read once into MemoryStream.
Read once with XPathDocument.
Read again for your "later use".
|
|
|
|
|
Hi guys.Trying to connect C# and Matlab so I can execute any .m files from my C# program and get result(graphs) in my own user control.Anybody has any idea if its possible.Best regards
|
|
|
|