|
You may want to consider using AnimateWindow() [^] for a smooth fade in/out effect without having to resort to a loop.
/ravi
|
|
|
|
|
Hi
i`am building a new project and i want to use an interface like the one in Microsoft Student 2006..
any ideas where i shoud start from or where i can find usefull information..
thanx
|
|
|
|
|
Perhaps if you post a screenshot of what you're trying to imitate, we'd be more open to helping you. I've never heard of Microsoft Student, so I don't know what you're trying to accomplish.
|
|
|
|
|
I have found myself yanked from the Unix systems programming world (C and assembler) to the Microsoft Windows server Administration. I now have a MS windows system on my desktop with Visual Studio 2005. I'd like to start investigating systems programming with C# (if it is possible). Unfortunately there seems to be about a bizillion books and articles available compared to the handful for Unix. Someone suggested this website and here I am. For starters I thought well "Why not do something simple like fiddle around with IIS 6.0 settings on a test system." I don't want to start a favorite author war - but I'd like suggestions if you don't mind.
Greg (shoe) Schuweiler
Systems Curmudgeon
Friendly fire isn't.
|
|
|
|
|
You'll be wanting to use WMI, google for it and you'll get plenty of examples/docs.
Try here
|
|
|
|
|
I have a custom object using the DataObjectAttribute so I can bind it to controls the GridView. Now, everything works fine, but I would like the schema to be loaded in the designer so I can pick which columns to show or not at design time. I assume this is some sort of XML I need to put together, but obviously I am phrasing my searches wrong because google is coming up empty. Does anyone have a link to an article that explains how to do this?
|
|
|
|
|
Does anyone know of a random number generator which is very fast and changes the random number at least 10 times per second? It doesn't have to be cryptographically secure, I just need one that runs very fast.
Thanks.
|
|
|
|
|
How fast exactly is "very fast" in this case?
What have you been using as random generator to come up with the demand that it should change the random number on a time basis?
The built in class Random gives you a new random number every time you call the Next method.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Guffa wrote: How fast exactly is "very fast" in this case?
A new random number at least 10 times per second.
I'm working on a program that needs new random numbers on a timed basis, therefore I need a random number generator that supports the programs timing.
Guffa wrote: The built in class Random gives you a new random number every time you call the Next method.
I know, but it requires so much processing power that it crashes my computer when I try to run it fast enough. It changes the random number fast enough, but it doesn't process the random number fast enough(up to 2 sec to get a random number; happens when trying to get several randoms quickly).
Thanks.
|
|
|
|
|
What process takes 2 seconds? The Random.Next certainly doesn't:
<br />
System.Random r = new System.Random() ;<br />
<br />
for ( int i = 0 ; i < 100 ; i++ )<br />
{<br />
System.Console.Write ( r.Next() ) ;<br />
}<br />
takes less than a second to execute and generate 100 values.
I haven't tried it with a debug build, but maybe that's the problem? Try a release build.
|
|
|
|
|
PIEBALDconsult wrote: takes less than a second to execute and generate 100 values.
And 99,9% of that time is spent scrolling the content of the console window.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Bob X wrote: A new random number at least 10 times per second.
That's not fast. That's not even fast enough to be called slow.
Bob X wrote: but it doesn't process the random number fast enough(up to 2 sec to get a random number
Then you are doing something very very wrong. My computer can produce around 25 million random numbers a second.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
The RNG in the .NET Framework, or any other library for that matter, doesn't constantly computer random numbers and you just get the one that "fly's by" when you need it. The next number you get is calculated at the time you call .Next() . It's a formula that takes the previous value and generates a new value that appears to be random when an entire series of numbers is examined. That's why it's called a psuedo-random number generator.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My question is:
I have a program that connects to a remote server through a certain port.
I want to make a program which will be like a buffer between the program and the remote server so i can see all traffic going between them both and filter data i dont want the program to recieve.
I dont know how to that, how can i listen to the port and grab it when the program try to connect ? how can i complete the connection after my program manages to grab the port ?
thank you.
|
|
|
|
|
Basically, you need to write your own proxy server. The application connects to your proxy, which is listening on the port the app expects, then your proxy makes it's own connection to the app's server. It's commonly referred to as the "man in the middle". You get to examine and decide wheather a request from the client goes to the server or not as well as the reverse. Any data comming back from the server goes to your application where you decide if it's going to be forwarded to the client or not.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
is there any example in the site for such proxy ?
|
|
|
|
|
Not that I know of. Even though it's pretty straight forward as far as Sockets go, noone who asks about something like this seems to get through an entire project. If you want a functional example of the concept, just Google for "SpamBayes".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ill look for SpamBays, thank you.
Today i made a http proxy server,
made a server and client using winsock, the server is listening to specific port and when ie try to get out to the web the server accepts the call and sends it throgh its own client to the desired location.
then made changes in ie->tools->internet options->connections->lan setting and wrote the new proxy address i made.
The thing i need to figure/understand now is how to make a program which is not ie go through my proxy, bet its hard. you have any idea ?
thank you.
|
|
|
|
|
Hello gurus,
I'd like to know how can I convert 15 bits colors to 24 bits colors and vice versa?
Can anybody show me some code snipet to do that in both ways?
Best regards.
Fred.
There is no spoon.
|
|
|
|
|
Multiply the colour components by 255/31.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
I have a client server application and i am writing messages from the client to the XML file. sometimes the files reaches 1GB. Operating such a large XML file creates lot of problems such as memory, time. there may be loss of data too.
please suggest me a method to operate my file with less memory?????
Thanks in advance...
Praveen Raghuvanshi
Software Engineer
|
|
|
|
|
XML is a bad choice handling large amounts of data.
Use XmlTextReader and XmlTextWriter for reading/writing XML files. Do not use XmlDocument (it stores the whole document in RAM). Use XML only for import/export of data, store it inside a normal binary database for normal usage.
|
|
|
|
|
If your XML file is getting that big, then there seems to be an architectural problem here. Have you considered using a database instead (much better suited to things like this).
Alternatively, you may want to consider SAX (Simple API for XML) which is an event based rather than tree based API. See http://saxdotnet.sourceforge.net/index.html[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I think you should consider to use the SAX approach. XmlDocument uses DOM and the whole document is loaded into the memory (as mentioned above).
The SAX approach takes parts of the document only, which may be your solution...
SAX is stream based and the stream is bi-directional. Which means you can write and read. It uses events. Unfortunately I can't help you about the .NET implementation of SAX. I don't know if there is any ...
You may search for the MSXML (Microsoft XML Core Services). I think this is available as COM object.
You also may want to see the following page : http://sourceforge.net/projects/saxdotnet[^]
Hope it helps.
P.S. if you find a solution to this problem - please drop us a line ...
|
|
|
|
|
I get a string in the following format from an Html file after calling a GetAttribute method:
file:///C:/Documents%20and%20Settings/azabobonin/My%20Documents/My%20Pictures/Einstein.jpg
How can I format that string to look normally:
C:\Documents and Settings\azabobonin\My Documents\My Pictures\Einstein.jpg
Is there a way of getting the string the way it is writen in the Html file, and not the way it returns from GetAttribute method?
Thank you
|
|
|
|