|
in my application i create a socket with the port no 7575 which is a well known port. but the problem is i'm not sure if this will be blocked when an anti virus software installed. so what i want is to prevent this risk by setting the port not to be blocked in any anti virus software.means with out touching the anti virus software, need to do it only through my application.any idea ?
|
|
|
|
|
First of all, ports are blocked in general by firewalls. If the user is running Vista, you can use the COM interface of Windows Firewall to unblock a port. On the other hand, this unblocks the port for every application. Why not just use a different port (I use 65535, there's a list on the internet of the ports each application uses [an RFC I think] so you could also just choose one not on that list)
|
|
|
|
|
we dont konw how to develop code for drag and drop inn c#.
|
|
|
|
|
|
Hi
i used the following code to run all the exe files listed in the list box control....listbox control contains a list of 10 exe files....
Now, if only 5 out of the 10 are currently running it should display a green colour otherwise a red colour....
How can i do this?
private void Start_Click(object sender, EventArgs e)
{
String n2,n1,n3,n4;
n1 = lb4.Text;
n2 = lb5.Text;
n3 = lb6.Text;
n4 = lb7.Text;
if (cb.Checked)
{
n1 = lb4.Text;
proc = Process.Start(n1);
proclist.Add(proc);
}
if (cb1.Checked)
{
n2 = lb5.Text;
proc = Process.Start(n2);
proclist.Add(proc);
}
if (cb3.Checked)
{
n3 = lb6.Text;
proc = Process.Start(n3);
proclist.Add(proc);
}
if (cb4.Checked)
{
n4 = lb7.Text;
proc = Process.Start(n4);
proclist.Add(proc);
}
}
|
|
|
|
|
You'd have to iterate over open processes and work out if any come from this exe. You might also consider making your code a bit more readable, and perhaps even have it work with any number of listbox items. this is really ugly and messy
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi ,
I am developing a website with DATA GRID that displays the details of a student. When I click on the registration no of the student, a new page should open with the full details of the student(Datagrid only shows important details of the student).
Please discuss your ideas to achieve this.
Ram
--------------------------------------
Defeat is not the worst of failures. Not to have tried is the true failure.
|
|
|
|
|
Maybe you could use the HyperLinkColumn class. It could be the column where the registration numbers of the students are; bind the column text and hyperlinks to the same database where you draw the student data from. You can read more about this class here.
|
|
|
|
|
how i can retrieve the number of input/output operations generated by each process in the task manager using c#?
|
|
|
|
|
I doubt you can, unless you use interop.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How to get the values through ItemCommand Event in datagrid?
|
|
|
|
|
What values do you want ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
using System;
public class class1
{
static void Main(string[]args)
{
try
{
string s1 = args[0];
string s2 = args[1];
int i1 = int.Parse(s1);
int i2 = int.Parse(s2);
int i3 = i1 + i2;
Console.WriteLine(i3);
}
catch (Indexoutofrange Exception)
{
Console.WriteLine(Exception.message);
}
Console.WriteLine("hello");
}
}
when i am running the application it shows the following error
the type or namespace name indexoutofrange could not be found and one more error is system.exception does not contain a definition for message
|
|
|
|
|
aratireddy wrote: the type or namespace name indexoutofrange could not be found
Its IndexOutOfRangeException and not Indexoutofrange, case sensitive
aratireddy wrote: ne more error is system.exception does not contain a definition for message
is because of,
aratireddy wrote: catch (Indexoutofrange Exception)
{
Console.WriteLine(Exception.message);
Its Message and not message. Exception is a class in the .Net library, use some other name for the exception variable.
|
|
|
|
|
Hi,
Can anybody help me to develop a voice conference application? I made a deep search in internet to study about voice conference application, but i didt find any helpful topics.
What are the techniques to develop a voice conference application?
Thankyou,
yesuprakash
|
|
|
|
|
|
what is the technology used to develop voie chat application.
|
|
|
|
|
C#[^] ??
Did you read this [^]?
|
|
|
|
|
hi friends i have created 1 activex in that i have error at run time which is
"Could not load file or assembly 'DirectShowLib-2005, Version=2.0.0.0, Culture=neutral, PublicKeyToken=67e7b740cdfc2d3f' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)"
Source="StreamVideoComponent2"
CAN U PLZ HELP ME IN THIS MATTER
|
|
|
|
|
hi all ...
I found that alot of (server , client) applications have this part of code in the "server"
<br />
void StartMethod()<br />
{<br />
<br />
<br />
mytcpl = new TcpListener(5020);
mytcpl.Start();
mysocket = mytcpl.AcceptSocket();
myns = new NetworkStream(mysocket);
mysr = new StreamReader(myns);
string order = mysr.ReadLine();<br />
if (order == "SD")<br />
<br />
<br />
<br />
else MessageBox.Show(order + " Request Not Found");<br />
mytcpl.Stop();
<br />
<br />
<br />
<big>if (mysocket.Connected == true)
{<br />
while (true)<br />
{<br />
StartMethod();
}<br />
}<br />
}</big><br />
the Question is :
why to check if the 'socket' is connected where it is already closed by stoping the 'TCP Listener' ?
thanx
|
|
|
|
|
A_A wrote: else MessageBox.Show(order + " Request Not Found");
mytcpl.Stop(); // Close TCP Session
//when stop the tcp listener doesn't that mean that we stop 'disconnect' the socket
No when we stop the TCP listener it does not mean that we will be disconnected .
To make it more clear , a TCP listener is a class which waits for the connection to happen at specified port and IP , the listener does not participate in actual connection and data transfer , the actual connection and data transfer is carried out object of class Socket (mysocket variable in above code) , mytcpl.Stop(); stop the listener that mean that we are no more accepting new connection , the the already connected connection are still there
I hope this is understandable
Thanks
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
thank you
|
|
|
|
|
i have imagelist inside listview box. i need to add that imagelist images in to another imagelist.how can i do that......
i can get imgage index by
ListViewItem item = e.Dtat.GetData(typeof(ListViewItem)) as ListViewItem;
item.imageindex by this i can get image index of fistlist view.
so how can i add the image in to new image list using this image index??
or is there got any other possible way...
A S E L A
|
|
|
|
|
Hi,
I haven't used ImageList class yet, but I just read some of the documentation, and that helps.
An ImageList has a Images property, which is a collection, meaning you can get one of its members by using an index, you can clear the collection by calling Clear(), and adding to the collection by calling Add(). So this would be my first attempt:
foreach(Image image in ImageList1) {
myListView.Images.Add(image);
}
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:56 AM
|
|
|
|
|
ya but how can i call image by image index.....i don't have image path oretc have pnly image index of other image list....
A S E L A
|
|
|
|