I don't ask a lot of questions in the VB forums but this one has me pretty stumped. Please excuse the rather long background introduction but I feel disposed to explain why I require certain information. Some of you might think that what I a trying to accomplish is quite despicable.
Every few days the IT administrator will poke his head in my office and say, "There's some pretty heavy network traffic in this corner of the world. What are you doing?" Naturally, I always have a legitimate excuse for transferring several hundred megabytes or having a dozen browser windows open at the same time, but it occurred to me that not all of our users would be so quick to formulate a good "reason". IT should be able see what is occurring on any given workstation without having to walk to an office and look at a monitor.
The solution occurred to me last week, under some rather unusual circumstances. Our Safety Director had been laid off on Thursday but he came to work on Friday and then Monday. He appeared to be in a bad state of denial and I assume no one had the guts to say, "Look. You don't work here anymore. Go home and get some rest!" (It was learned later that he just wanted to "tie up some lose ends" and make sure Human Resources understood the system he had created. What a guy!)
Monday morning the IT manager passed by my office walking a little faster than usual. I heard him mutter, “He’s surfing hot and heavy….” I knew exactly whom he was talking about. I never saw our former safety director again.
That’s when the thought struck me. I had been writing a custom browser to allow controlled access to the company Intranet and the the select few who were allowed that privilege). One of browser’s “features” allow it, under certain circumstances, to take a screen capture. It took me about ten minutes to pull some of the code into another application and install it on one of the computers in my office. Then it took about three minutes to write a small program and run it on my main machine.
I called the IT manager into my office and pointed toward both monitors. “See anything unusual?”
“No. So you copied the wallpaper off of this computer… So what?”
I had him open a window on the first computer and then look at my monitor. He was viewing an exact mirror image.
After I assured him that I hadn’t installed PCanywhere he played around a bit, looking back a forth at the two monitors. Finally, he said, “I like it. I like it a lot! How did you do that?”
At first I patted my own back, pretending to be the world’s greatest genius (he knows me and knows better), but then I had to admit to the truth. The first computer was running a hidden program that simply enumerated the open windows. When the number of windows changed, it captured the current screen and wrote it to a bitmap on a mapped drive. The other computer was running a simple program that used a timer control to periodically load the bitmap into a picture control.
I could see the gears turning and it didn’t take him long to realize the potential. We both agreed that it wouldn’t be a great idea to save the screen every time a window was opened (it could affect a system’s performance) or refresh the remote view based on an arbitrary timer value (it could bog down the network in no time) or use a mapped drive to store the bitmaps (it could introduce security concerns). We both agreed that it was a killer idea that only needs a few tweaks. We envisioned a form filled with thumbnails representing the computers on a domain of the network. Click one and the monitoring app would send a query for a new screen capture to the app on the workstation, load the bitmap and show the capture in a full-screen view.
Both of us had heard of software capable of doing the same but he had already researched the subject and concluded that the company would never be willing to pay for it. Perhaps that is why he was so excited to see me performing this relatively simple trick.
My problem is that, aside from querying a workstation by writing a file to it’s hard drive and asking it to save a bitmap to a mapped drive on the network, I really don’t have a clue as to how I can do this. There must be a much faster and more efficient way to do this using TCP/IP.
The network is simple but fast, Microsoft Networking, no frills. The Server on the “troublesome” domain runs NT Server SP5; the workstations are mostly Pentium class running Win9x (various editions) with one running NT WS. The programmer is running VB6 Pro on a Frankenstein collection of hardware.
If anybody can help this simple code-jockey enter the fascinating world of network programming, ASAP, please respond.
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]
Every few days the IT administrator will poke his head in my office and say, "There's some pretty heavy network traffic in this corner of the world. What are you doing?" Naturally, I always have a legitimate excuse for transferring several hundred megabytes or having a dozen browser windows open at the same time, but it occurred to me that not all of our users would be so quick to formulate a good "reason". IT should be able see what is occurring on any given workstation without having to walk to an office and look at a monitor.
The solution occurred to me last week, under some rather unusual circumstances. Our Safety Director had been laid off on Thursday but he came to work on Friday and then Monday. He appeared to be in a bad state of denial and I assume no one had the guts to say, "Look. You don't work here anymore. Go home and get some rest!" (It was learned later that he just wanted to "tie up some lose ends" and make sure Human Resources understood the system he had created. What a guy!)
Monday morning the IT manager passed by my office walking a little faster than usual. I heard him mutter, “He’s surfing hot and heavy….” I knew exactly whom he was talking about. I never saw our former safety director again.
That’s when the thought struck me. I had been writing a custom browser to allow controlled access to the company Intranet and the the select few who were allowed that privilege). One of browser’s “features” allow it, under certain circumstances, to take a screen capture. It took me about ten minutes to pull some of the code into another application and install it on one of the computers in my office. Then it took about three minutes to write a small program and run it on my main machine.
I called the IT manager into my office and pointed toward both monitors. “See anything unusual?”
“No. So you copied the wallpaper off of this computer… So what?”
I had him open a window on the first computer and then look at my monitor. He was viewing an exact mirror image.
After I assured him that I hadn’t installed PCanywhere he played around a bit, looking back a forth at the two monitors. Finally, he said, “I like it. I like it a lot! How did you do that?”
At first I patted my own back, pretending to be the world’s greatest genius (he knows me and knows better), but then I had to admit to the truth. The first computer was running a hidden program that simply enumerated the open windows. When the number of windows changed, it captured the current screen and wrote it to a bitmap on a mapped drive. The other computer was running a simple program that used a timer control to periodically load the bitmap into a picture control.
I could see the gears turning and it didn’t take him long to realize the potential. We both agreed that it wouldn’t be a great idea to save the screen every time a window was opened (it could affect a system’s performance) or refresh the remote view based on an arbitrary timer value (it could bog down the network in no time) or use a mapped drive to store the bitmaps (it could introduce security concerns). We both agreed that it was a killer idea that only needs a few tweaks. We envisioned a form filled with thumbnails representing the computers on a domain of the network. Click one and the monitoring app would send a query for a new screen capture to the app on the workstation, load the bitmap and show the capture in a full-screen view.
Both of us had heard of software capable of doing the same but he had already researched the subject and concluded that the company would never be willing to pay for it. Perhaps that is why he was so excited to see me performing this relatively simple trick.
My problem is that, aside from querying a workstation by writing a file to it’s hard drive and asking it to save a bitmap to a mapped drive on the network, I really don’t have a clue as to how I can do this. There must be a much faster and more efficient way to do this using TCP/IP.
The network is simple but fast, Microsoft Networking, no frills. The Server on the “troublesome” domain runs NT Server SP5; the workstations are mostly Pentium class running Win9x (various editions) with one running NT WS. The programmer is running VB6 Pro on a Frankenstein collection of hardware.
If anybody can help this simple code-jockey enter the fascinating world of network programming, ASAP, please respond.
[sig]<p> <br><a href=mailto: > </a><br><a href= plain black box</a><br>Don't sit down. It's time to dig another one.[/sig]