|
max29297 wrote: I'm not asking for a complete program or anything, but if I was going to make an application that would allow people to communicate from different computers via the web (similar to AOL Instant Messenger), how would I go about doing it? Something to get me started would be helpful. Thanks!
This article[^] should give you some pointers.
|
|
|
|
|
Thanks a lot!
-----
Note: *** Never give me an answer have anything to do with Visual Studio. I don't have this program, and it'll be that way for a long, long time. ***
|
|
|
|
|
can anyone tell me how wrappers are created. im relatively new to c#. i want to create wrappers to a c++ process code in C#?
|
|
|
|
|
To get from C++ to C#, you probably want to use p/invoke, if the C++ code is in a dll. Another option is to write it in C++/CLI, which .NET can call. Depending on the process and the code involved, a C# rewrite may be an option ( this is usually best, with p/invoke for any calls you need to make to Win32 functions )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi , i stored my connection in application settings i.e. project > properties> settings tab.
Now i need to access the connection string from code. How do i do it ??
any help is appreciated,
yojimbo
|
|
|
|
|
Hello,
I'm currently working on a project.
I use icons for my tool bars, ListViews etc.
The problem is that I sometimes need to use the same icon more than once, but in a different ListView, or tool bar.
When using a tool bar there's no problem because I can add an icon as a resource, and later on use this resource without adding it again and again.
However if I take a ListView, which of course needs an ImageList to display its icons, I have to add the same icons to the ImageList over and over again.
Does VS know not to add the same icon file to the exe twice?
Should I add the icons as resources, and then add those resources to the ImageLists using code?
Thanks in advance,
Shy.
|
|
|
|
|
hello
i wanto create an application (C#) like "free download manager" for download files.
i use "System.Net.WebClient" class for this .
such as following
...
string filename
System.Net.WebClient client = new System.Net.WebClient();
....
try
{
Uri uri = new Uri(urlTextBox.Text);
string fileName = System.IO.Path.GetFileName(urlTextBox.Text);
string downloadString = client.DownloadString(uri);
this.toolStripProgressBar1.Value = 0;
client.DownloadFileAsync(uri, fileName);
this.downloadButton.Text = "Cancel";
isBusy = true;
}
catch (UriFormatException ex)
{
MessageBox.Show(ex.Message);
}
...
my problem in use of this class is, i don't know how recognize file extension (in my code "fileName" vaiable) to download like .txt, .pdf
|
|
|
|
|
hi
you can verify the url when the Download url is entered in the textBox like
[CODE]
string s="http://www.google.com/file.txt";
if(s.EndsWith(".pdf")||s.EndsWith(".exe")))
{
//call the function for file download
}
else
//error message
[/CODE]
Q@!$3r
|
|
|
|
|
string fileExtention = System.IO.Path.GetExtension(urlTextBox.Text);
|
|
|
|
|
hmm just wondering how to check if the download url is like this..
http://www.some-site.com/sessionid/file?get=74
Like many site don't provide direct download link to prevent leeching ...
Q@!$3r
|
|
|
|
|
yes
my problem is this
|
|
|
|
|
hmm, try send WebRequest to url like this, and watch what the WebResponse is doing (or maybe the WebResponse's stream).. or create function to handle redirections, which MUST come from the WebResponse...
VirtualVoid.NET
|
|
|
|
|
i have a multi threaded program, and i'm confused about how thread works.
well, my question is that if i create a new thread, it will run along with the thread
of the main program, and if i call any function form within the new thread that i create, it will be excuted in the new thread, but if i want to call an asynchronous
operation from the new thread, what will happen then(since any asynchronous operation
will create new thread), it will be a thread inside thread or what?
i just need a little illustration a bout this situation.
|
|
|
|
|
Threads are not inside each other, threads are inside the application. If you start a new thread, it will be inside the same application, not inside any other thread.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I am using the following method to download a file from the internet ;
WebClient.DownloadFile(url,file_name_to_save)
Is it possible to show the progress of Download in a ProgressBar? I know it can be done via WebRequest and WebResponse object..But can it be done with WebClient Object?
Regards
Q@!$3r
|
|
|
|
|
hi , you can use this code ...
but befor i put code , i have a question :
for download , how can recognize the file extention ?
--------------------------------------------------------------
you can use "Download Progress Indicator Technology Sample "
topic in msdn
--------------------------------------------------------------
code
--------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
namespace downloadManager
{
public partial class Form1 : Form
{
private bool isBusy;
private WebClient client;
public Form1()
{
InitializeComponent();
client = new WebClient();
// Wire up the download complete event handler.
// The operation will either complete successfully or with an
// error code.
client.DownloadFileCompleted += client_DownloadFileCompleted;
// Wire up the download progress event handler.
client.DownloadProgressChanged += client_DownloadProgressChanged;
}
private void button1_Click(object sender, EventArgs e)
{
// If an operation is pending, then the user has clicked cancel.
if (isBusy)
{
client.CancelAsync();
isBusy = false;
this.downloadButton.Text = "Download";
}
// Otherwise go ahead and start the download
else
{
try
{
Uri uri = new Uri(urlTextBox.Text);
string fileName = System.IO.Path.GetFileName(urlTextBox.Text);
string fileExtention = System.IO.Path.GetExtension(urlTextBox.Text);
string downloadString = client.DownloadString(uri);
this.toolStripProgressBar1.Value = 0;
client.DownloadFileAsync(uri, "test");
this.downloadButton.Text = "Cancel";
isBusy = true;
}
catch (UriFormatException ex)
{
MessageBox.Show(ex.Message);
}
}
}
// Displays a message indicating that the download completed
// successfully, or if there was an error it will be displayed instead.
private void client_DownloadFileCompleted(
object sender, AsyncCompletedEventArgs e)
{
isBusy = false;
this.downloadButton.Text = "Download";
if (e.Error == null)
{
MessageBox.Show("Download Complete");
}
else
MessageBox.Show("Download Not Complete: " + e.Error.Message);
this.toolStripProgressBar1.Value = 0;
}
// Updates the progress indicator with the latest progress
private void client_DownloadProgressChanged(
object sender, DownloadProgressChangedEventArgs e)
{
this.toolStripProgressBar1.Value = e.ProgressPercentage;
}
}
}
|
|
|
|
|
hi,
I am using .Net 1.1 and I guess it doesn't have the namespace "DownloadProgressChangedEventArgs"
Thats why I got the following error
D:\VS\my C#\RssReader\Form1.cs(250): The type or namespace name 'DownloadProgressChangedEventArgs' could not be found (are you missing a using directive or an assembly reference?)
Well as far as File extention is concered it can be determind when the user enter the url the entered url then be validated to get the last chars to (using string EndsWith method)find the extention and it will be then comapred against the allowed ext type.....
Q@!$3r
|
|
|
|
|
I need Urgently The Source code for video watermarking..
If Anyone out there has it Please Forward it to me.. Or Please paste it In the Discussion Board.,,
I've created the pseudocode But not sure about how to Implement it or which language should i use.(tyhinkin of VJ#.NET and C#.NEt)_..
i just need a small Utility and the basic idea as of yet is a 1min video.. split it into frames and watermark the frames and recompile images to video..
please help me out.. thank U.
Christin
|
|
|
|
|
Well, DirectShow is what you need to do this, do you have that downloaded ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have a windows application in dotnet2.0 with sqlserver2000 database.
I m new to c# language.
I m making login form.I need to keep a checkbox for 'remember password'.
when user cheks it firsttime,nxttime when user enters his userid to login,his password must cum automatically in textbox2.
Can some1 plz help to accomplish this?
U can mail me at nekshan_sweetypie@yahoo.co.in
Thanking Anybody who can help in adv.
Nekshan.
|
|
|
|
|
hi,
i think the best way is to add a flag in the database or the users.
this flag is set to true when the user checks the remember password. You only have to check the users record of this bit field and accordingly you either display the password or not
|
|
|
|
|
this is not very secure... if you put a flag in the database to check for password if not checked, then anyone who puts that user's username in will have full access.
you need to identify the specific user with a user account. This is usually accomplished by using a persistent session or cookie.
|
|
|
|
|
Thanx QuiteSmart.
Yes i have taken a 'bit' field in database for setting flag n i want to do the same thing,chk if flag is 1 n as user enters username,pswd must automatically be shown in textbox2 for login.
Now what i donno is how to put a value (this chkbit,loginname & pswd)from my login form(a textbox & checkbox) into database.
Plz can u help on some code for this.
Thank U.
|
|
|
|
|
you might want to check out the authentication features of .NET 2.0
www.asp.net has some great video tutorials on how to implement this.
This is usually accomplished through the use of cookies or sessions.
|
|
|
|
|
Okay... it's been a while since i last posted a question here, but... now i ran into biiiiig problems.
The problem i have to solve is somewhat like this:
I have to design an UI which is similar to the one in Windows messenger(basic funcionality - only to send messages and files) through a local area network. Every computer on the network will have this program installed and i will have one server to configure and to transmit messages. the happy part of the problem is that the server is not my responsibility...
So ... i drag a few textboxes, buttons... and i have the User Interface. I enable drag&drop for the textboxes (just like in Y!M) and... now comes the problem(s).
How do i transmit the messages to the server (identified by an IP), maybe through some port? The message format is not one of my concerns, but... i guess sending data unencrypted over the web is not such a good thing (so i would need a way to encrypt data).
How do i listen to some ports of the LAN for incoming messages from the server?
How do i send files over the IP protocol? I think it is all about a transaction, but i have never done anything like this before (oh, i did! ... but that was on a ... serial port!).
Thanks a lot for even trying to understand me!
Any other ideas would be appreciated!
Thanks a lot again!
|
|
|
|