Advertisement

Results for "top"

ASP_Volume2 #39161
VERY SIMPLE Always on top code!

This is the simplest code ever for always on top, if you find anything simpler (which i doubt) let me know!

ASP_Volume2 #39427
A Scroller Version 2 - Smoothly scrolls text in a picturebox

It can scroll right to left or bottom to top, stop at top or stop centered, scroll and stop or Scroll Continuously and background, text colors & fonts are all customizable. It uses bitblt to do the drawing so its flickerless. This control is a updated version of http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=14967&lngWId=1 that I modified & updated for Almost Real Jukebox.

ASP_Volume2 #40805
Win32 API Winsock HTTP/HTML Retrieve (and simple Always On Top)

Retrieve the default site of a website via API32 and Winsock 2.0. Also included a simple Always On Top demonstration. No MFC so far.

ASP_Volume2 #41764
Prevent viewing of javascript and stylesheets

Prevent unauthorized viewing of website javascript and style sheet files. Simply rename all your style and javascript files to the .asp extension. Then include the validate_view.asp file at the top of each file. Open the validate_view.asp file and change the top the constants to those required. Then finally call the procedure name "validate_view" with the current files content type as the parameter.

ASP_Volume2 #42451
Bar Graph

An ASP bar graph. Easily customized and great examples. Customizations include Top Padding, Side Padding, Bar Width, Bar Padding, (Only if bars are in groups.) Group Padding, Number of Groups, Number of Bars Per Group, Maximum Value Values For Each Bar, Colors of Bars, and Titles Of Each Bar! The inputs are all at the top of the code with explanations. Nicely blocked off for your convenience. I have not tested this with Netscape. Please let me know how it does. You can only have a maximum of 18 bars due to restrictions from style properties. This problem is easily breached by using javascript. If you would like that code please email me @ checkerman_1985@yahoo.com

ASP_Volume3 #44774
A BETTER way to avoid Free Net Access Banners!!

This is an update to code I posted Yesterday. The sole purpose of this code is to allow you to use a free ISP, without the wasted desktop\browser space of ad banners. In the previous app the banner was hidden using Win API Functions. This worked except the banner ad people have hard coded there Banner Apps to stay on top at all times. Hence, the code to hide the banner had to be executed over and over again causing the "Hider" App to canstantly execute code. THis Method Minimizes the banner... THe banner will still be on top, but it will only be a title bar that you can position in the "White SPace" of the Browser toolbar. No adds will be displayed. YOu will not even know it's there.

ASP_Volume2 #35395
Enigma Encryption Example

Here is the concept behind this representation of the Enigma Machine: The program uses virtual "wheels" that contain all of the printable characters on the keyboard. Think of the first wheel as the keyboard you are typing on. All of the wheels contain the same characters, but in a random, non-repeating order. Each time a character is pressed, the location of that character on the one wheel is used to as the index to lift the character off of the next wheel. Then the new character is searched for in the next wheel, and the pattern repeats itself across each wheel. The character lifted off of the final wheel is the output. This step is repeated for each character in the message. Decryption simply sends the message backwards through a similar, but reversed process. What really makes this encryption effective is that like the real life machine, the wheels rotate either to the left or right after each character. So the relationship between each character shifts constantly. As a result, even repeating characters such as "AAAAAAAAAAAAA" are represented with garbage such as "@n~WPnHv(.)z#" Another great part about an encryption scheme like this is its flexibility. You can add more wheels, more characters per wheel, change the order of the wheels, the directions the wheels spin, and change the starting position of each wheel. So, unless somone can figure out: 1) How many wheels are being used... 2) How many characters are on each wheel... 3) The order of the wheels... 4) The direction they spin... 5) The initial position of each wheel... 6) The order of the characters on each wheel... It would be virtually impossible to look at the encrypted characters and determine their relationship to one another. There are so many possibilities and combinations of the above criteria, it would have to be solved through brute force. I am no mathmatician, so if anyone can tell me the possible combinations, I would appreciate it. When the Germans used this machine, it baffled the Allies, who frantically tried to break it with no success. It wasnt until a German U-Boat was forced to surface in a naval battle and was captured that the Allies got a huge break. An Enigma machine was captured along with a code book that showed the information needed to decrypt the messages. The U-Boat was scuttled and the crew was kept in a top secret location. The U-Boat was simply considered lost during battle and Germans continued the war not knowing the truth. When the war in the Atlantic turned for the worse, the Germans, who believed their code to be unbreakable, believed that there were spies in their top level officials. They never considered that the code was being decrypted through a captured machine, so as a result, they set up elaborate networks to try and find these "spies". Paranoia being what it was, many loyal German officers were tortured and murdered for treason, even though they had commited no such offense. This code is by no means complete. I will try and enhance its speed and toughen its encryption even further. Ill also try and build a better sample app with more features. If you find a problem or have a suggestion, I would love to hear it. This program has now been updated to reflect many of the suggestions posted here. Thanks for some great feedback and keep coding! =)

ASP_Volume2 #37228
DataFX (Updated 3/21/02) New Feature!!

Ever be in the middle of coding and forget the field names in your database? Well this little tool is for you. Open an Access Database and it will display all of your fields as well as the description and ALL of the properties for each field. You can Drag field names right from the list into your code. Never have to memorize (or type) those long field names again. Click the stay in front button and the application will stay on top, click it again and it will fall behind other windows when it loses focus. You can also search for a field name. If enough people like this I will convert it from DAO to ADO. Please leave comments. :) Sorry for the missing .bas file. Its there now. *** 3/20/02 - Added recent file list *** 3/21/02 - Added datasheet option which allows you to open the selected table and add, delete, modify, and view data from the selected table. You can use SQL to filter the datasheet and it also has the "Stay on Top" feature. You can open as many DataSheets as you want. ADO Version coming soon!

ASP_Volume2 #37381
The Missing CloseProcess() API (Well, Sort Of)!

Have you ever wanted to CLEANLY shutdown an external application that you only had a ProcessID to? I've always wished that there was the equivalent to the TerminateProcess() API that would send the WM_CLOSE message to the application, allowing it to shutdown cleanly, not abruptly as TerminateProcess() does. Because of this, I began a quest to either find such an API or to build one myself... Basically, the only way to successfully shutdown an application who's window title you do not know beforehand on Win95/98 is to use the TerminateProcess() API. WinME seems to correctly process the WM_CLOSE message to its top-level windows, so it can be excluded from this even though according to MSDN it functions the same as Win95/98. Now, use of the TerminateProcess() API is frowned upon because according to the MSDN article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/terminateprocess.asp : "The TerminateProcess function is used to unconditionally cause a process to exit. Use it only in extreme circumstances. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess." But... with the use of the WM_ENDSESSION message this downside seems to be obverted, because to this MSDN article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/wm_endsession.asp (which is actually for the WM_QUERYENDSESSION message): "Windows 95/98/Me: After all applications return TRUE for this message (WM_QUERYENDSESSION), they receive the WM_ENDSESSION and they are terminated." So if I'm reading that correctly, at shutdown Win95/98 sends the WM_QUERYENDSESSION to all top-level windows, followed by the WM_ENDSESSION then (assuming all applications are happy with the shutdown) they are then terminated assumedly via the TerminateProcess() API! Now this process also occurs at a logoff, so it *should* be reasonable to assume that all of the downsides of the use of the TerminateProcess() API are solved by first sending the window the WM_ENDSESSION and a True in the wParam argument because the application is *supposed* to clean up after itself when it receives the WM_ENDSESSION message. In my research, I found a number of sites concerning the incorrect handling of the WM_ENDSESSION by Delphi applications. They advised their developers to hook the message and fully close their apps (destroy objects, etc) at that time in order to avoid any errors. So as long as I've not missed any important nuances, I believe that with the help of Ark's comment I've stumbled across the answer to my question! So in order to put this into a nice little package, I've implemented the fabled CloseProcess() API I used to wish for... As always… if you find a bug please let me know. Thanks and enjoy!

ASP_Volume2 #39136
Extended mode resizer

This is an add-in for adding resizing capabilities to your projects. It is based on the add-in "4 mode Resizer" by PeYTaN (you can find it on http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=46731&lngWId=1) which is based on the class ControlResizer by Edward Catchpole (you can find it on http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=46203&lngWId=1) The (GREAT!!) combined work of the two authors spared me *a lot* of coding time, still I had some complex forms on which i wanted to optimize the resizing to the last twip, and the available modes weren't always enough for me. So I ended up extending both the class and the add-in to support anchoring and resizing a control with regard to another control, not just to the form. I also added a small demo project that (I hope!) gives the idea of the various and complex arrangements you can achieve by combining the available modes; just resize the two example forms at will and see how the controls behave. These are the enhancements: 1. More freedom Someone commented on the original class that it had the flaw to reserve tag usage for itself, whereas the developer may want to use control tags for their own purposes. This version is tag-friendly: it doesn't replace the previously designed tag, it appends the designed tag after the resizing data and a custom separator. When the form is loaded and the class initialized, the resizing data are retrieved from the tags and stored in an internal array; the originally designed tags are then restored and no longer needed by the class, as the resizing code will work on the array. 2. More speed Cycling on the internal array, which only stores info for the controls that will be resized, is faster than cycling everytime on the whole array of form controls, in case at least some controls won't need resizing. Besides, the original class used to set the 4 properties (Left Top Width and Height) separately; this version calculates them all and touches the control only once, via the Move method. (A SetWindowPos API call might be even faster, in case you want to try it) 3. More options The new modes allow you to anchor a control to another, so that the gap between those controls stays constant, whereas it grows if both controls grow and move proportionally. A control can now be aligned to another control (Left, Right, Top and Bottom), stretched (Width, Height) to align its right or bottom edge to the latter, or stretched to the same size (Width, Height) of the latter. Relating a control to another requires that the latter has already been resized, but the modified class takes care of it by sorting the data after assigning a priority to each control, requiring no extra effort from the developer. Filling and sorting the array will marginally impact on the form startup time, but as said the runtime resizing tends to be faster. 4. More bugs? Most likely, as there's more code! (I had noticed no bugs in the previous version, just a lacking feature in handling arrays of controls, now properly dealt with) So if you find any, please inform me so that they can be fixed; even better if you send me a fixed version yourself ;)

ASP_Volume2 #41270
GordonsTicTacToe

Simple Win32 API Tic Tac Toe game. Has a total of 24 strategies/blocks incorporated into one function called smart() that works on defense as well as offense. It checks to see what moves have been made and makes it's move accordingly. Better than playing a human for the computer never sleeps. ;) Good example of writing your own functions to perform tasks there are no built in functions for and getting different return values from your function to act accordingly. The boxes are numbered from left to right with the top left box being one. The top row is one to three, middle four to six and bottom seven to nine. Push the button that's number corresponds to the box that you would like to choose. Good example of subclassing child controls and using the template resource editor to create and display dialog boxes. One or two players.

ASP_Volume3 #44866
Make Form always on top without API !

It automatically makes your form on top until they close or end the program and it is all API free!

ASP_Volume3 #45506
Multiplayer Boggle

Multiplayer Boggle ==> An attempt to create a multiplayer version of the popular game Boggle to play with my friends online. ----- Features include: -Ability to customize almost every aspect of the round (eg Time of each round, interval timing, minimum word length, etc.) -A plethora of awards (eg Champion medal, Caterpillar word award, Treasure hunter award, Detective award, etc.) to be awarded to outstanding players every round! -Custom coded Depth First Search to find if word entered exists in board -Top 50 words of each round displayed after each round -In-game Dictionary to display dictionary entry of any of the top 50 words. Just click on the word in the listbox and an explanation will pop up. -Interesting End-round statistics shown (eg % of total words found, typing speed, words found by each player, etc.) -Dynamic in-game chat -A short help tab to explain to beginners how to play this game by Hasbro, as well as to display the awards that could be won -Gigantic internationally recognized lexicon of words (Enable2k) for nearly every valid word in the dictionary to be recognized by the game. -Up to 1000 players supported! (If you can find that many) Useful for programmers attempting to learn tcp network code. Coded in 3 days in VB 6.0. Please leave constructive comments and report any bugs encountered. Suggestions are also very welcome. Thanks! ***P.S. Read the readme.txt file before compiling!

ASP_Volume3 #45585
BEGGINER Form On Top

Puts Your form on top.

ASP_Volume3 #45760
Monitor Mirror

Sitting at home on my computer with my back to the TV ... I thought it would be nice to be able to sort of keep up on what's happening on TV, so I whipped up this little monitor mirror. It stays on top and allows me to see the reflection of the TV. It's just a black form. Good lesson on keeping a form on top and retaining settings using the registry.

ASP_Volume3 #46043
Prevent viewing of javascript and stylesheets

Prevent unauthorized viewing of website javascript and style sheet files. Simply rename all your style and javascript files to the .asp extension. Then include the validate_view.asp file at the top of each file. Open the validate_view.asp file and change the top the constants to those required. Then finally call the procedure name "validate_view" with the current files content type as the parameter.

ASP_Volume3 #46446
Post-it : Desktop Stickys

Post-it is a desktop notepad the designed to look like the famous stickys. It is drag-drop, transparent, and the choice of always on top (.exe provided is on top). Good for whatever ya want i guess..

ASP_Volume3 #48501
Keep a form on top!

This code keeps a form on top of all other windows.

ASP_Volume3 #48968
Move last top menu to the right

Dock the most right top menu to the right of a form. Check the screenshot.

ASP_Volume2 #42138
Securing Your IIS Web With User Login Security (Easy Yet Comprehensive)

Securing Your IIS Web & Content With Access MDB Based User Security (Simple Yet Comprehensive) This past week, I sat down to tackle the chore of securing my personal IIS web server... specifically, my web app I previously posted here (MP3Tool.Web).  It was a learning experience to say the least, and so I thought I'd zip up my work and share that experience with the rest of you. The Chore: secure an IIS web or entire server via user logins. The Solution: the magic of my security approach is achieved by making use of the Global.ASA file and sessions.  As it's name implies, it functions as something of a global over all the other asp pages on a web site.  You can find documentation on the global.asa posted here on psc, so I won't repeat those details here (and the rest of this assumes you know what global.asa is).  My security approach makes use of the Session_OnStart on event.  It is triggered the first time a user tries to hit an ASP page on your site... and occurs BEFORE the target asp page is served up by the server.  This is key to making this approach work.  When a session is first started, a number of activities take place.   1) a connection to the database is established (held as an object in the session at the top of the page) 2) the "hit" is logged in the database by IP # and date 3) we test to see if the IP # has been "banned".  If it has, I came up with a pretty slick way to implement the ban.  Attached in this zip is a VB project for my ResponseHelper com object (my solution to my problem expressed in my previous post, MP3Tool.web, about streaming back binary data back directly on the asp response).  In this case, we're not streaming back a binary persay, but an HTML page that looks and works exactly (with 1 smiling exception) to the Server Not Found page IE serves up.  Because I use the com object to stream the file back, rather than a .Redirect, the end user is none the wiser (their browser location never changes).  =) 4) this part is probably optional, but then I put in a browser check to ensure that IE is being used by the client. =) 5) we test to see if a specifically named cookie exists on the client.  This cookie is used to "persist" a user's login... much the same way your developer login is persisted (if you so choose for it to be) here on psc. 6) if no cookie was detected, then we test to see if the Login.htm form is being posted.  While the "target" of the Login.htm page is the Login.ASP page, we actually intercept and process all logins in the Global.asa file.  Login.asp file theoritically should never actually be hit.

Languages
Top Categories
Global Discovery