Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Way To Allow Mouse Scroller To Work?


Is there a way to let my users use their scrolls on their mouse (if they have a scroll mouse) to do things in my program, like zoom or something? How would I let them use their mouse scroll?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Disabling The Middle Mouse Scroller
hi all, how would i disable the middle mouse scroller within my form, it causes some problems within my program

Grid Scroll Event With Mouse Scroller
hai 2 all

i hav small doubt abt the grid , iam developing an application which hav grid and iam displaying a data or information to the grid , for example 100 rows and iam not able to scroll the grid using the mouse scroller button without using the scroller which will appear if the data on the grid is exceeds the grid size ie vertical scrollbar
for exMPLE
I HAVE A GRID ON MY VBFORM WITH DISPLAY ROWS 10. I HAVE POPULATED 100 ROWS DATA ON THE GRID. WITHOUT CLICKING ON VERTICAL SCROLLER WHICH WILL APPEAR ON RIGHT SIDE. I SHOULD SCROLL THE GRID BY USING MOUSE SCROLLER.

REGARDS
PRAVEEN KUMAR BINGI

Vertical Scroller And Horizontal Scroller
Hey All,

I have no idea how to work this and i'd appreciate pointers given by anyone... if you could point me in the right direction like a tutorial i can read that can help me set this up on my form that would be great...

Thank You

Mouse Wheel Won't Work In VB
Hello...I have been coding for about a year and recently put my VB aps on a new laptop. The wheelmouse works on everything except my bread and butter, VB. I can move the mouse around but the wheel part won't move the code. Does anybody have an idea why? Thank you in advance for any tips.

Mouse Scroll Don't Work In VB IDE
i have MS Intellie optical mouse, while i'm coding, i like to use the scroll. it does not work, i know it works on other systems. anyone has an idea?

Help... Mouse Wheel Doesn't Work In Vb6
Argh. My mouse wheel works in every application I have except the VB6 development environment. I have a microsoft mouse and intellipoint software. I do not see anything in the control panel that will try and force VB6 to recognize the mouse.

Any ideas?

Mouve Mouse I Start But Not Work
t& = SetCursorPos(0,0)This will only work if the formula has bee declared in the declarations section:

Declare Function SetCursorPosition& Lib "user32" _
(ByVal x As Long, ByVal y As Long)


t& = SetCursorPos(0,0)

The Hide Mouse Tip Doesn't Work
the hide mouse tip doesn't work can you give me a different code that would work for vbasic 5.00

Mouse Wheel (scrolling) Won't Work
It has been a while since I last used VB 6, but I thought I used to have the ability to use the scroll wheel on my mouse in the code window.

Is there something in the options I am missing?

Hopefully someone can help

Thanks

JJ

Mouse Clicking Won't Work On Hyperlinks
The program I am writing will simulate mouse clicks in a browser window. The simulated mouse clicks work correctly for many parts of the page/browser, such as the address field, but when I try to send a mouse click on a hyperlink it does not register. Any advice would be appreciated. Here is some of the code I am using.


Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
Const MK_LBUTTON = &H1

public Type POINTAPI
x as Long
y as Long
End Type

Dim Pointabc as POINTAPI

'the following code sends a mouse click to the current mouse cursor position

'MouseMod is a module that contains API functions such as GetCursorPos
If MouseMod.GetCursorPos(Pointabc) then
hwnd1 = MouseMod.WindowFromPoint(Pointabc.x, Pointabc.y)
End If

TempPoint = LShiftWord1(Pointabc.y, 4)
TempPoint = TempPoint + Pointabc.x
PostMessage hwnd1, WM_LBUTTONDOWN, byval CLng(MK_LBUTTON), TempPoint
PostMessage hwnd1, WM_LBUTTONUP, byval CLng(MK_LBUTTON), TempPoint

Mouse Scroll Wheel Won't Work In VB Editor
My mouse scroll wheel works fine in every other application, but when I try to scroll through the code in the MS VB editor: nothing. I can even scroll thru the VB project explorer in the MS VB editor no problem.

What's up with this? This happens on my home computer, too.

I also just got a new comp and never had the scroll issues on the old one. Noticed it with the new comp, though.

Mouse Click Does Not Work On The Rich Text Box
I am using the RichText box for the output of my prog.

When I tried to highlight it and COPY the output, THE MOUSE DID NOT work.

When I used a Regular textbox I did not have to do anything it automatically works.

for ex: I want to be able to use the LEFT mouse to hightigth and COPY, or Paste like the textbox. AND USE
THE RIGHT MOUSE TO DELETE OR PASTE??

HOW DO I DO IT?

thanks,

stash




Edited by - jseal on 3/16/2007 4:45:14 AM

Mouse Wheel Events Do Not Work In The Visual Basic 6.0 IDE
I thought this might be helpful...

Mouse wheel events do not work in the Visual Basic 6.0 IDE

Here is the fix...

Mouse Wheel Doesn't Work In Code View?
erm, using my mouse wheel doesn't seem to work in the code view? I can't scroll up and down with my mouse wheel - is that normal?

Mouse Scroll Wheel Wont Work In IDE { RESOLVED }
I have microsoft IntelliMouse and the scroll wheel doesn't work in Visual Studio 6 IDE. However it works in Visual Studio.NET IDE and Delphi IDE and as a matter of fact everywhere else.

Is there any special setting I need to take care of since it used to work before.

Cheers

Hiding Mouse (2 Lines Of Code Dont Work)
Can anyone tell me why the following code doesnt work?
I have 2 command buttons on the screen (commandon and commandoff)


Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long

Private Sub Commandoff_Click()
ShowCursor (False)
End Sub

Private Sub Commandon_Click()
ShowCursor (True)
End Sub


This code does not work at all even though it is EXACTLY what numerous vb tips sites have for copying and pasting.
I have Windows 98 and VB6 + SP5

Please help as Its driving me round the twist!

2d Scroller
i am attempting to make a 2d scroller kinda game but when i scroll it flickers like mad

i tried using bitblt but it flickers as well

MSN Name Scroller
Can't get it going, heres the code that I've collected.


VB Code:
'ModuleOption Explicit  Private MsgrContacts As IMessengerContacts Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPublic Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPublic Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As LongPublic Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As LongPublic Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPublic Const VK_SPACE = &H20Public Const WM_COMMAND = &H111Public Const WM_KEYDOWN = &H100Public Const WM_KEYUP = &H101Public Const WM_SETTEXT = &HCPublic Const WM_GETTEXT = &HDPublic Const WM_GETTEXTLENGTH = &HE        'On a form ----------------------------------- Option ExplicitPrivate WithEvents objMessenger As MessengerAPI.MessengerPublic sText As StringPublic hasfocus As BooleanPrivate Sub Form_Load()   Set objMessenger = New MessengerAPI.Messenger   MessengerAPI.Messenger.OptionsPages 0, MOPT_GENERAL_PAGEsText = "Make my name scroll" End Sub  Public Property Let FriendlyName(ByVal snewFriendlyName As String)Dim button&, edit As Long, general&, GeneralPersonal&  general = FindWindow("#32770", "Options")  GeneralPersonal = FindWindowEx(general, 0&, "#32770", "Personal")  edit = FindWindowEx(GeneralPersonal, 0&, "Edit", vbNullString)  Call SendMessageByString(edit, WM_SETTEXT, 0, snewFriendlyName)  button = FindWindowEx(general, 0&, "Button", "OK")  Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0)  Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0)End Property Private Sub Timer1_Timer() Static lChar As LongMsgBox sText    sText = Mid$(sText, 2, Len(sText)) & Left$(sText, 1)    FriendlyName = sTextDoEvents End Sub


Any ideas where I might be going wrong?

Scroller
Why is the VSCroller always blinking, and how do I change that little SQUARE to a long SQUARE?

Scroller
i can't get the Text scroller in the tips section to work . Can anyone help, I just need a Vertical text scroller, thanks.

[This message has been edited by marco0009 (edited 02-21-2000).]

2d Side Scroller
Hello all, long time no talk!

I am in the midst of my design doc for a 2d Side Scrolling game, like Super Mario (just a learning game for myself) and came upon some stuff I'd like to see if I could get some help with. Since I am trying to learn this stuff, I'd rather not have someone give me code, just kinda nudge me in the right direction with how to do some stuff.

I searched the forums for information on a map editor - but I don't see someone doing the same stuff that I wanted to do. I don't think I need to do tiles or anything, unless I'm wrong. I need to write a map editor (or level editor would be more correct I guess), and was thinking "Should I just save it as a bunch of text, or binary or something, and parse it into useful information on runtime? Or am I looking at this completely wrong, maybe there's a better way to write a level."

I appreciate any help you guys can give!

2d Side Scroller
hi i just about got jumping and collision done thanks to many people on this form who have helped me learn through showing me code, i want to apply what i have learned to make a side scroller game what should do i need to take in account befor i embark on this task, and has any one here done a side scrolling game befor

About Side Scroller AI's.....
Even though the first one didn't look good, I took the suggestions of people here and made a new side scroller, with a bigger screen, better graphics, requiring less memory and scrolling at 100 FPS (thanks BillSoo ).

However, since I'm an RPG man going into an unknown world, I've ran into a small problem. The AI in my RPG's just pick a random guy, or sometimes look for the weakest character in your party, no big deal, just some simple coding. However, I'm wondering on what an efficient way of doing AI for a fighting game. Should I just make them move closer to you, fighting when they're so close, which is the basic method, or does anyone have an idea for some kind of idea to make it have variety, so that different guys have different methods of attacking your character?

I'm thinking right now that I'll just always have two guys on the screen who try to pincer you, which is a pretty simple sub routine.

The game is sort of like the last (well, what I have done so far), except the character can walk all over the bottom half of the screen (It's another street scene, and about halfway up is where the sidewalk ends).

Thanks for reading,
Ed

Side Scroller
could some one post an example of a side scroller?
thanks

Side Scroller Help Me
hmm who here can make a mario type game with machine guns and dont forget yoshi with rocket lanchers

Chat Scroller
Can anyone help me out with this i need a code foe a text send to another program sending it as many times as a person would like to send it ?

Horizontal Scroller...
hi guys...

i am trying to implement this horizontal scroller (marquee) on my form...this is the code i have used so far and well the marquee runs with a glitch...it disappears when in the middle of the picturebox...could u suggest something...

the following code is placed within a timer with an interval of 100 ms...also the label lblMarquee is placed inside the picturebox picMarqueeBack

'------------------
if (lblMarquee.left + lblMarquee.width) <= picMarqueeBack.left Then
lblMarquee.left = picMarqueeBack.left + picMarqueeBack.Width
end if

lblMarquee.left = lblMarquee.left - 50

lblMarquee.autosize = true
'------------------

also this kind marquee is not very smooth...it has a lot of breaks in it...can you suggest some other way of doing the same thing...api calls?

Regards,

Farooq

Side Scroller
I have just started working on my final project for visual basic at my school. the final project is a full feature game in vb, i chose a side scroller space shooter kinda thing. so i have the background that scrolls and all but due to the size of the image when i load the program it takes well over 30 seconds to load the form. i was wondering if there was a way in which i would be able to cut down load time, all the graphics in my game are done using bitblt or stretchblt and the image that scrolls on my form is a hair over 2 megs.

any help/suggestions would be greatly appreciated!

Dull1554

Taskbar Scroller
Hey all!
I am trying to make a text scroller that displays at the top of my screen. But it covers part of my screen. how would i get the screen to resize around my app? like a toolbar when you move it from teh bottom to the top.. the screen resizes... that is what i want to accomplish. any suggestions?

2D Side Scroller
Hi...I'm trying to make a 2D Side Scroller game using DirectX 8. I got the model ready. He's rendered and can be moved left and right, facing the direction he's walking. Does anyone have any tutorials, examples, or any sites I should check out in order to make a level or map for the character. I want to be able to side scroll left and right such as Super Mario on SN.

Text Scroller
How would I have a set of characters say, 5, in a row on one line, scroll through the alphabet, and one at a time settle on a predetermined letter? sort of like some sort of a password decryption effect you would see on some games

RichTextBox Scroller
I'm using a Rich Textbox for a chat. The problam is that when the text is continuing beyond the height of the textbox, the scrollbar wont move to the bottum of the textbox, so the user needs to scroll down to see the latest msg.
How can i make the Rich Textbox scrollbar to always scroll down to the last msg line?
tnx

Text Scroller?
how would i make a text scrooler like the one in this picture, it scrools the text upwards

Picture Scroller
Hi Everyone,

I have an idea here but I am not sure how to accomplish it. Any help would be greatly appreciated. Anyways, here is the idea. I want to set up a picture scroller whereas there is a combo box and an image box on a form. The combo box is filled with a list of items, for example, car, basketball, boat, toothbrush, etc. When an item is choosen from the combo box list I want to have the corresponding image shown in the Image Box. I was thinking about putting the images into an ImageList, but am not sure if this will work. Any ideas on how to accomplish this? Thanks for any help.

Simple Scroller
The code below is the two parts of a project

one if vb form the other is the .vbp project file

I used a label as a sample but you can replace the label with a rich text box or image as you please.....

FORM FILE
[code]VERSION 5.00
Begin VB.Form Form1
Caption = "Simple Scroller by Zaf Khan."
ClientHeight = 1965
ClientLeft = 60
ClientTop = 345
ClientWidth = 4035
LinkTopic = "Form1"
ScaleHeight = 1965
ScaleWidth = 4035
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Interval = 100
Left = 3480
Top = 120
End
Begin VB.VScrollBar VScroll1
Height = 1575
Left = 3000
TabIndex = 2
Top = 120
Width = 255
End
Begin VB.PictureBox Picture1
Height = 1575
Left = 120
ScaleHeight = 1515
ScaleWidth = 2715
TabIndex = 0
Top = 120
Width = 2775
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Label1"
Height = 195
Left = 0
TabIndex = 1
Top = 1560
Width = 2775
WordWrap = -1 'True
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()

Dim counta As Integer
Dim buf As String

For counta = 0 To 29
buf = buf & "cats and dogs and mice men a world do not make "
Next
Label1.Caption = buf
VScroll1.Max = Label1.Height

End Sub

Private Sub Timer1_Timer()

Static xvalue As Integer

xvalue = xvalue + 60
If xvalue > Label1.Height Then
xvalue = 0
Label1.Top = Picture1.Height
End If
VScroll1.value = xvalue
Label1.Top = (Picture1.Height) - VScroll1.value

End Sub
[code/]

PROJECT FILE
[code]
Type=Exe
Form=Form1.frm
Reference=*G{00020430-0000-0000-C000-000000000046}#2.0#0#......WINDOWSSYSTEMStdOle2.tlb#OLE Automation
Startup="Form1"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Dr Zed Solutions"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
ThreadPerObject=0
MaxNumberOfThreads=1
[code/]


DocZaf
{;->

Form Scroller
I want to buildt a form that has more widgets than i can accomodate on a form the height of the screen. does anyone know how i can add a scroller such that i can scroll the form and keep adding widgets (like in mfc and even the ms access form builders)?

thanks

Beginner Side Scroller
Hi. Does anyone know a really clear tutorial for a tile-based side scroller type game? I'm really stuck - I've had an idea for a game but can't start ork on it until I can do tiles.
Thanks

Organizing A Side Scroller
I'm trying to make a simple sidescroller so that I can learn the following:

- Making a character move left and right
- Making a character jump
- Collision Dectection
- Building a Map

I've searched through the forums and found answers to most of those things, but what I haven't really come upon is how to organize things.

The game is going to use bitblt. Right now I have a form called frmGame that is going to be the form on which the game is played. That form has a Game loop which at the moment only checks for keydown. I also have a module that contains has the declaration for the bitblt function.

Right now the problem that I'm having is how to get everything to work together. I've learned various bit of code, like how to do collision, how to do movement, but I don't really know how to put it all together. Any suggestions, or examples?

Graphic Method For Scroller
Hi everyone.
I'm working on a game in VB. I want it to be a scroller (not just a side scroller, I want to be able to scroll in every direction). This is my first time working on a project of this kind.
The main engine (game rules, characters and map) are almost finished but I haven't started implementing the graphics.
My question is, what kind of graphic methods are there to implement something like this? I know this can be done using DirectX (which I know nothing about, so I'd rather not use), or BitBlitting (which I know little about, but I think this is what I'm going to do), or with a picture box within a picture box (which I know very much about, but I've tried and the results are disastrous). Are there any other methods I don't know about? Is BitBlitting really the best way to do this (considering I want to avoid DirectX)? Is DirectX better and not to hard to learn?
Also any links with good tutorials or examples will be appreciated.

Thanks a bunch.

List Box Scroller Position?
when i add items to my listbox the scroller always stays at the very top (first item entered). how do i make it so that the scroller is always as far down as it can possibly go?

ComboBox Scroller Bar Size
I'm working on a program for touch screen
and combobox scroll bar size is too small for a finger touch.

How can I make make it bigger?

Thanks for you time.

Text Box Vertical Scroller
does anyone know what textbox property i can set so the textbox stays at the botom of the text box? ie: when there is too much text in the textbox to display on one page, have the vertical scrollers stay at the bottom?

How To Remove Scroller Of Listbox?
Hello. I want to remove vertical scroller of listbox. Is that possible ?

Thanks

Loading Controls To A Scroller
Guys

I have a 'MB Scroller Control' which I acquired a while ago from vb2themax. I hadn't used it until now and I'm having a little problem.

If I place controls onto the scroller at design time and resize the scroller control to be smaller than the collection of controls placed on it (if that makes sense) then the scroll bars on the control work fine.

The problem comes when I am loading the controls onto the scroller at run time. I don't think the scroller control knows they're there so doesn't display a scroll bar.

Any ideas how I should tell the scroller control that the controls loaded onto it are larger than it is itself?!



This is the control, by the way.

Thanx

Msn Messenger Name Scroller [ Solved ]
i would want to make a name scroller for msn messenger
i got the bas on my prohect alredy, the sub to set the name is:
"name_set" without quotes.

i made a textbox and two buttons, the textbox for the text that the user would want to scroll as her or his name, one button to start, and the other button to stop.

i would like that when the user clicks on start it will start scrolling the textbox2.text.

my friend told me this code:

dim boo as string
dim bah as string
dim boo2 as string
dim i as integer

for i = 1 to len(boo)
bah = left(boo, i)
boo2 = right(boo, len(boo) - i)

changetitle boo2 & bah
next i

but i didnt understand it, someone help please

Textbox Letter Scroller (PLEASE HELP!)
ok, heres the deal, i want to have a word typed into a text box, and then when a command button is pressed, the word scrolls into the next text box like an encryption, like, the first letter would scroll through all of the letters in the alphabet, then it would show the letter, then advance to the next letter, and so forth

ex:
the word is "hello"

a a
b b
c c
d... d
h e and so forth

thanks in advance, mike

Howto: Credits Scroller
No prob...

if you don't use End to finish the prog, VB calls all Class_Terminate events anyway.

But it's sloppy to trust vb to do it for you, it's better to do it yourself.

Gerco.

Refreshing RichTextBox Scroller
I`ve got a RichTextBox and two command buttons....
when I click the first button he loads a rtf file into
RichTextBox, than I scroll down the file in RichTextBox..
but when I click the seccond button he loads anothe file
into the same RichTextBox but the scroller doesn`t refresh..it
stays down...how can I get the scroller to move to the top each time
I load another file into RichTextBox
P.S.
is there any way to change the color of the scrollbar??

Tile Game + Side Scroller
Hey,

Ok, I want to make a game resembling Zelda. I created an array of 100 picture boxes for tiles and wrote a map editor so that I can create maps for it. It all works beautifully and it is so easy to do. I have 2 things that I don't know how to go about implementing. I want my character to look like it is walking. I will have 3 frames for each direction (standing, left-leg forward, right-leg forward). The thing is, I don't want the character to move a whole tile when he walks. It should take all three frames to cross a tile. If I can figure that part out, then it would help me later with the collision detection so that you can start to walk onto a tile but can't go all the way (like a tree in the middle of the tile, you wouldn't want to have to stop on the square edge of the tile not even close to the tree). So does anybody know how I would go about breaking the walking animation into steps across a tile? If possible, without a timer. The second question is about moving to the next screen. I don't want to walk to the edge of the screen and then it jumps to a new screen. I want it to scroll in the direction I am moving, drawing only the tiles that need to be visible at a time. So like a side-scroller but It should scroll up, down, left, and right. I guess you would need to know a little about how my map editor works. Each tile (tree,rock,ect) has a number. The map editor is visual but when I click "Create Map" it figures out which tile is where and saves all the numbers to a file. Then my program retranslates it to the tiles again. There is a 100 numbers in one of my map files (*.txt). Do you think there is a better way to implement the map process so it will work better for the multi-directional scrolling. Oh yeah, this game is 2D looking from an over head view. Ok, I have asked to many questions. Thanks for reading this.

Copyright © 2005-08 www.BigResource.com, All rights reserved