|
Hi Dave,
Thanks a lot, that did the trick.
|
|
|
|
|
Try:
myPictureBox.Size = test;
myPictureBox.Refresh();
My failometer has shot off the end of the scale!
I seem to have misplaced my ban button.. no wait... found it!
|
|
|
|
|
you could "solve" it with some Invalidate() or Refresh() calls, but your approach is fundamentally flawed, since you are blocking the GUI thread for the entire duration of this action, making moving, resizing, e.a. impossible.
The correct approach is by using either a separate thread or a timer; since the actions involve Controls, which need to be handled on the main thread anyway, your best option is to start a Windows.Forms.Timer
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Hi Luc,
I tried the Invalidate() with out luck but the Refresh() is working.
I will look into the timer when I get a bit more time bur for now Refresh() does the trick.
Thank you.
|
|
|
|
|
|
I don't know of a way to make an arrow key into a hot key, other than overriding one of the key events. There may be a way, I just don't know.
As far as why the underline appears or not, in the later versions the underline on menus, buttons, etc. only appears after one presses the Alt key. For better or worse, that's the way the system works. (Personally I liked the underline always showing up, but it's not a big deal.)
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Collin Jasnoch wrote: Any idea why this is?
Press Alt? (left Alt)
|
|
|
|
|
Isn't that configurable in Windows?
Display properties | Appearance | Effects | Hide underline blah blah blah
I always clear the checkbox.
[Edit] This is for Win XP, and perhaps earlier.
|
|
|
|
|
Thanks PIEBALD, I just learned something.
"If you're using Windows Vista, go to the Vista Control Panel - Appearance & Personalization - Ease of Access Center - Make the Keyboard Easier to Use. Check the box by "Underline keyboard Shortcuts & access keys". "
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
::smack forehead:: Oh, right, my instructions were for a worthwhile version of Windows.
|
|
|
|
|
Hi Have a good day ....
I am bulding a webbrowser by C# ....
and I want to add this features to it ....
Is There is any peice of code , any library or any advice ,
that I can tell the ( Total Upload , Download of Internet Traffic for my application )
Thank in advance
I know nothing , I know nothing ...
|
|
|
|
|
Since you don't say how you are retreiving web pages, it's pretty much impossible to tell you how to do this.
|
|
|
|
|
Couldn't you just add something to a "global" variable every time something is downloaded/uploaded?
|
|
|
|
|
I am using C# WebBroswer Control ...
I know nothing , I know nothing ...
|
|
|
|
|
Stark DaFixzer wrote: I am using C# WebBroswer Control
is slightly different from "I am bulding a webbrowser"
You could try and use the WebBrowser.Navigating event to perform a little WebClient or HttpRequest action getting the size of the page (just ask for the HEAD, it should contain length information) before the WebBrowser loads it.
Alternatively you could hook up the DocumentCompleted event and hope to get the length from the DocumentText property, but I am not sure that would always be correct, and if so, efficient.
For uploads, I don't know.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Counter-acted the B.S. 1 that you got...
|
|
|
|
|
Maybe "I did/didnot create a browser" didn't go down well.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
That's just IE embedded in a control. I have no idea how to steal such statistics from it - if IE even has them then it has* to be possible somehow but maybe you'd need nasty hacks.
* yes it would have to be possible, if the information is somewhere in RAM and someone (IE in this case) knows where it is, then you can get it
|
|
|
|
|
As far as downloading html, you can access the browser control's DocumentText and get the size there. If you're downloading files, graphics, etc., I think you'll need to handle and count those sizes manually.
As for uploading, well, since you'll be controlling what to upload, just get the size when you upload it.
Or did I miss something?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
What if you use an upload thing that is present on some sites? IE would upload the file then right?
|
|
|
|
|
Probably so. But if IE is handling things directly, then there's no real way that I know of to figure the sizes. As you pointed out earlier, IE might have the statistics -- if there's a way to get to them.
I don't know a general way to do what he wants. I'll be interested in seeing if someone else has a solution, though.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Since you're not actually building a brwoser control, but wrapping the one in the toolbox in your own UI, there's no real method to get the data you want. The browser doesn't expose this information and using alternate methods would only result in partial results at best.
If you want those stats, you're going to have to build and make the requests yourself and handle the returned page as well. That's about the only method you've got to knowing how much data was sent and received.
|
|
|
|
|
Thank you all for your help ....
your time is very much appreciated.
I know nothing , I know nothing ...
|
|
|
|
|
Guys i have a text file that i store my settings in so that they are availible in every forum .
basicly its in the following format
DownloadFolder = /mnt/md1/public/Downloads/
TelnetUser = root
TelnetPassword = something
TelnetIP = 192.168.2.2
So im looking for a way to take each of those settings and turn them into strings with values inside my c# program . Im useing the stream reader class below but im not sure what to do next after i split the strings into an array .
private void LoadSettings()<br />
{<br />
StreamReader Settings = new StreamReader("Settings.txt");<br />
string line;<br />
while ((line = Settings.ReadLine()) != null)<br />
{<br />
if (line.StartsWith("/"))<br />
{<br />
}<br />
else<br />
{<br />
string[] splitArray = line.Split(new char[] { '=' });<br />
<br />
<br />
}<br />
}
|
|
|
|
|
Member 6038196 wrote: but im not sure what to do next after i split the strings into an array .
How are we supposed to know? All you said you wanted to do was:
Member 6038196 wrote: im looking for a way to take each of those settings and turn them into strings with values inside my c# program .
Which you might already have with splitArray if your code is correct. From there, you can do whatever you want next but we have no idea what that is.
|
|
|
|