|
I am working on A project that needs a dial-up connection to the internet;
i need away to make this connection
this is my e-mail "ahmed_sep_1983@hotmail.com" please any code ,i am a computer Engineering student and this is apart of my graduation project so please help me ;
any one,any thing;
"using C#"
|
|
|
|
|
:bigtime-sigh:
1) Your choice of thread title is a joke, please please please go and lookup "how best to get answers on technical forums" and pay specific attention to the section on picking a suitable title for your thread.
2) Your explaination of the problem you are facing is so far from suitable its unbelievable. (As above, but this time pay attention to the section on formulating your post).
3) The whole purpose of forums like this is that others can learn as well as yourself. Asking for an answer to be mailed directly to YOU shortcurcuits this. This will be covered in the above as well.
|
|
|
|
|
hi
i want to know that if there is any xml control that can display xml file in winform application or even if there is any html control
i found xml control and html control in web Application in c#
Saima
|
|
|
|
|
DataGrid[^] does that. It's not pretty, but it does the job. You have to bind the data source to a DataSet[^]object, which can in turn read and write XML.
|
|
|
|
|
will it give output like
<item>
<item#>1
coz i don't think so datagrid will do this and i need this output on the control
|
|
|
|
|
use internet explorer - there are a few articles on code project.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hi all,
I am developing a application where i convert all msi into a encrypted file. when they want to install the application, I decrypt the encrypted msi files and copy it to temp folder and install. After installation i have to delete that MSI file from Temp.
How to perform this. I couldnt get the msi running in the process it gives just msiexec.exe.
Please help urgent
Venky
|
|
|
|
|
Why bother?
Obviously you don't want people to see your MSI file.
But Windows Installer needs the unencrypted MSI file, so if somebody wants to get the unencrypted MSI file, writing a program that's watching Temp and copying the msi to a different location is a matter of minutes.
Or, if the installation takes more than about 5 seconds, you can even copy the MSI by hand.
So your efforts are just a waste of time IMHO...
mav
|
|
|
|
|
Hi,
I have a tab with 4 tab pages. Each page contains a RichTextBox.
I have no problems with the tab pages in the application when running on XP system.
on most windows 2000 systems it is fine as well but on some windows 2000 systems only the first tab is active and the other 3 are gray with no RichTextBox open on them!
Does anyone know what could be the reason for it? I tried everything I could (including trying .NET framework 2.0) but found no solution for this.
Please help.
Thanks.
avivhal
|
|
|
|
|
Hi all
I want to know as to how to write a program in C# to recieve characters from the internet port(like port 25)and store it in a file.
Can someone help me with the code or any help for such a programe?????????????!!!!!!!!!!!
Thanks.
|
|
|
|
|
Hi!
A small example, written from memory, for you to start with:
System.Net.Sockets.TcpListener listener = new System.Net.Sockets.TcpListener(25);
listener.Start();
do
{
if (listener.Pending())
{
System.Net.Sockets.TcpClient client = listener.AcceptTcpClient();
byte[] buf = new byte[client.ReceiveBufferSize];
int len = client.GetStream().Read(buf, 0, buf.Length);
MessageBox.Show(len+" bytes received");
}
else
{
System.Threading.Thread.Sleep(100);
}
} while (true);
Regards,
mav
P.S.: "'Multiple exclamation marks,' he went on, shaking his head, 'are a sure sign of a diseased mind.'" (Terry Pratchett in "Eric").
|
|
|
|
|
Hi all
How would I go about downloading files from the internet for example a zip file, using windows forms? Would I be using webservices?
Thanks
|
|
|
|
|
|
Well, there are quite some ways to do this.
Sit 1: You want to create some "auto-update" functionality. You could then run a "server"-program on a machine and have your client connect to that machine using whatever you think would be the best approach (e.g. sending "GET LATEST" and receiving a bytestream), all implemented by yourself.
Sit 2: You want to download a certain file that is NOT provided by you. You would THEN have to use (and perhaps implement) the protocol used to retrieve that file.
TCP / UDP sockets are readily available in the .NET FW, as are some "more detailed" implementations, which you might choose depending on where you plan to retrieve the file from.
Without more information, thats all I can say.
|
|
|
|
|
Hi
I want to find if a machine is connected to network. bu the SystemInformation.network give me status as connected even when i unplug the network cable.
After looking in the internat I found this piece of code to overcome the problem.
System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapter");
System.Management.ManagementObjectCollection objCol = searcher.Get();
foreach (System.Management.ManagementObject networkAdapter in objCol)
{
if (networkAdapter["NetConnectionStatus"] != null)
{
if (Convert.ToInt32(networkAdapter["NetConnectionStatus"]).Equals(2))
{
MessageBox.Show("true");
break;
}
else
{
MessageBox.Show("false");
}
}
but the above piece of code throws a exception "Invalid query". Can anyone let me know what the problem is.
Thanks
Sharath
|
|
|
|
|
Hello
Is there anyway to count Childrens of a directory Entry?
i am unable to count no of children in the following code
foreach (DirectoryEntry Site in W3SVC.Children)
{
}
Actually i want to store children Items in Array and I am unable to store in dynamic arrays
-adnan
|
|
|
|
|
hi, i hope i understand your question, you want to get the count of files or directories in a directory? if this is your question then here is the answer
string [] files;
files = Directories.GetFiles(directory path);
files.length gives you the count of files. this also applies to directories as well:
string [] directories;
directories = Directories.GetDirectories(directory path);
int numberofelements= directories.length+files.length;
hope this helps
|
|
|
|
|
Has anyone noticed AppendText being really really slow? It causes a Gen 0 garbage collection almost every call, and even more frequently as the text grows.
I looked at the AppendText code with .NET Reflector[^], and it turns out that that AppendText calls set_SelectedText, which does a lot.
set_SelectedText uses some SendMessage calls if base.IsHandleCreated, and otherwise splits all of the original text into two strings, and then concats them back into a new string which the Text property is assigned to. That's two new strings half the size of the whole text, and another string the size of the whole thing -- not too surprising that it's so inefficient.
I learned that SetStyle(ControlStyles.CacheText, true); is a remedy, but somehow it hasn't made any difference. I also tried checking to make sure base.IsHandleCreated is true, and surely enough it is, but in that case, it shouldn't even be doing much in managed code.
Any ideas? Thanks in advance.
|
|
|
|
|
AppendText is also buggy in v1.1, it doesn't allow text to be more that 32767 characters. Does this help?
<br />
textBox.Text += "Your Text";<br />
textBox.Focus();<br />
textBox.Select(textBox.Text.Length - 1, 0);<br />
textBox.ScrollToCaret();<br />
Regards
Senthil
My Blog
|
|
|
|
|
Nope
AppendText caused 47 GCs, Text += caused 68.
Thanks though.
|
|
|
|
|
Hi there,
I want to open a socket to a smtp server to send some command like when use telnet.
exp: helo mail.yahoo.com
Then receive message response.
exp: 250 mail.yahoo.com
I don't know is it OK?
Anh, when send a message to smtp server, how to send it like a string. send() method of class socket accept param type of byte[], so, how could I send a command string like "helo mail.yahoo.com"?
Thank you very much.
|
|
|
|
|
Hi,
It is possible to do this with the Socket class or the TcpClient class. I'd suggest you go with the latter. As for sending strings, you can wrap the NetworkStream in a StreamWriter like this,
<br />
TcpClient tcpClient = new TcpClient("smtp_server_name", 25);<br />
tcpClient.Connect();<br />
using (StreamWriter s = new StreamWriter(tcpClient.GetStream());<br />
{<br />
s.Write("HELO SERVER");<br />
}<br />
One thing you need to note is that the SMTP server need not have the same domain name as the webserver. For eg. mail.yahoo.com is the domain name for yahoomail webserver, but it is NOT a SMTP server. You then need to look for MX records.
Regards
Senthil
My Blog
|
|
|
|
|
Thank Senthil very much.
And I want to know to could get message receive from that server?
We'll using a StreamReader, get the stream of the socket and get the message?
Thank you again.
|
|
|
|
|
Yes, that'll work.
Regards
Senthil
My Blog
|
|
|
|
|
Hello,
I am displaying the contents of a rich text control on the printer using the EM_FORMATRANGE message. I would like for the text to be drawn over a colored background. However, it appears that during the processing of the EM_FORMATRANGE message a white rectangle gets drawn behind the text, spanning the width of the bounding rectangle and extending down to the last line of text. I have tried setting the background color of the graphics device context using SetBkColor, tried setting the background brush of the rich text control's client area using SetWindowLong, and tried changing the character format of the control using the EM_SETCHARFORMAT message. While changing the character format does draw the correct background color behind the printed text, the white rectangles still appear.
Maybe I'm doing something wrong, but I'm about to give up on the EM_FORMATRANGE message and draw the text myself. Does anybody know of the correct way to draw rich text over an arbitrary color?
BTW: If I draw to a bitmap, everything works fine.
Thanks in advance,
Jarrod
|
|
|
|