|
|
hi,
How can I know if any thing had been downloaded into the computer wheather it was from the internet or any other sources and how do I track the location where these downloaded files are. Your help is geatly appreciated.
|
|
|
|
|
You don't.
There are so many sources for data to come in from, you're not going to be able to monitor them all. On top of that, the source for data isn't kept anywhere in the system. Well, at least reliably. The History section of IE will tell you which website a file came from. But, if you write code to decipher IE's History, that same code will NOT work with any other browser. Each will have their own implementation of a history.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
You're telling me that it will log every file coming in from every possible source? Got a link to any docs that mention this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi,
I need some tutorials/examples of using IExpando. Could anybody point out any URLs or whatever is helpful?
Thanks
|
|
|
|
|
|
Can anyone tell me how to acquire a run-time license specifically for the MSComm.ocx that shipped with Visual Basic 6 to be used in a C# project? I have searched both here and in the MSDN KB, I found a reference to adding a run-time license to a C++.Net project, but even that wasn’t functional.
I have a C# project in which I am using this control, and it works great in the development environment, however, when I tried deploying my application, I got the obnoxious “You-don’t-have-a-run-time-license” BS.
To anyone that can help, thanks ever so much in advance!
As for Bill, those of us using C# that MUST use serial ports would like to say, “Thanks for nothing, !@#$%^.....”
|
|
|
|
|
RelmBK wrote:
As for Bill, those of us using C# that MUST use serial ports would like to say, “Thanks for nothing, !@#$%^.....”
I'd like to see you writing a framework for a modern OS and supporting every feature with your first release. Regarding your problem, I don't think using a COM component to access the serial ports is a good idea as they only encapsulate the Win32 API and there actually are serial communication classes written in C# (Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications[^] for example). Besides, the .NET Framework 2.0 contains a class called SerialPort[^].
Best regards
Dennis
|
|
|
|
|
ok,
I have a variable, of which I need to escape its contents. the problem is, I don't want to escape out the variable, but I do want to escape out its contents as I said earlier. also, the reason I have to escape the variable, is because it will have potentially these symbols: ",;@' . this is a problem, because it will mess up the symbols used in my code to ignore the variable's string value (containing those symbols.) how do I do this? I don't want to use the escape way, because that doesn't work. any ideas? I'm totally stuck.
also, how do I insert the ' symbol into a textbox?
thanks for the help,
Stephen
|
|
|
|
|
I can't really understand your question? Can you give a short sample program that demonstrates it?
And doesn't textbox.Text += "'" work?
Regards
Senthil
My Blog
|
|
|
|
|
oops, yeah, "'" works. I meant how to insert the " symbol.
int current = 1;<br />
int lines = richTextBox1.Lines.GetLength(0);<br />
if (lines < 3)<br />
{<br />
MessageBox.Show("You need to have atleast three lines, otherwise this application is useless", "Useless he he ;)", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
}<br />
else<br />
{<br />
richTextBox2.Text = '"' + richTextBox1.Lines[0] + '"' + " " + '+' + " " + '"' + @"\r\n" + '"' + " " + '+' + " ";<br />
while (lines > 2)<br />
{<br />
richTextBox2.Text += '"' + richTextBox1.Lines[current] + '"' + " " + '+' + " " + '"' + @"\r\n" + '"' + " " + '+' + " ";<br />
current ++;<br />
lines --;<br />
}<br />
if (lines > 1)<br />
{<br />
richTextBox2.Text += '"' + richTextBox1.Lines[current] + '"';<br />
}<br />
}
what happens is, the user inputs text into the richTextBox1, and when the user clicks a button to run the above code, the code is sent to the richTextBox2. the problem is, all the code must be on one line, formatted properly on that line, and display the formatting (text) necessary for the outputted code to be useable in another application where there could potentiall be hundreds of lines of text, without manuall writing all the "\r\n"'s to format it. the problem is, what if the person puts in "\r\n" into the input richTextBox1? or what if they put in a " symbol or a ; symbol. the contents of richTextBox1 are formatted in the code above, but the problem is, where you see "richTextBox1.Lines[current]", the symbols that user inputted as described above, screw up the formatting when ouputting the text to richTextBox2.
like for instance, say I put the " symbol in richTextBox2. it will then think it has reached the end of the string to be formatted, when that is not the correct " symbol to stop at.
please help, this would be a very helpful application to people I think, atleast for me when I want to format many paragraphs so I can just paste the code for an application that needs text formatted to a textbox in such a way.
the current code I have works like a dream, except it messes up as described above when these symbols are inserted:
;
'
"
+
and possibly a couple others.
if there is no easy way you can think of, my idea was to use a regular expression, and select and replace all those symbols with "'", etc.
the problem with this is, """ doesn't work to place the " symbol to a string or insert it into a text box as text. same with the ; and other symbols. how do I do this?
hilf mir!!!,
Danke schoen,
Stephen
|
|
|
|
|
|
see the problem is, that I need to escape the contents of the variable, not the variable itself. so escaping it would place the variable into the text, rather than its contents. also, as earlier, the " symbol would stop the escape before the correct " symbol is reached. this would mess things all up.
|
|
|
|
|
Question #1: ASCII Collating Sequence:
I would like my application to utilize some keyboard shortcuts like the UP ARROW, DOWN ARROW, LEFT ARROW, RIGHT ARROW, TAB KEY, and SHIFT KEY. I would like to implement them into a KEYPRESS event at the form level but I do not know what the ASCII collating sequence is to represent them in the KEYPRESS event.
Here is my code so far:
<br />
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Form1_KeyPress);<br />
<br />
public Form1_KeyPress(object sender, KeyPressEventArgs e)<br />
{<br />
if (e.KeyChar == (char)13)<br />
{<br />
statusBar.Hide()<br />
e.Handled;<br />
}<br />
else<br />
{<br />
statusBar.Show();<br />
e.Handled;<br />
} <br />
}<br />
I looked throught the VS.NET help files and through the internet but could not find the aforementioned ASCII code numbers nor how to specifically represent them at the form level so that they would be triggered by their respective key press events. Would appreciate some assistance at examining this issue in more detail.
Question #2: Form Container:
I would like my application to have the forms incorporated inside the main form and not as separate forms all over the screen. When the main form moves, I would like the children forms to be moved as well, and when the main form minimizes, I would like the child form to be minimized INSIDE of the main form rather than inside of the windows minimization bar at the bottom of the screen. I looked through all of my C# books, and have not encountered this mentioned in any of my classroom studies. Could somebody kindly point me in the right direction? I would really appreciate the input. Thanks
|
|
|
|
|
Question 1: You must listen for the KeyDown event, IIRC, arrow keys don't trigger KeyPress. And the KeyDownEventArgs has a enumeration that lists all arrow keys..
Question 2 : You are looking for MDI (Multiple Document Interface) forms. Look for the MDIParent property of the Form class.
Regards
Senthil
My Blog
|
|
|
|
|
S. Senthil Kumar:
I have found the MDIParent property in the Form class as you had suggested, but I am uncertain how to implement it. Puzzling thing is though, why isn't the MDIParent property available in the Properties window, is it an abstract class or something? Do I implement it in the child class like this in the onLoad event like so:
frmMainForm frm = new frmMainForm();
this.MDIParent = frm;
and should I select isMDIParent in the Main Form first? Trouble is, when I do select isMDIParent to true, the background color shifts for some reason to a light gray. An alternative optional guess of how to implement the MDIParent property would be to put
frmChildForm frmChild = new frmChildForm();
this.MDIChild = frmChild;
into either the form designer section with all of the variable assignments, or into the onLoad button for the frmMainForm form. What IS the PROPER way to implement an MDI form in C#?
Also, with regard to the implementation of the KeyDown event, how would I implement a KeyDown event trap for the UP and DOWN arrows for example?
|
|
|
|
|
new_phoenix wrote:
I would like my application to utilize some keyboard shortcuts like the UP ARROW, DOWN ARROW, LEFT ARROW, RIGHT ARROW, TAB KEY, and SHIFT KEY. I would like to implement them into a KEYPRESS event at the form level but I do not know what the ASCII collating sequence is to represent them in the KEYPRESS event.
Not all of the keys you mentioned have a corresponding ASCII Character Code[^]. Therefore I suggest you use the Control.KeyDown Event[^] instead. You can find out which key has been pressed by checking the KeyEventArgs.KeyCode Property[^]. For example:
private void Form1_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.PageUp)
MessageBox.Show("PageUp pressed");
}
new_phoenix wrote:
I would like my application to have the forms incorporated inside the main form and not as separate forms all over the screen. When the main form moves, I would like the children forms to be moved as well, and when the main form minimizes, I would like the child form to be minimized INSIDE of the main form rather than inside of the windows minimization bar at the bottom of the screen.
This is called MDI application (see Multiple document interface[^]). You can find a lot of information about how to create MDI applications on MSDN (see Multiple-Document Interface (MDI) Applications[^]).
Best regards
Dennis
|
|
|
|
|
Dennis C. Dietrich:
I have found the MDIParent property in the Form class as you had suggested, but I am uncertain how to implement it. Puzzling thing is though, why isn't the MDIParent property available in the Properties window, is it an abstract class or something? Do I implement it in the child class like this in the onLoad event like so:
frmMainForm frm = new frmMainForm();
this.MDIParent = frm;
and should I select isMDIParent in the Main Form first? Trouble is, when I do select isMDIParent to true, the background color shifts (for some reason) to a light gray, even when I change the background color back to the preferred designated color. An alternative optional guess of how to implement the MDIParent property would be to put:
frmChildForm frmChild = new frmChildForm();
this.MDIChild = frmChild;
into either the form designer section with all of the variable assignments, or into the onLoad button for the frmMainForm form. What IS the PROPER way to implement an MDI form in C#?
Also, with regard to the implementation of the KeyDown event, could I implement a KeyDown event at the form level? How would I implement a KeyDown event trap for the UP and DOWN arrows for example? Using your code as an example, could you kindly assist me in correcting this revised code, and please explain to me why the code is not being triggered by pressing the TAB button:
<br />
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmSolitaireMainForm_KeyDown);<br />
<br />
private void frmSolitaireMainForm_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)<br />
{ <br />
if (e.KeyCode == Keys.Tab)<br />
{<br />
if (statusBar.Visible == true)<br />
{<br />
statusBar.Hide();<br />
e.Handled=true;<br />
}<br />
else<br />
{<br />
statusBar.Show();<br />
e.Handled=true;<br />
}<br />
}<br />
}<br />
|
|
|
|
|
new_phoenix wrote:
I have found the MDIParent property in the Form class as you had suggested, but I am uncertain how to implement it.
I didn't suggest that. That was Senthil.
new_phoenix wrote:
Puzzling thing is though, why isn't the MDIParent property available in the Properties window, is it an abstract class or something?
This makes perfectly sense. The Form.MdiParent Property[^] is of the type Form[^]. Accordingly you need to assign an instance of that class and that of course is only possible at runtime.
new_phoenix wrote:
Do I implement it in the child class like this in the onload event like so:
I'm wondering if you actually read the information on MSDN I mentioned. It's all explained there including working code samples. So, again please check out Multiple-Document Interface (MDI) Applications[^] (especially Creating MDI Child Forms[^]).
new_phoenix wrote:
and should I select isMDIParent in the Main Form first?
If you don't set the Form.IsMdiContainer Property[^] to true you'll get an exception when trying to show a MDI Child.
new_phoenix wrote:
Also, with regard to the implementation of the KeyDown event, how would I implement a KeyDown event trap for the UP and DOWN arrows for example?
There isn't anything like an "event trap". I suggest you read some paragraphs about event handling and delegates (see Events Tutorial[^] and Delegates Tutorial[^]). The code I posted in my previous message is an example for an event handler for the Control.KeyDown Event[^]. As the type of the KeyEventArgs.KeyCode Property[^] is Keys[^] and Keys is an enumeration[^] you don't have to define the key codes yourself.
Best regards
Dennis
|
|
|
|
|
Dennis:
Thanks! The resources you had provided will be very helpful. I was just reading through it and it will take some time to digest. This is a new concept to me and I have not implemented it before - not covered in school very well. I appreciate the direction toward more information about the implementation of events and delegates as the textbooks that I have read do not cover it very well.
Thanks again!
New_Phoenix
|
|
|
|
|
Did you try setting the form's KeyPreview property to true?
Regards
Senthil
My Blog
|
|
|
|
|
How can i get to the registry files and add keys and stuff using C#?
|
|
|
|
|
|