|
|
1.21 Gigawatts wrote: Or, a simpler method using GZipStream[^]
That won't make (or read) an actual zip file though, only a gzip file
|
|
|
|
|
Ohh.
Ta
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
|
|
|
|
|
|
I want to Export Registry values. I trid a lot and Googled a lot but no sample came me found... can any body help me rearding this...
|
|
|
|
|
|
sir/madam
hoe to create a listview in C#
|
|
|
|
|
Can you be more specific?. The only answer i can give is Drag and drop ListView into Designer.
|
|
|
|
|
|
0) Use the designer in the IDE.
or
1) ListView listView = new ListView();
Since you apparently have no skills, I'd use the designer if I were you..45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
I take it you think four words (two of them identical), four spaces and four other characters is beyond him then?
I think you may be right...You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
I don't know why, but people that aren't trying to help themselves are really bugging me today..45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
Hi,
I am uploading large audio file using webclient in windows form.
Now if file is small then it is uploading but if file is larger in size like 200 mb or more then it showing exception that System.OutOfMemoryException .
So How can I solved it.
My code is give below.
WebClient client = new WebClient();
Stream stream = client.OpenWrite(remoteFilename, "PUT");
// The buffer size is set to 2kb
const int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
// Opens a file stream (System.IO.FileStream) to read the file
// to be uploaded
FileStream fs = fileInf.OpenRead();
int doneSoFar = 0;
// Read from the file stream 2kb at a time
contentLen = fs.Read(buff, 0, buffLength);
//added for accurate progress
doneSoFar += contentLen;
setItemStatus("Uploading");
while (contentLen != 0)
{
setItemProgress(doneSoFar, fileInf.Length);
// Write Content from the file stream to the FTP Upload Stream
stream.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
doneSoFar += contentLen;
}
// Close the file stream and the Request Stream
stream.Close();
fs.Close();
Thanks
sjs
|
|
|
|
|
Are you running this in a Thread? Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Hi
Thanks for reply..
I am not using any thread. Can you pls show me how can i write thread in the above mention code
Thanks
Sjsmodified on Saturday, March 6, 2010 5:03 AM
|
|
|
|
|
It is pretty simple though. Make sure you add
using System.Threading;
private void btn_StartLoad_Click(object sender, EventArgs e)<br />
{<br />
ThreadStart startload = new ThreadStart(startUpload);<br />
Thread threadload = new Thread(startload);<br />
threadload.Start();<br />
}<br />
<br />
private void startUpload()<br />
{<br />
} Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
ok Thanks I will check it out
|
|
|
|
|
Hi,
I want to get installed Word applications Author name using windows form.
I manage to get the whether word application is installed or not. But Now I want Author name of that word application.
So How can get it ?
Thanks
sjs
|
|
|
|
|
Hi,
I don't know if you've looked into it already, but have a look at Word Automation.
Here's a link I found that enables you to get the 'Author' property of a Word Document:
http://support.microsoft.com/default.aspx/kb/303296[^]
It may not be exactly what your after but it may help you on the right path.
There's also this link about Word Automation in general[^].
Hope it helps.
[Edit]
If it's not in there, then check out the Registry[^], it may be a setting in there.
Laters.
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
modified on Saturday, March 6, 2010 3:22 AM
|
|
|
|
|
I'm trying to access the protected member PointInLink() from LinkLabel.
I've been able to get at it doing the following:
private void LinkLabel_MouseHover(object sender, EventArgs e)
{
Point p = MyLinkLabel.PointToClient(new Point(Cursor.Position.X, Cursor.Position.Y));
ProtLL pll = new ProtLL();
LinkLabel.Link lnk = pll.GetLink(p.X, p.Y);
if (lnk != null)
{
}
}
class ProtLL : LinkLabel
{
public Link GetLink(int x, int y)
{
return PointInLink(x, y);
}
}
The thing is, "lnk" is always null, since PointInLink has no idea which LinkLabel it's looking at. I can't seem to pass "MyLinkLabel" as an argument in GetLink(), as it then hides the PointInLink member again.
Is accessing PointInLink just not possible or am I going about it the wrong way?
Thanks in advance.modified on Saturday, March 6, 2010 1:27 PM
|
|
|
|
|
Yes It always return null
because you are using new ProtLL instance
I think you have to use ProtLL object in your form insted of LinkLabel
beacuse it is aleady inherited in ProtLL
Life's Like a mirror. Smile at it & it smiles back at you.- P Pligrim
|
|
|
|
|
Hi and thanks for the response.
If I create the LinkLabel using ProtLL, I still cannot access PointInLink.
Ultimately, what I'm trying to do is get what link is under the mouse cursor in a LinkLabel control.
Edit---------------
Khaniya,
You were right, too. I messed up my test bed.
Thanks to you, too!modified on Saturday, March 6, 2010 3:07 PM
|
|
|
|
|
swo.priv wrote: Ultimately, what I'm trying to do is get what link is under the mouse cursor in a LinkLabel control.
Surely then you should use the MouseHover Event[^] of the LinkLabel[^] Control?
"If you can't explain it simply, you don't understand it well enough" ~ Albert Einstein
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair
|
|
|
|
|
That would be an ideal way to do it, if the MouseEventArgs contained data related to the link that was under it. Also, the MouseHover event uses EventArgs, anyway.
The only event I've seen that holds data related to the links is LinkLabelLinkClickedEventArgs.
Is there a way to use different EventArgs from other events?
|
|
|
|
|
swo.priv wrote: hat would be an ideal way to do it, if the MouseEventArgs contained data related to the link that was under it. Also, the MouseHover event uses EventArgs, anyway.
Why is this a problem? You know which LinkLabel you are in because MouseHover tells you in the "sender" param - all you have to do is cast it to a LinkLabel or derivative:
LinkLabel l = sender as LinkLabel;
if (ll != null)
{
...
} or
ProtLL pll = sender as ProtLL;
if (pll != null)
{
...
} You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|