VB6: enabling mousewheel for controls - vb6

can someone tell me if there's an easy way to enable mousewheel for controls (in runtime)?
i want to use the wheel for scrolling controls as soon as the mouse is over them.
thx

Karl E Peterson shows how to make any control respond to the mousewheel in this nice article in Visual Studio Magazine, with VB6 code you can just drop into your project.

Have you looked at this vbforums example code: Enabling MouseWheel Support with any control
Ref.

One very easy way is to install VBScroll by Shahin Gasanov. This is to enable scroll bars in the VB6 IDE. Even if that's no what you meant by 'the runtime' then it's worth having anyhow ;)

This solution works fine for me. Method 1 http://support.microsoft.com/kb/837910

Related

can anyone show me how and How they have 5 button on the title bar instead of 3 max, resize, close in Windows?

mostly in all article i found that everyone show that their OS give them 5 button. can anyone explain how
http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs
in this article every window's title bar have 5 button on top whenever i can see only three button in my windows [close, restore ,maximize].
can anyone show me reason behind it.
They're running UltraMon, which is a utility that provides enhancements for multiple monitor support.
In particular, it adds extra window management buttons to the title bars of all applications, which make it easy to move windows from screen to screen.
You can download a free evaluation version from the vendor, but the full version will cost you $39.95 US.
He has multiple screens on his computer, those buttons mean move to next screen.
Extra buttons in the titlebar come from utility applications that hook into every process.
Take a look at this tutorial for a basic example, you also need to register a hook with SetWindowsHookEx (WH_CBT or WH_SHELL)
For Windows Vista and 7, Microsoft has provided detailed guidance in the article Custom Window Frame Using DWM.
Copied from my answer here.

How to create custom onscreen keyboards?

Im about to start creating a custom onscreen keyboard for my WP7 app. An out of the box SIP will not work since they can't be customized or built from scratch with .NET.
Ideally the keyboard would activate like a SIP. Specifically, appear when the textbox receives focus. Docking to the bottom of the screen would be nice, too.
Any ideas where I could find samples of this?
Also, do you have any recommendations or lessons learned you could share?
I think you'll be making this sample ;)
The challenge with letting textbox take focus is likely going to be the built in SIP is going to appear. ReadOnly is an option, but you'll either lose or need to find a way to retain/mimic the cursor if that visual queue is important to you.

BusyIndicator control

It seems that the phone control toolkit is missing the BusyIndicator control.
Does someone know about one ?
does something else specific exists for WP7 ?
Have you seen the ProgressBar control? You can use the ProgressBar control to show that your application is busy doing something. It is recommended that you use PerformanceProgressBar by Jeff Wilcox (Remember to read his follow up post too, it is important to consider IsIndeterminate and its value).
If you wanted to create a splash screen with a progress bar in it, check out this example. Alex also shows how to customize the progress dialog in this post.

Tap and Hold (Long Press)

Has anyone implemented Tap & Hold in a Windows Phone 7 App yet? I can see a couple of possible approaches KeyDown/KeyUp and a timer or ManipulationStarted/manipulationCompleted and a timer.
However it strikes me that this is a less than idea approach because different apps would have different timer settings leading to inconsistency.
Am I missing something? I was hoping for a TapAndHold event
For all views Hold method is there.
It will handle long press function.
Silverlight Toolkit for Windows Phone adds easy to use gestures support, including On Hold gestures
I'm in the same situation, and I'm looking for "the recommended way". In the meantime, Mike Francis posted a solution on his blog, using Microsoft.Xna.Framework.Input.TouchPanel's gesture recognition within a Silverlight app. I didn't try it.
Start the Timer on Hold Event of GestureLister
and stop it on GestureCompleted event this is really a trick see detail answer on following link
How do I detect when toolkit:GestureListener Hold has stopped?
Button b = new Button();
b.Hold += new EventHandler<System.Windows.Input.GestureEventArgs>(HoldEventHandler);
The above code should work for touch and hold event

Change min/max/close buttons theme

im currently overiding the WM_NCPAINT, WM_NCCALCSIZE and WM_NCACTIVATE to paint my own color/themed title bar for an application im working on. Now this is working great however the min, max and close buttons still are xp default theme.
I looked into what controls them and the mouse messages do. However they also contol resizing and other functions that I dont want to lose.
Is there an easy way to just change the theme of these buttons?
Windows XP
MFC Forms
Visual studio 2005
I think your best bet here is to disable the buttons and redraw them with something akin to to the code I posted in this answer. It's in C# with WinForms, but the vast majority of it is overloaded WndProc() anyway, which you should be able to use almost copy/paste into MFC.
Implementing click handlers to do what you want them to do is trivial.
Note: The asker of that question said the code didn't work in Vista. I don't have a Vista box, but it works for me in XP.
This also helped: http://www.catch22.net/tuts/titlebar
You can also check out how it's done in MFC Next (VS2008 SP1). The theming support there does custom draw of the whole title bar, you can get a few ideas from that. I presume they tested it on Vista, too ;)

Resources