473,379 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Help in Trackbar

37
Hi there.. Regarding the button help i posted the last time, i already managed to do it.. Thanks.. But now, i'm having problems with trackbar.. I'm supposed to come up with a frequency trackbar that ranges from 250Hz-8kHz and display it on a label.. At 250Hz-1000Hz, it must increment by 250Hz. At 1000Hz-1500Hz, it must increment by 500Hz. And lastly, 2000Hz and above must increment by 1000Hz.. I can't get the tick frequency right.. This is the code i've come up so far..


Private Sub freqTrackBar_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles freqTrackBar.ValueChanged

Dim frequency As Integer = freqTrackBar.Value

If frequency >= 250 And frequency < 1000 Then
Me.freqTrackBar.Minimum = 250
Me.freqTrackBar.Maximum = 8000
Me.freqTrackBar.SmallChange = 250
Me.freqTrackBar.LargeChange = 250
Me.freqTrackBar.TickFrequency = 250
Me.freqLabel.Text = freqTrackBar.Value & "Hz"

ElseIf frequency >= 1000 And frequency <= 1500 Then
Me.freqTrackBar.Minimum = 250
Me.freqTrackBar.Maximum = 8000
Me.freqTrackBar.SmallChange = 500
Me.freqTrackBar.LargeChange = 500
Me.freqTrackBar.TickFrequency = 250
Me.freqLabel.Text = freqTrackBar.Value & "Hz"

Else
Me.freqTrackBar.Minimum = 250
Me.freqTrackBar.Maximum = 8000
Me.freqTrackBar.SmallChange = 1000
Me.freqTrackBar.LargeChange = 1000
Me.freqTrackBar.TickFrequency = 1000
Me.freqLabel.Text = freqTrackBar.Value & "Hz"
End If

End Sub

By the way, i've already allow personal emails.. Thanks Killer42.
May 31 '07 #1
0 1268

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Pls Help | last post by:
Hi, I've encountered a weird TrackBar issue, it seems to hang completely when the TrackBar.Maximum is set to certain large values.. what's going on? Have tried this on a few different 2000/XP...
4
by: Bilo | last post by:
I have a Windows Forms Class MainGUI I have declared MainGUI maingui; public System.ComponentModel.Container components = new Container(); in the Class I call another class MediaDriver with...
0
by: RuffAroundTheEdges | last post by:
I'm trying to get an aspx page to display a TrackBar. There is no TrackBar in the System.Web.UI.WebControls. Is there a TrackBar like control in System.Web.UI.WebControls? If not, is there a way to...
2
by: Paul Helmuth | last post by:
All, I am trying to assess how much work it is going to be to "port" my current Visual Studio 6.0 applications to dotNet. It seems like many things that should be trivial are really...
0
by: deko | last post by:
I'm using VS05/.NET 2.0 with a TrackBar control in a Windows Forms application. I need to be able to manually scroll the trackbar (hold down left mouse button and drag), but I need to prevent...
1
by: Kris | last post by:
Hi. We are developing an application in VS2005 in C#, .NET, that has lots of tabs. On one of these tabs, there is a horizontal trackbar. However, we are unable to set the background color of the...
1
by: martins | last post by:
hi how can I configure/set the trackbar control in order to scroll between decimal values i.e. between 0.5 and 1 for example
1
by: _DD | last post by:
Not sure why you can't get transparent background with a TrackBar control. Is there any way around this? I've searched for info, but mostly found other people looking for a transparent TrackBar.
2
by: mmdst23 | last post by:
I'm working on a video player app, and I want to implement a trackbar that behaves like the one in Media Player, that is the cursor position moves to where the user clicked instead of moving in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.