Results for "top"
Set your form 'Always On Top' - > On Top of other windows.
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.
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!
Updated: Metric Grid Scale and Landscape capable. If you hate writing VB code to create printed forms, give this a try. Print Form Code Generator lets you create forms by dropping text boxes, pictures and line on a form and generate the VB print code to paste in your program. This is the first version and it can only get better. Feedback is welcome. To move lines, click to move a point shift + click to move the line ctrl + click to move point left and right only alt + click to move point up and down only shift+ctrl+click moves other point's top position to clicked point's top position shift+alt+click moves other point's left position to clicked point's left position New Version: Select paper size, and line ghosts gone!!
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 ;)
I was inspired by Clint's vcTrayAlert Control at http://vbasic.iscool.net/ It was cool but he did not make the source code available. So I decided to write my very own control. Along the way I have added many cool features. I have used a gradient-drawing class that I found on PSC by Kath-Rock. I made a help file for my control and as you will easily figure out, I have invested alot of my spare time into this large project. It is made free but make sure to check out the license agreement and copyright info. All I'd like to ask you is your encouragement - IF you DO like my control. So I'll be waiting for your feedbacks and emails :) Oh, I'd like to ask you for one more thing. Help me debug this control, report any bugs you might find to me on my email addres. Thanx. KEYWORDS: MSN Style Tray Alert Control, ActiveX Control, User Control, Play WAVE WAV File Resource, Always On Top, Top Most, Transparency, Transparent, Fade, Mask, Borders, Gradient, Error Handling.
Finally the help file is included in the .ZIP file! Thanx to Amanda Miller, the WebMaster. Being inspired by Clint's vcTrayAlert Control at http://vcreations.net/product.asp?pid=34, I decided to write my very own control. This one has much more cababilities, and some advanced features for Win2000 or later: like the Transparency property and the fading animation. It is still very easy to use: check out the DEMO. It is also very versatile!: check out the Screen Shot ;). I have used a great gradient-drawing class that I found on PSC by Kath-Rock. I have invested alot of my spare time in this large project. It is made free but make sure to check out the license agreement and copyright info. All I'd like to ask you is your encouragement - IF you DO like my control or NOT then please VOTE. I'll be waiting for your feedbacks and emails. And, If you ever find a bug, email me about it. KEYWORDS: MSN Style Tray Alert Control, ActiveX Control, User Control, Play WAVE WAV File Resource, Always On Top, Top Most, Transparency, Transparent, Fade, Mask, Borders, Gradient, Error Handling.
This is the simplest code ever for always on top, if you find anything simpler (which i doubt) let me know!
Add special effect to your form when it is showing and hiding! 6 types of effects can be applied. They are roll left to right, roll right to left, roll top to bottom, roll bottom to top, expand window outward and fade window. This program shows how to add these fancy effects. Make sure you have Windows 2000 and later or Windows 98 and later running before running this program. The program is well commented and a tutorial is included. Your comments and votes is the way you repay me for my work.
This "thing" takes advantage of a thoughtless mistake on microsoft's part. This prog can stay on top of anything, even the task manager! PLEASE VOTE! -Note: I used code from Jan Alexanders Transparent form to achieve the flashing effect
A desk top shooter game
I'm not sure sure if it's just my computer but, for some reason, my VB programs never stay on top of other windows all the time when I use the SetWindowPos API. This program still uses the SetWindowPos API but I added some stuff to make it work properly.
This is an explorer property page shell extension which will allow you to edit mp3 tag properties. By adding an empty dialog and plopping a vb form on top you can handle all the programming in vb instead of c++. There is a .dll required that is available at http://www.programmersheaven.com/search/download.asp?FileID=38704. The propext.dll is essential since you cannot call a function pointer in vb.(that I'm aware of)It allows the adding of the empty dialog, on top of which the vb form is placed. This can of course be applied to any file extension. You can make your own custom property page. I have found many instances where an external .dll written in c++ can extend vb into an extremely robust language. Too bad they aren't allowed to be submitted for security reasons.
Tetris '2005 is an exciting action game. Throughout the game, bricks of various types fall from the top to the bottom of the playing area. When the bricks form a solid row of blocks across the playing area, that row vanishes. Because this is the only way to remove blocks, you should try to form solid rows whenever possible. The game ends when the pieces stack up to the top of the playing area. You can manipulate a brick only when it is falling. Falling pieces may be rotated, moved horizontally, or dropped to the bottom of the playing area. This nice and small game offers High score lists, Preview Screen, Position Pointer and more. It has no multimedia but intended to bring a taste of fun to a small break on a long, hard working day. However, if you would like to support my work, please rate this article and visit one of my other programs. Check them out!
get and change numlock ,capslock, scrllock and insert key state using system tray (Add and remove) using self start with windows using transparent layer using read and write registry get screen workarea with SystemParametersInfo and adjust form left and top with a Taskbar Visual Moving a Window Without a Titlebar always Keeping a Window On Top
Through the use of API, it can be done, command button's caption can be aligned to the top, and a frame's caption can be centered. Later versions of VB give you that option standard, but not the 6.0 So if you ever wanted to know how its done, here-it-is.
Updated: Metric Grid Scale and Landscape capable. If you hate writing VB code to create printed forms, give this a try. Print Form Code Generator lets you create forms by dropping text boxes, pictures and line on a form and generate the VB print code to paste in your program. This is the first version and it can only get better. Feedback is welcome. To move lines, click to move a point shift + click to move the line ctrl + click to move point left and right only alt + click to move point up and down only shift+ctrl+click moves other point's top position to clicked point's top position shift+alt+click moves other point's left position to clicked point's left position New Version: Select paper size, and line ghosts gone!!
This "thing" takes advantage of a thoughtless mistake on microsoft's part. This prog can stay on top of anything, even the task manager! PLEASE VOTE! -Note: I used code from Jan Alexanders Transparent form to achieve the flashing effect
Welcome to the Ultimate Windows Manager & Handler! With this application you can: ** minimize any window to tray, and get the owner's window icon ** ** hide/show any window ** ** make any window always on top ** ** close any window ** ** create your own custom array windows and hide/show them ** ** set any window caption to whatever you want ** ** window search ** ** window viewer with class info per process ** ** hide/show all windows in the system ** ** and many more ** Here you can find good examples on hot-keys,callbacks,enumerations of windows and processes(toolhelp),how to get the full path of another process,how to get the class name of window,many APIs for controlling windows. Here are the hotkeys: F7 button to minimize any window to tray, with the icon of his exe. F8 to hide the window on which the cursor is/or the foreground window (that depends on your selection (checkbox)). F9 to show all the windows hidden with F8 button. F10 to hide all windows in the array. F11 to hide/show me. F12 to set/unset any window, on which the cursor is/or the foreground window(that depends on your selection), to top. Any feedback,comments,questions and/or votes are greatly appreciated.
I was inspired by Clint's vcTrayAlert Control at http://vbasic.iscool.net/ It was cool but he did not make the source code available. So I decided to write my very own control. Along the way I have added many cool features. I have used a gradient-drawing class that I found on PSC by Kath-Rock. I made a help file for my control and as you will easily figure out, I have invested alot of my spare time into this large project. It is made free but make sure to check out the license agreement and copyright info. All I'd like to ask you is your encouragement - IF you DO like my control. So I'll be waiting for your feedbacks and emails :) Oh, I'd like to ask you for one more thing. Help me debug this control, report any bugs you might find to me on my email addres. Thanx. KEYWORDS: MSN Style Tray Alert Control, ActiveX Control, User Control, Play WAVE WAV File Resource, Always On Top, Top Most, Transparency, Transparent, Fade, Mask, Borders, Gradient, Error Handling.