|
AFAIK, you have to create your own form and use some methods to draw the icon on it. This form can return a DialogResult as message box does.
|
|
|
|
|
If you decide to create it yourself I recommend doing it from scratch.
But the other reply has a link to a nice article that does exactly what you want.
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Hi,
please send me code sample for uploading a video in c# .net
|
|
|
|
|
This is NOT rentacoder.com
Nobody is just going to give you code.
You need to do your own research, write your own code, try to get it working and then when/if you get stuck on a certain piece of code you can post it here (with the error message if any) and people will try to help.
That goes for both your posts.
|
|
|
|
|
Manilipa wrote: please send me code sample for uploading a video in c# .net
Sure.
public interface IUpload
{
void UploadItem(Stream value);
}
public class UploadVideo : IUpload
{
public void UploadItem(Stream value)
{
SaveStream(value);
}
private void SaveStream(Stream value)
{
}
} There - all you have to do is provide some code to write the stream to whatever medium you're saving it to, oh and a mechanism to get the data into your UploadVideo class, but that's trivial implementation detail. I'm sure a rocket scientist like yourself won't have any problem with this.
|
|
|
|
|
Maybe you should read the first article and adapter yourself to ask question properly.
LuckyBoy
|
|
|
|
|
Hi,
please send me code sample of email functionality with attachment in c#.net
|
|
|
|
|
Is Google on holiday today?
only two letters away from being an asset
|
|
|
|
|
|
|
While that is seriously cool, I don't think you're doing him any favors by further automating it.
"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
|
|
|
|
|
Oh, that's simple, all you need to do is to write a system mouse hook, then just grab the mouse, open a mail client, attach a file and click the send button.
But hey, that's all in code
Regards,
Lev
|
|
|
|
|
Hi,
I'm writing a c# application that imports a c++ dll.
The next code is in the c++ dll:
// Maximal size of allowed log
#define ASTRO_MAX_LOG_LENGTH 1000
I need to use this defined value in my c# code.
How can I do that? Is there some way to use DllImport for a defined value?
Thnks
|
|
|
|
|
No, there isn't. You'll have to define these constants in your C# code yourself.
|
|
|
|
|
I want enumerate list of files and folders of intranet network folder, I tried using directoryInfo and fileInfo, but unable to get list.
I tried with following code
DirectoryInfo di = new DirectoryInfo(@"\\officepc\myprograms")
This code doesnt works.
when i paste \\officepc\myprograms in windows explorer i can see files.
RN Softech is a goan software development company, based at Goa, India.
|
|
|
|
|
|
Hi
I am able to access the shared folders fromn the same.When u access it from explorer ,whether it asks any password or not?
One more thing,After instantiating DirectoryInfo use exists property to check whether it has read the folder or not as
di.Exists
if true then enumerate it else there is some problem in reading.
Cheers!!
Brij
|
|
|
|
|
Rajesh Naik Ponda Goa wrote: This code doesnt works.
A little more explanation might helpful. It doesn't return results, it throws and exception, "doesn't work" is a bit vague?
only two letters away from being an asset
|
|
|
|
|
Hi,
I am using below code to delete a file from my application which works fine for some folders. When I try to delete file from system folders such as \program files\.. or windows\... folder i get access denied. What are the changes required so that whenever user tries to delete file from system folder, vista will show security popup which asks administration password which it normally does for system folders.
Here is the code..
if (File.Exists(Path.Combine(tstxUrl.Text, lvItm.Text)))
{
File.Delete(Path.Combine(tstxUrl.Text, lvItm.Text));
}
Thanks
RN Softech is a goan software development company, based at Goa, India.
|
|
|
|
|
He has to have administrator privileges. How much more clear could Vista be about that?
"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
|
|
|
|
|
As John said you need to give your program administrator rights to do this.
This can be done in vs2008 by setting the UAC settings in your project settings (application tab, 'view uac settings' button).
This will however have the effect that every time the user starts the program vista will ask the user if he is sure that he wants to start the program since it requires administrator rights.
But why would you want to give the user the possibility to delete files in these folders? They are protected for a reason.
|
|
|
|
|
Thank you for your valuable help
But why would you want to give the user the possibility to delete files in these folders? They are protected for a reason.
Actually my application is similar to windows explorer, a file management tool, hence i required this functionality.
RN Softech is a goan software development company, based at Goa, India.
|
|
|
|
|
I am writing a database application using Csharp. The database can be access, sql server whatever.
I have 100 variables in one database table. The variable names are V1, V2,V3,...,V100.
I put 100 textBox controls on one Form. I hope users input data through these textBoxes.
the codes look like:
V1=textBox1.text;
V2=textBox2.text;
V3=textBox3.text;
....
V100=textBox100.text;
This is just too tedious.
I want to do this way:
Make a 100 elements array V[i], and use a for loop;
for(int i=0;i<100;i++)
{
V[i]=textBox[i].text;
}
I can do this in SAS program using Marco variable.I am wondering if I can do this in csharp.
Thanks.
|
|
|
|
|
for (int i=1; (i <= 100); i++) {
TextBox t = getControlByName (String.Format ("textBox{0}", i)) as TextBox;
if (t != null)
V[i] = t.Text;
} For an example of getControlByName() see this[^] article.
/ravi
|
|
|
|