topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday February 7, 2023, 3:36 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - VideoInPicture [ switch to compact view ]

Pages: prev1 2 [3] 4 5 6 7 8 ... 19next
51
Finished Programs / Re: IDEA: Photo Downloader Kiosk
« on: October 27, 2008, 09:47 PM »
I haven't played around with the AHK code enough to give a good image scaling function in that will preserve the aspect ratio in AHK, but below is what I wrote to scale images in Circle Dock that preserves the aspect ratio while maximizing the image size given a desired size. I think it should be pretty easy for you guys to transfer this C# code to AHK form.

Code: C# [Select]
  1. /// <summary>
  2.         /// Returns a bitmap resized to fit inside NewWidth and NewHeight without aspect ratio change. Uses high quality scaling.
  3.         /// Returns null if an error is encountered.
  4.         /// </summary>
  5.         /// <param name="Bitmap">Image to resize.</param>
  6.         /// <param name="NewWidth">Width of the resized bitmap.</param>
  7.         /// <param name="NewHeight">Height of the resized bitmap.</param>
  8.         public static Bitmap ScaleBySizeBestFit(ref Bitmap Bitmap, int NewWidth, int NewHeight)
  9.         {
  10.             try
  11.             {
  12.                 Bitmap scaledBitmap = new Bitmap(NewWidth, NewHeight);
  13.  
  14.                 // Scale the bitmap in high quality mode.
  15.                 using (Graphics gr = Graphics.FromImage(scaledBitmap))
  16.                 {
  17.                     gr.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
  18.                     gr.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighSpeed;
  19.                     gr.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighSpeed;
  20.                     gr.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
  21.  
  22.                     double scaledBitmapAspectRatio = (double)scaledBitmap.Width / (double)scaledBitmap.Height;
  23.                     double sourceBitmapAspectRatio = (double)Bitmap.Width / (double)Bitmap.Height;
  24.  
  25.                     int bestLeft, bestRight, bestTop, bestBottom, calcWidth, calcHeight;
  26.  
  27.                     if (sourceBitmapAspectRatio > scaledBitmapAspectRatio)      // The source bitmap is wider
  28.                     {
  29.                         bestLeft = 0;
  30.                         bestRight = scaledBitmap.Width;
  31.  
  32.                         calcHeight = (int)((double)scaledBitmap.Width / sourceBitmapAspectRatio);
  33.                         bestTop = (scaledBitmap.Height - calcHeight) / 2;
  34.                         bestBottom = calcHeight;
  35.                     }
  36.                     else
  37.                     {
  38.                         bestTop = 0;
  39.                         bestBottom = scaledBitmap.Height;
  40.  
  41.                         calcWidth = (int)((double)scaledBitmap.Height * sourceBitmapAspectRatio);
  42.                         bestLeft = (scaledBitmap.Width - calcWidth) / 2;
  43.                         bestRight = calcWidth;
  44.                     }
  45.  
  46.                     gr.DrawImage(Bitmap, new Rectangle(bestLeft, bestTop, bestRight, bestBottom), new Rectangle(0, 0, Bitmap.Width, Bitmap.Height), GraphicsUnit.Pixel);
  47.                 }
  48.  
  49.                 return scaledBitmap;
  50.             }
  51.             catch (Exception)
  52.             {
  53.                 return null;
  54.             }
  55.         }
  56.     }

52
How about simply using one of the online storage websites like https://www.getdropbox.com/

You can download their client that sits on your computer and it creates a special folder that gets synchronized across all the computers where you are running the DropBox client. Synchronization happens in real time.

53
I think he is using a C++ mouse hook: http://msdn.microsof...ms644990(VS.85).aspx which would work on all windows versions 95 and up. The hook captures the mouse click events and gives you an option of cancelling them or doing something else.

This is a good article that can tell you how to set up a C++ mouse hook: http://www.codeproje...B/system/TrayMe.aspx
I'm currently using a modified version of that program to quickly allow me to make a window always on top by simply right-clicking on the title bar of a window. It is very useful for me because I often have a need to put a window always on top and right-clicking on a window title bar is the quickest and most convenient way I could think of. Right-click again on a window will make it a normal level window. Note that you will need the Microsoft Foundation Classes found in the standard and professional versions of Microsoft Visual Studio if you want to compile the program in the above URL.

54
Circle Dock / Re: Help again Please
« on: October 24, 2008, 08:37 PM »
Yes, it can be a bit difficult to get the icons where you want because a circle can only had a limited number of icons and then it over flows, meaning that it has to push the last icon in the circle out to the next ring. One thing you could try is to put the icons you want together in the outer circle and then drag and drop them back into the inner circle. You can do this by simply drag and dropping dummy files on to the dock to fill up the inner circle and then delete them once you are finished restructuring. You can quickly delete an icon on the dock by placing your mouse over it and then pressing your delete key on the keyboard.

To make sure two items get swapped within the same circle, ensure that your mouse is over top of another icon in the circle when you release your mouse button.

55
Don't mean to be just sounding negative, because this is an interesting idea, but I really don't think many people could out do a computer on this one. I could be wrong, but I do know of some folks who are just abysmal at pattern recognition.

Maybe they've been probed by aliens and have a computer controlled brain :D

I don't know how well a geometric pattern captcha would work but I think it would be interesting. I'll have to do a lot more thinking about it though.

I still like the cat/dog captcha. Something easy to make,  update with new images, easy for humans to see and hard for computers.

http://www.thepcspy.com/kittenauth#

Example: http://www.thepcspy.com/contact

The author should really apply some distortion effects to those images to prevent automated attacks where the computer can just compare images.

56
Hello,
I think this is something that you could ask in the coding snacks section of this forum: https://www.donation...index.php?board=71.0

Someone there should be able to give you an AHK script that will suit your needs.

57
Circle Dock / Re: small bug
« on: October 22, 2008, 01:24 PM »
Thanks, I will try to replicate this bug.

58
Circle Dock / Re: Help again Please
« on: October 22, 2008, 01:23 PM »
Hello,
To rearrange the icons, drag and drop them over top of one another. I know it would be more intuitive if they actually moved in real time, but I don't have the animation portion down to that advanced of a level yet.

59
Circle Dock / Re: Circle Dock
« on: October 22, 2008, 01:22 PM »
Hello,

If you have downloaded one of the Alpha 8 versions of Circle Dock, I recommend you go to the Settings Panel under Toggling and select the options that you want to toggle Circle Dock with because each person is different. For me, I just use the middle mouse button and the F1 key for toggling Circle Dock.

For the size of the items and the dock, it all depends on what size of the monitor you have and what kind of performance you want. Generally, if you keep the size of the dock small, it will give you better performance than a large dock. I recommend you first go to the Settings Panel -> Dock Shape and adjust those values there while having around 15-20 icons on the dock. The dock will update in real time.

If you are using a tablet PC, go to the General area of the settings panel and adjust the mouse-click sensitivity so that you can click and move alright.

For the background and images used for the dock, simply experiment with the backgrounds provided in the System -> Background folder and the System -> Icons folder of the Circle Dock folder. There really isn't any set themes for Circle Dock, it's what you like it to be.

60
General Software Discussion / Ideas for New Captcha Implementations
« on: October 21, 2008, 06:04 PM »
Since it is widely know that the captcha implementations used by Yahoo, Microsoft, and Google can be broken by computers with a fairly high success rate (around 20-30%), I have been throwing around ideas in my head about a new captcha implementation. However, I don't have a workable or complete idea. I think I need to browse some math sites until something dawns on me.

Basically, I want to do away with image/text recognition and use pattern recognition instead since humans are much better than computers at pattern recognition. The pattern would be generated as an image by the host server on the fly to allow for an astronomically high number of possibilities. There would only be one pattern generated for each captcha request but the user is required to click on a series of points on the image that correspond to a pattern. The host server holds onto a set of coordinates that correspond to a correct sequence of mouse clicks and gives validation only if the user clicks on points close to this key pattern. The client side captcha is essentially a simple javascript that returns the mouse coordinates when the user clicks on the image of the pattern. This multiple mouse click requirement coupled with an image about 500x500 should provide a fairly high level of bot protection while keeping it simple to use.

The problem is that I need a method to generate patterns that can't be easily recognized by computers but is recognizable by humans.

Perhaps we should have some sort of captcha contest on DonationCoder to see who can come up with the best implementation? Also, let's get a list of new/innovative captcha implementations going so we can see what has been done.

61
Post New Requests Here / Re: IDEA: DropFolder
« on: October 20, 2008, 06:43 PM »
Version 2.2 of Custom Desktop Logo is released: http://customdesktop...wikidot.com/download

In this version, I have made Custom Desktop Logo use the default Windows move/copy dialogs when using the logos as drop folders as well as added a disable movement option to the context menu. The drop folder target folders list is now easier to edit because the cells will automatically select the text in the cell when clicked on.

In version 2.1 there was a bug with the multi-threaded move/copy file operation in that if one operation was started and another one started, the first operation wouldn't complete. This has been fixed in version 2.2.

I recommend all users upgrade to version 2.2.

62
I have used various versions of Linux in the past and I've been using Ubuntu for a couple of weeks since I wanted to do some Mono programming with it and port some of my software over to Linux. This means that I need to install Mono onto Ubuntu. From my impressions as a new user of Ubuntu and it's image as one of the friendlier Linux distros out there, I have to say that Windows still has Linux beat for user friendliness. I found out that there is no official user support for the installation of Mono onto Ubuntu so I'm now trying to download a torrent of a distro where somebody has done all the dirty work of figuring out how get the Mono framework running on it.

Another big problem is the requirement to use the terminal to do a lot of the program installations and any advanced settings that are required to get some programs up and running. It's not as simple as Windows where it is often a double-click on an icon that opens a wizard to guide you through installation in a graphical way. Also, I think that there are too many Linux distros out there and this harms it because now a user has to figure out if a Linux program will actually run on his system or if he has to compile it from the source code!

I think Linux could take a step forward by doing anyway with the terminal and simplifying the installation of some programs. I don't think any user short of a programmer should have to touch the terminal.

63
Post New Requests Here / Re: IDEA: Toggle Fullscreen of Control
« on: October 19, 2008, 07:35 PM »
Thanks for the translation! I will include it when I release the update that fixes a potential startup problem with the settings file.

64
General Software Discussion / Re: Getting rid of windows shell
« on: October 19, 2008, 04:29 PM »
Ever had any compatibility issues with using an alternative shell in place of Explorer.exe?

65
Circle Dock / Re: Elliptical Circle Dock Works!
« on: October 19, 2008, 04:27 PM »
The link is in Post #10 above.

66
It is possible for me to add in the Insert key as an option but not for the CapsLock key without using a system keyboard hook since the CapsLock key is of a lower level. However, you can always use AutoHotkey to map whatever keys you want since I believe it uses a combination of registering keys with Windows and hooks. I will add in the Insert key for Alpha 9.

67
Circle Dock / Re: Possible to unhide the description for all icons?
« on: October 19, 2008, 04:21 PM »
It's actually possible to always show the labels in Circle Dock but I purposely disabled that option because I thought it looked too cluttered and confusing with it on. Perhaps I will enable that option in Alpha 9.

BTW, cool screen shot. I think it's one of the best looking one's using Circle Dock because it looks like it's part of the background and in 3D!

68
General Software Discussion / Re: Source Code / Code Snippet Manager
« on: October 17, 2008, 02:39 PM »
Right now, I simply create a hierarchy of directories that are labelled descriptively and by language category to store all the interesting and useful programs I come across that have source code. I only keep the ones that provide something interesting and useful that I can't do off the top of my head. I go through each of the program files I have source code to and try to understand what is happening so I burn it into my head. I like having the full source code to a program that demonstrates the use of the code instead of simply snippets because over the long term, I will probably forget how to use the snippet!

Often, I will use Google to locate source code if I don't store it locally.

69
Post New Requests Here / Re: IDEA: DropFolder
« on: October 17, 2008, 08:36 AM »
I will post an update soon to Custom Desktop Logo that will use the default Windows file copy/move status dialogs that should give you the option of not copying over files. I will also add in the Ctrl-Shift+Click option to add a folder. It will bring up the the settings panel with the new folder added in.

70
Circle Dock / Re: Request Default WorkingDir
« on: October 17, 2008, 07:38 AM »
I will look at the file opening code and see if that is possible to do. It's probably also wise to add that to the items properties panel if possible.

71
Circle Dock / Re: A small problem encountered
« on: October 17, 2008, 07:37 AM »
Yes,
This was reported. I will try to fix it soon.

72
Circle Dock / Re: Problem
« on: October 17, 2008, 07:37 AM »
Hello,
Did you unzip the zip file you download for Circle Dock? Simply double-click on the CircleDock.exe file to restart it again. It should retain all your settings.

73
Circle Dock / Re: next release suggestion: docklet support
« on: October 17, 2008, 07:36 AM »
Hello,
I believe someone has posted that they are working on a standalone version of the Object Dock docklets that we could use for Circle Dock.

74
Circle Dock / Re: Hebrew Translation File for Circle Dock
« on: October 17, 2008, 07:34 AM »
Thanks!

75
Circle Dock / Re: Competitor - Orbit
« on: October 17, 2008, 07:33 AM »
If you look on the Credits List for Circle Dock and the about panel in the Settings Panel, you will see that some parts of Circle Dock 0.9.2 were based on Orbit. I found out about Orbit after I started coding version 0.9.2 and since they were both written in C# and are open source, I thought it would be wise to reuse some code. I've spoken to the author of Orbit and I don't think he will be developing Orbit any more since he says he has abandoned the project.

At first, I tried to simply modify the source code of Orbit and improve upon it but the underlying architecture and the usage of DirectX means that it will always be eating up 25% of the CPU time to render the dock even if it isn't doing anything. Essentially, Orbit renders the dock as one big image and draws it 24-50 times a second to produce it's animation. The last version of the source code release has stability problems that cause the dock to crash after 5-10 minutes of use for me and it would have taken a lot of effort to correct that so I wrote Circle Dock 0.9.2 instead.

As for the Settings Panel, some people like it and some people don't. But looking back, I would make it like a regular properties panel instead of the fancy kind like it is now. It would be simpler to code and load up faster.

Pages: prev1 2 [3] 4 5 6 7 8 ... 19next