How to make a device selector control?

Hello all,
Some months ago I saw a simple control that allowed me to select device/channel, but now I just cannot find it (either in Google or in CVI).
Right now I am using DAQmxGetSystemInfoAttribute() and DAQmxGetDeviceAttribute() functions to query the available channels.
Thanks for the help in advance!
Yours,
Adrian
Solved!
Go to Solution.

This KnowledgeBase entry can help you in configuring the controls.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • How to make a valve in control editor?

    I want to make a control function in Labview5.0,but I don't know how to make it,for example I will make a valve that is a control funtion,how to make it properly

    If you were to go to Search Examples>Demonstrations>Process Control>Control Mixer Process, you'll find a VI with several custom controls including a valve. All it is is a boolean with custom images. To make your own, use a drawing program like Paint and make images of your valve in the open and closed state. Place a boolean control on a VI's front panel and choose Edit Control from the Edit menu. Once in the control editor go to customize mode. Choose Import Picture From File from the Edit menu. Right click the boolean control and choose Picture Item to Replace to determine which picture to replace with the one from file (a boolean actually uses 4 pictures but you only need to replace the first two which are the true and false states). Right click again and
    choose either Import Picture or Import at Same Size. Repeat for the other boolean state with a different picture. You should save your changes as a .ctl so that you can easily use it again.

  • How to make external devices (like iPods, etc.) NOT mount as connected drives when plugged in via USB to a Mac?

    If I plug my iPod (or a thumb drive or whatever) to my Mac's USB port, the device appears as a icon representing a connected drive on my Mac's Desktop.
    This is normal, expected behavior.
    HOWEVER, in some cases, I'd prefer that the device not "mount" as a connected external drive.
    With thumb drives or external USB drive, of course, I want them to "mount" so I can transfer files on or off them -- that would be the only possible reason to connect an external drive like that.
    But with other Apple devices like iPods or iPhones, there are TWO possible reasons to connect them to a Mac: either to "sync" them or transfer files on/off them; OR, to simply recharge the device's battery. (Or, both sync and recharging functions at once.)
    For those people who use their Apple devices in ways that require transferring files (i.e. most people), then having the device "mount" as a connected device is a desirable behavior.
    But in my circumstance (and I bet there are a lot of people in a similar circumstance), I have no need or desire to transfer any data to or from my device every time I plug it into my Mac: I'm plugging it in SOLELY to recharge the device's battery.
    Specifically, in my case, I have a 6th-gen iPod Nano, and I use it exclusively as an FM radio and a pedometer. I don't have any mp3s or songs or any other external files loaded on it, nor do I plan to add any in the future.
    The only reason I ever plug it into my Mac is so that I can recharge the iPod's battery.
    But the "problem," which is a minor one I admit but a problem nonetheless, is that every time I connect the iPod to the Mac, the iPod appears as a "connected drive" icon on my Mac's desktop. Which means that I'm not supposed to just unplug the iPod  when I'm done -- first, I have to find its icon on the Mac Desktop, and then drag the icon to the Trash, to "unmount" it -- and only then can I freely unplug the iPod without getting an error message telling me that I shouldn't just disconnect connected drives without first properly unmounting them.
    This would be bothersome enough if I only had to do it once per connection, but in the case of the iPod Nano, there's no way to tell how recharged it is while it is in the act of recharging, so that to see if I'm "done," I have to unplug it, check the battery status, and if it's not fully charged, re-plug it back in. So that each time I recharge it, I often have to unmount the drive several times, depending on how impatient I am.
    There has to be a way to prevent the mounting of the drives of devices that one is connecting simply for the purpose of recharging. But how?
    Strangely, I also have an old iPhone, and when I plug that in for recharging in the same way, it DOESN'T appear as a connected drive on the Desktop. I'm not sure how I managed to do this, but long ago I must have changed some setting or preference for this to happen. And by now I've forgotten what I did.
    I'd prefer that I could change the "mount/don't-mount" setting on a device-by-device basis -- i.e. make it such that this particular iPod doesn't load, but perhaps a different iPod would load -- but if that's not possible, then is there a way to stop ALL iPods and iPhones from loading as connected drives when plugged in?
    (I'm not talking about appearing as connected drives within iTunes -- I'm talking about appearing as an icon on the Desktop in the Finder.)
    And please don't tell me to just buy a wall charger! I prefer to recharge off my computer if possible, using the charging cord that came with the iPod.
    I presume there's some simple setting to toggle this on or off, but I haven't yet found it. Any clues would be appreciated. Thanks!

    Well, I already know about that Finder Preferences option, but that is not what I'm looking for. Why not? Because I still need CDs and DVDs to appear on the Desktop and mount properly! If I uncheck the "CDs, DVDs and iPods" option, then I lose the ability to access CDs and DVDs, which creates a whole new problem for me. What I want is to not mount iPods only -- actually, what I really want is to not mount this particular iPod -- but if that level of specificity is not possible, then I want to exclude just iPods from mounting, without also condemning CDs and DVDs (or whatever) to invisibility.
    Also, I was confused by the way the Preference is worded: It says "Show these items on the Desktop," with a series of options to check. But this phraseology seems to mean that the unchecked items will still "mount," they simply won't appear as Desktop icons. One would still have to "Eject" them using a menu command, rather than dragging the icon to the Trash -- right? Or am I mistaken, and is the Preference Pane simply badly worded, and when they say "Show these items on the Desktop," what they really mean is "mount these external devices as connected drives." So that if a category is unchecked, then they won't load as external drives at all?
    But if so, then what purpose could possibly be served by inserting a CD or DVD that is not recognized by the computer? And if it isn't recognized, then it would seem that there would be no way to ever Eject the CD or DVD disk. Right?
    Thus, if I uncheck that Finder Preference box you suggest, one of two outcomes will result:
    -- Either CD, DVDs and iPods are still mounted, they just won't appear as icons on the Desktop; but they would still need to be Ejected via a menu command, which doesn't solve my problem.
    -- Or, CDs, DVDs and iPods are not mounted or recognized by the computer at all, which means that if I insert a disk into the disk drive, it will get stuck there forever, since there's no way to Eject it, since the OS doesn't recognize that it's even there. Which is thereby a new problem.
    Either way, I'd have a problem! Or...? Clarification, anyone?

  • How to make Automatically Device driver installation in Win 7/WIn 8 when using RNDIS in Windows Compact

    We are developing a precision instrument that measures Temperature, Pressure and humidity used in the pharmaceutical industry.
    The Instrument is based on Windows Embedded Compact (7.0)
    WE establish a TCP communication vi a USB connection. This is done by the RNDIS Driver.
    When we connect the instrument to a PC we have to do the following in Windows:
    http://developer.toradex.com/knowledge-base/how-to-install-microsoft-rndis-driver-for-windows-7
    The INF that is used is then C:\Windows\inf\rndiscmp.inf
    We want this to be executed automatically
    The way it is automated is by setting the correct entry’s in the registration database on the Instruments. In Windows CE registration database.
    On
    http://www.usb.org/developers/defined_class we think we must set Base Class = EFh, SubClass = 04h and Protocol = 01h.
    But how is this done in the registry on the device?
    Who can help me :-)

    Hi Mads,
    changes in "rndisfn.h" in public folder have no influance on your project, because those files are not built at all. Visual Studio will use this one anyway (which is already built): C:\WINCE700\public\common\oak\target\armv7\retail\rndisfn.dll
    To make use of Microsoft public code, you have to clone this code - that is copy selected source files to BSP folder and adjust DIRS files to include new data in the compilation process.
    To clone RNDIS component, copy rndis folder from C:\WINCE700\public\common\oak\drivers\UsbFn\class
    to C:\WINCE700\platform\YOUR_BSP\Src\COMMON\USBFN.
    Edit source file C:\WINCE700\platform\YOUR_BSP\Src\COMMON\USBFN\rndis\rndisfn\sources:
    DOSYSGEN=1
    TARGETDEFNAME=RNDISFN
    TARGETNAME=RNDISFN
    TARGETTYPE=DYNLINK
    DLLENTRY=_DllEntryCRTStartup
    SOURCES= \
    rndisfn.cpp \
    TARGETLIBS= \
    $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\ndis.lib \
    $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
    $(_SYSGENSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib
    SOURCELIBS=\
    $(SG_OUTPUT_ROOT)\platform\$(_TGTPLAT)\lib\$(_CPUINDPATH)\rndismini2.lib \
    $(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\ufnclientlib.lib
    Finally, edit C:\WINCE700\platform\YOUR_BSP\Src\COMMON\USBFN\dirs to include your new component (folder) in the build process:
    DIRS=\
    RNDISKITL \
    RNDIS \
    System will build now new rndisfn.dll, which will replace the original one in the public directory. I hope I didn't forget anything...

  • How to make non-visibl​e Control on Front Panel Appear at Design Time?

    I have some Controls on the Front Panel whose visibility is changed (turned on or off) at Run Time. The problem is that if I stop the Run time, the Visibility of the Control remains in the runtime state in Design mode. So I may not be able to see or find the Control to make changes in Deisgn mode.
    How can I make all Controls on the Front Panel visible, or find and make visible a Control on the Front Panel whose Visibility has been made False?
    THANKS.
    Solved!
    Go to Solution.

    This is documented in the LabVIEW Help.
    Displaying Hidden Front Panel Objects
    Complete the following steps to display a hidden front panel control or indicator. You also can hide front panel controls and indicators.
    Find the block diagram terminal for the object. If you have several terminals with the same data type, right-click the terminals and select Visible Items»Label from the shortcut menu. Find the object with the label that matches the hidden front panel object.
    Right-click the terminal and select Show Control from the shortcut menu if the object is a control or Show Indicator if the object is an indicator.
    You also can use the Visible property to display controls and indicators programmatically.
    You also can display all hidden front panel controls and indicators.
    Path: Fundamentals -> Building the Front Panel -> How-To -> Configuring Front Panel Objects -> Displaying Hidden Front Panel Objects.

  • How to make my waveform in control and design simulation run continuously?

    Hi all, i m a begineer of Labview and have some question to ask.
    I am using the Labview to design and implement a controller for FOPTD system, but i found that the waveform in the "control and simulation loop" is not running continuously. I mean it keep repeat in the same graph from 0 to 10second. Is there any approach to make it run continuously? 
    Thankyou very much.
    Solved!
    Go to Solution.
    Attachments:
    Project 1.png ‏12 KB
    Project 2.png ‏18 KB

    Well, my suggestion then is to do the following: change final time from Inf back to 10 s (or whatever number that capture the whole simulation) and do a while loop around the Control and Simulation Loop with a "wait until next ms" function to give you time to react and change parameters, like this below. This would make LabVIEW to do the whole simulation, wait for 1000 ms and then, run the simulation again with new parameters. If you need more time, just need to change the constant wired to the "wait until next milisecond".
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • How to make default value for controlling area for MDG-F 7.0

    how do we default certain pre-defined values for few fields? e.g. controlling area or company code for MDG finance?
    Thank you in advance.
    SP

    Hello Sahil
    Account and CC/PC are 2 different entity types. For PC and CC there is dependency. First you have to load Cost centers and then load PC.
    For CC - load CC master data first. Then load hierarchy file then group file and finally assignment file.
    Follow same process for PC.
    GL you can load independently but you have first load group GL then operational GL and then GL at company code level,
    Kiran

  • [E3000] How to make ethernet devices available on wireless?

    Hello all,
    I have been using the E3000 for quite a while. A problem that I could not find a solution to is that the devices connected through Ethernet can't be viewed on Wireless, and vice versa. This is especially annoying because I want to get access to my media servers over wireless, for obvious reasons, but even those are not viewable (and using IP addresses on portables is a pain in the back)
    Live chat recommended I go to this paid support service, but I'd rather look at the forums.
    Will be waiting for advice.
    Best.
    Solved!
    Go to Solution.

    Well, that did the trick.
    I did not try this right away because I had my firmware upgraded once (I think it was 1.003 or something) and everything worked OK for a while, too.
    Also, this will get me to put Cisco's tech support in the "hmmmm" category seeing how they directed me to "paid professional support" instead of recommending a simple firmware upgrade.
    Well, things work fine now. Thanks a lot.
    EDIT: This might not have anything to do with this, but before upgrading the firmware by a few minutes I sat the router on some spare metal tubes I found laying around to dissapate the heat pproduced by this oven of a router. Not sure if thermal managment could have been a factor, but who cares. I think I'm going to give up on commercial routers at some point and set up a PFSense router.

  • How to make GPIB devices to go to zero upon stop?

    I need to have my GPIB devices simultaneously (and preferably gradually) be set to zero when the program is stopped. How can I accomplish this? Also, what does clearing the devices do?

    You need to programmatically capture and discard all events that try to close the VI and initiate your shutdown code instead. (you can also simply disable these mechansims) Of course the regular ways on the front panel (e.g. a stop button) should also do the same thing.
    Look for the filtering events "Application close?" and "panel close?".
    (For the (hopefully rare) cases where the application crashes or is killed by the task manager, you might still have a problem. What is your OS).
    LabVIEW Champion . Do more with less code and in less time .

  • How I make the Web Browser Control to display a PDF in Windows 8

    I have an application that run ok in previous version of windows,  Where I can load a PDF file and the web browser control automatically use the Reader OCX of Adobe,, After Install windows 8 and download the reader for windows 8 still get and (X) where the document should be displayed.  I use the following command in my program to force the windows 8 to use the same web browser (10) in my web browser control.
    WebBrowser1.Navigate(DocumentName,"",Nothing,"User-Agent:Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)")
    But still get an  (X). IF I use the URL that is in the property of the (X) and paste in my regular IE10, it open the PDF file.

    Adobe Reader Touch is a Windows Store app and does not install a browser add-on/plug-in for "in-browser" PDF viewing.
    You can either
    Install Adobe Reader XI (desktop app) which installs browser plug-ins for Microsoft IE and Mozilla Firefox
    Use Google Chrome, which has a built-in PDF viewer (enabled by default)

  • How to make a double trackbar control in VB 2010

    I'm suing VB 2010 Express and I need to create a trackbar control with double trackbars.
    I can't find "Doubletrackbar" control from Toolbox. I searched online and found one post toking about it (http://www.vbforums.com/showthread.php?620394-WIP-Double-TrackBar). Unfortunately, I can't use the code in the post.   Anyone can
    help?
    Thank you very much.

    Hi,
     Whoever made it did not have Option Strict turned on and there was also a namespace that was not imported. I just went through the code and fixed all the errors and added the namespace. It seems to be working after that.
     Open your  project or even a new form project just to test it on. When the project is opened go to the VB Menu and click (Project) and then select (Add Class). You can leave it named as the default name "Class1.vb" if you want. When
    the empty class code opens, copy and paste the fixed code below in replacing the 2 lines of code that are generated automatically. Save the project.
     Then go to the VB Menu and click (Build) and select (Build YourProjectsName). After it is finished building you can go to the Forms [Design] tab and you will find the DoubleTrackBar control in the top of your toolbox.   8)
    Imports System.ComponentModel
    Public Class DoubleTrackBar
    Inherits Control
    Public Sub New()
    Me.DoubleBuffered = True
    Me.SetDefaults()
    End Sub
    Private Sub SetDefaults()
    'Added these to set to a decent size when a new one is added to the form
    Me.Width = 200
    Me.Height = 50
    Me.Orientation = Orientation.Horizontal
    Me.SmallChange = 1
    Me.Maximum = 400
    Me.Minimum = 0
    Me.ValueLeft = 0
    Me.ValueRight = 300
    End Sub
    #Region " Private Fields "
    Private leftThumbState As VisualStyles.TrackBarThumbState
    Private rightThumbState As VisualStyles.TrackBarThumbState
    Private draggingLeft, draggingRight As Boolean
    #End Region
    #Region " Enums "
    Public Enum Thumbs
    None = 0
    Left = 1
    Right = 2
    End Enum
    #End Region
    #Region " Properties "
    Private _SelectedThumb As Thumbs
    ''' <summary>
    ''' Gets the thumb that had focus last.
    ''' </summary>
    ''' <returns>The thumb that had focus last.</returns>
    <Description("The thumb that had focus last.")> _
    Public Property SelectedThumb() As Thumbs
    Get
    Return _SelectedThumb
    End Get
    Private Set(ByVal value As Thumbs)
    _SelectedThumb = value
    End Set
    End Property
    Private _ValueLeft As Integer
    ''' <summary>
    ''' Gets or sets the position of the left slider.
    ''' </summary>
    ''' <returns>The position of the left slider.</returns>
    <Description("The position of the left slider.")> _
    Public Property ValueLeft() As Integer
    Get
    Return _ValueLeft
    End Get
    Set(ByVal value As Integer)
    If value < Me.Minimum OrElse value > Me.Maximum Then
    Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueLeft'. 'ValueLeft' should be between 'Minimum' and 'Maximum'.", value.ToString()), "ValueLeft")
    End If
    If value > Me.ValueRight Then
    Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueLeft'. 'ValueLeft' should be less than or equal to 'ValueRight'.", value.ToString()), "ValueLeft")
    End If
    _ValueLeft = value
    Me.OnValueChanged(EventArgs.Empty)
    Me.OnLeftValueChanged(EventArgs.Empty)
    Me.Invalidate()
    End Set
    End Property
    Private _ValueRight As Integer
    ''' <summary>
    ''' Gets or sets the position of the right slider.
    ''' </summary>
    ''' <returns>The position of the right slider.</returns>
    <Description("The position of the right slider.")> _
    Public Property ValueRight() As Integer
    Get
    Return _ValueRight
    End Get
    Set(ByVal value As Integer)
    If value < Me.Minimum OrElse value > Me.Maximum Then
    Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueRight'. 'ValueRight' should be between 'Minimum' and 'Maximum'.", value.ToString()), "ValueRight")
    End If
    If value < Me.ValueLeft Then
    Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueRight'. 'ValueRight' should be greater than or equal to 'ValueLeft'.", value.ToString()), "ValueLeft")
    End If
    _ValueRight = value
    Me.OnValueChanged(EventArgs.Empty)
    Me.OnRightValueChanged(EventArgs.Empty)
    Me.Invalidate()
    End Set
    End Property
    Private _Minimum As Integer
    ''' <summary>
    ''' Gets or sets the minimum value.
    ''' </summary>
    ''' <returns>The minimum value.</returns>
    <Description("The minimum value.")> _
    Public Property Minimum() As Integer
    Get
    Return _Minimum
    End Get
    Set(ByVal value As Integer)
    If value >= Me.Maximum Then
    Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'Minimum'. 'Minimum' should be less than 'Maximum'.", value.ToString()), "Minimum")
    End If
    _Minimum = value
    Me.Invalidate()
    End Set
    End Property
    Private _Maximum As Integer
    ''' <summary>
    ''' Gets or sets the maximum value.
    ''' </summary>
    ''' <returns>The maximum value.</returns>
    <Description("The maximum value.")> _
    Public Property Maximum() As Integer
    Get
    Return _Maximum
    End Get
    Set(ByVal value As Integer)
    If value <= Me.Minimum Then
    Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'Maximum'. 'Maximum' should be greater than 'Minimum'.", value.ToString()), "Maximum")
    End If
    _Maximum = value
    Me.Invalidate()
    End Set
    End Property
    Private _Orientation As Orientation
    ''' <summary>
    ''' Gets or sets the orientation of the control.
    ''' </summary>
    ''' <returns>The orientation of the control.</returns>
    <Description("The orientation of the control.")> _
    Public Property Orientation() As Orientation
    Get
    Return _Orientation
    End Get
    Set(ByVal value As Orientation)
    _Orientation = value
    End Set
    End Property
    Private _SmallChange As Integer
    ''' <summary>
    ''' Gets or sets the amount of positions the closest slider moves when the control is clicked.
    ''' </summary>
    ''' <returns>The amount of positions the closest slider moves when the control is clicked.</returns>
    <Description("The amount of positions the closest slider moves when the control is clicked.")> _
    Public Property SmallChange() As Integer
    Get
    Return _SmallChange
    End Get
    Set(ByVal value As Integer)
    _SmallChange = value
    End Set
    End Property
    Private ReadOnly Property RelativeValueLeft() As Double
    Get
    Dim diff As Double = Me.Maximum - Me.Minimum
    Return If(diff = 0, Me.ValueLeft, Me.ValueLeft / diff)
    End Get
    End Property
    Private ReadOnly Property RelativeValueRight() As Double
    Get
    Dim diff As Double = Me.Maximum - Me.Minimum
    Return If(diff = 0, Me.ValueLeft, Me.ValueRight / diff)
    End Get
    End Property
    #End Region
    #Region " Methods "
    Public Sub IncrementLeft()
    Dim newValue As Integer = Math.Min(Me.ValueLeft + 1, Me.Maximum)
    If Me.IsValidValueLeft(newValue) Then
    Me.ValueLeft = newValue
    End If
    Me.Invalidate()
    End Sub
    Public Sub IncrementRight()
    Dim newValue As Integer = Math.Min(Me.ValueRight + 1, Me.Maximum)
    If Me.IsValidValueRight(newValue) Then
    Me.ValueRight = newValue
    End If
    Me.Invalidate()
    End Sub
    Public Sub DecrementLeft()
    Dim newValue As Integer = Math.Max(Me.ValueLeft - 1, Me.Minimum)
    If Me.IsValidValueLeft(newValue) Then
    Me.ValueLeft = newValue
    End If
    Me.Invalidate()
    End Sub
    Public Sub DecrementRight()
    Dim newValue As Integer = Math.Max(Me.ValueRight - 1, Me.Minimum)
    If Me.IsValidValueRight(newValue) Then
    Me.ValueRight = newValue
    End If
    Me.Invalidate()
    End Sub
    Private Function IsValidValueLeft(ByVal value As Integer) As Boolean
    Return (value >= Me.Minimum AndAlso value <= Me.Maximum AndAlso value < Me.ValueRight)
    End Function
    Private Function IsValidValueRight(ByVal value As Integer) As Boolean
    Return (value >= Me.Minimum AndAlso value <= Me.Maximum AndAlso value > Me.ValueLeft)
    End Function
    Private Function GetLeftThumbRectangle(Optional ByVal g As Graphics = Nothing) As Rectangle
    Dim shouldDispose As Boolean = (g Is Nothing)
    If shouldDispose Then g = Me.CreateGraphics()
    Dim rect As Rectangle = Me.GetThumbRectangle(Me.RelativeValueLeft, g)
    If shouldDispose Then g.Dispose()
    Return rect
    End Function
    Private Function GetRightThumbRectangle(Optional ByVal g As Graphics = Nothing) As Rectangle
    Dim shouldDispose As Boolean = (g Is Nothing)
    If shouldDispose Then g = Me.CreateGraphics()
    Dim rect As Rectangle = Me.GetThumbRectangle(Me.RelativeValueRight, g)
    If shouldDispose Then g.Dispose()
    Return rect
    End Function
    Private Function GetThumbRectangle(ByVal relativeValue As Double, ByVal g As Graphics) As Rectangle
    Dim size As Size = TrackBarRenderer.GetBottomPointingThumbSize(g, VisualStyles.TrackBarThumbState.Normal)
    Dim border As Integer = CInt(size.Width / 2)
    Dim w As Integer = Me.GetTrackRectangle(border).Width
    Dim x As Integer = CInt(Math.Abs(Me.Minimum) / (Me.Maximum - Me.Minimum) * w + relativeValue * w)
    Dim y As Integer = CInt((Me.Height - size.Height) / 2)
    Return New Rectangle(New Point(x, y), size)
    End Function
    Private Function GetTrackRectangle(ByVal border As Integer) As Rectangle
    'TODO: Select Case for hor/ver
    Return New Rectangle(border, CInt(Me.Height / 2) - 3, Me.Width - 2 * border - 1, 4)
    End Function
    Private Function GetClosestSlider(ByVal point As Point) As Thumbs
    Dim leftThumbRect As Rectangle = Me.GetLeftThumbRectangle()
    Dim rightThumbRect As Rectangle = Me.GetRightThumbRectangle()
    If Me.Orientation = Windows.Forms.Orientation.Horizontal Then
    If Math.Abs(leftThumbRect.X - point.X) > Math.Abs(rightThumbRect.X - point.X) _
    AndAlso Math.Abs(leftThumbRect.Right - point.X) > Math.Abs(rightThumbRect.Right - point.X) Then
    Return Thumbs.Right
    Else
    Return Thumbs.Left
    End If
    Else
    If Math.Abs(leftThumbRect.Y - point.Y) > Math.Abs(rightThumbRect.Y - point.Y) _
    AndAlso Math.Abs(leftThumbRect.Bottom - point.Y) > Math.Abs(rightThumbRect.Bottom - point.Y) Then
    Return Thumbs.Right
    Else
    Return Thumbs.Left
    End If
    End If
    End Function
    Private Sub SetThumbState(ByVal location As Point, ByVal newState As VisualStyles.TrackBarThumbState)
    Dim leftThumbRect As Rectangle = Me.GetLeftThumbRectangle()
    Dim rightThumbRect As Rectangle = Me.GetRightThumbRectangle()
    If leftThumbRect.Contains(location) Then
    leftThumbState = newState
    Else
    If Me.SelectedThumb = Thumbs.Left Then
    leftThumbState = VisualStyles.TrackBarThumbState.Hot
    Else
    leftThumbState = VisualStyles.TrackBarThumbState.Normal
    End If
    End If
    If rightThumbRect.Contains(location) Then
    rightThumbState = newState
    Else
    If Me.SelectedThumb = Thumbs.Right Then
    rightThumbState = VisualStyles.TrackBarThumbState.Hot
    Else
    rightThumbState = VisualStyles.TrackBarThumbState.Normal
    End If
    End If
    End Sub
    Protected Overrides Sub OnMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs)
    MyBase.OnMouseMove(e)
    Me.SetThumbState(e.Location, VisualStyles.TrackBarThumbState.Hot)
    Dim offset As Integer = CInt(e.Location.X / (Me.Width) * (Me.Maximum - Me.Minimum))
    Dim newValue As Integer = Me.Minimum + offset
    If draggingLeft Then
    If Me.IsValidValueLeft(newValue) Then Me.ValueLeft = newValue
    ElseIf draggingRight Then
    If Me.IsValidValueRight(newValue) Then Me.ValueRight = newValue
    End If
    Me.Invalidate()
    End Sub
    Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
    MyBase.OnMouseDown(e)
    Me.Focus()
    Me.SetThumbState(e.Location, VisualStyles.TrackBarThumbState.Pressed)
    draggingLeft = (leftThumbState = VisualStyles.TrackBarThumbState.Pressed)
    If Not draggingLeft Then draggingRight = (rightThumbState = VisualStyles.TrackBarThumbState.Pressed)
    If draggingLeft Then
    Me.SelectedThumb = Thumbs.Left
    ElseIf draggingRight Then
    Me.SelectedThumb = Thumbs.Right
    End If
    If Not draggingLeft AndAlso Not draggingRight Then
    If Me.GetClosestSlider(e.Location) = 1 Then
    If e.X < Me.GetLeftThumbRectangle().X Then
    Me.DecrementLeft()
    Else
    Me.IncrementLeft()
    End If
    Me.SelectedThumb = Thumbs.Left
    Else
    If e.X < Me.GetRightThumbRectangle().X Then
    Me.DecrementRight()
    Else
    Me.IncrementRight()
    End If
    Me.SelectedThumb = Thumbs.Right
    End If
    End If
    Me.Invalidate()
    End Sub
    Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
    MyBase.OnMouseUp(e)
    draggingLeft = False
    draggingRight = False
    Me.Invalidate()
    End Sub
    Protected Overrides Sub OnMouseWheel(ByVal e As System.Windows.Forms.MouseEventArgs)
    MyBase.OnMouseWheel(e)
    If e.Delta = 0 Then Return
    If Me.SelectedThumb = 1 Then
    If e.Delta > 0 Then
    Me.IncrementLeft()
    Else
    Me.DecrementLeft()
    End If
    ElseIf Me.SelectedThumb = 2 Then
    If e.Delta > 0 Then
    Me.IncrementRight()
    Else
    Me.DecrementRight()
    End If
    End If
    End Sub
    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
    MyBase.OnPaint(e)
    Dim thumbSize As Size = Me.GetThumbRectangle(0, e.Graphics).Size
    Dim trackRect As Rectangle = Me.GetTrackRectangle(CInt(thumbSize.Width / 2))
    Dim ticksRect As Rectangle = trackRect
    ticksRect.Offset(0, -15) 'changed to -15 to place ticks at the top
    'added this to keep ticks at a decent spacing
    Dim tickspacing As Integer = CInt((Me.Maximum - Me.Minimum) / 10) + 1
    TrackBarRenderer.DrawHorizontalTrack(e.Graphics, trackRect)
    TrackBarRenderer.DrawHorizontalTicks(e.Graphics, ticksRect, tickspacing, VisualStyles.EdgeStyle.Etched)
    'Changed these to draw the top pointing thumb button
    TrackBarRenderer.DrawTopPointingThumb(e.Graphics, Me.GetLeftThumbRectangle(e.Graphics), leftThumbState)
    TrackBarRenderer.DrawTopPointingThumb(e.Graphics, Me.GetRightThumbRectangle(e.Graphics), rightThumbState)
    End Sub
    #End Region
    #Region " Events "
    Public Event ValueChanged As EventHandler
    Public Event LeftValueChanged As EventHandler
    Public Event RightValueChanged As EventHandler
    Protected Overridable Sub OnValueChanged(ByVal e As EventArgs)
    RaiseEvent ValueChanged(Me, e)
    End Sub
    Protected Overridable Sub OnLeftValueChanged(ByVal e As EventArgs)
    RaiseEvent LeftValueChanged(Me, e)
    End Sub
    Protected Overridable Sub OnRightValueChanged(ByVal e As EventArgs)
    RaiseEvent RightValueChanged(Me, e)
    End Sub
    #End Region
    End Class
    If you say it can`t be done then i`ll try it

  • How to make a ring-type colorbox selector

    Hi,
        How to make a color selector as shown in the attached pic and vi? I have thought about using ring control, but I couldn't put a colorbox as the item inside the ring. Someone familar with this?
    Thanks.
    PS: attached vi is for Labview 5.1.1, I want to rewrite in labview 2010.
    Solved!
    Go to Solution.
    Attachments:
    resistor decoder.vi ‏108 KB
    Resistor Decoder.JPG ‏32 KB

    If you need future upconversion there is an Upconvert Requests Thread that you can use. There is also a corresponding Downconvert Requests Thread.
    As far as the code is concerned:
    Iit's not clear whether this VI was meant to run continuously or not. There is no outer loop for the VI, so the original programmer might have used the Run Continuously button. This is a bad idea, since that button is intended to be used for debugging purposes, not for normal operation.
    The VI has a minor bug. The numeric indicator for the result value has only 1 significant digit. Thus, for the colors black, green, silver it shows an answer of 0.1 but the actual value of the indicator is 0.05. 
    The original programmer used decorations to hide the numeric increment/decrement controls on the picture ring. This is not necessary. Simply right-click on the control select Visible Items -> Increment/Decrement to hide them.
    The colors shown aren't exactly correct. Some are missing. See here: http://samengstrom.com/24614782/en/read/4_Band_Resistor_Color_Codes  and here: http://en.wikipedia.org/wiki/Electronic_color_code

  • How to make "visa find resource" working with Agilent device

    I am trying to use Agilent 82357B GPIB device with LabVIEW for instrument control.
    I have checked:
    1.       NI-VISA (ver 5.1.1) is the primary visa by checking visa.dll properties under windows\system32 folder
    2.       Enable NIVISATulip.dll in NI Max Explorer
    3.       Enable the Agilent libraries to work with NI 488.2 in Agilent IO library (ver 16).
    I am able to communicate with the instrument in Max Explorer and talk to the instrument in LabVIEW with VISA write for almost all commands.
    But I can NOT make one particular visa function (Visa find resource) working with Agilent 82357B GPIB.
    With NI USB GPIB device, the same code above can find attached instruments as below, where GPIB1 is the Agilent device and GPIB0 is the NI device.
    I have no clue on how to make “visa find resource” working with Agilent device.
    Please help.
    Solved!
    Go to Solution.

    Quick question.  Did you also enable 488 support in Agilent? 
    If that does'not work try this.  and well see if you found a bug
    Jeff

  • Time Capsule only works for one device at a time, how to make it capable to be used for multiple devices at times

    Time Capsule only works for one device at a time, how to make it capable to be used for multiple devices at times.
    Please help to set it up, thanks in advance

    You need to give more info..
    Firstly only works for what.. networking.. backup.. wireless. You need more nouns.. more adjectives... describe what you want and what fails.. then we can figure out why.
    Most likely you have bridged it when it should be in router mode..
    Most likely you are using Lion or ML which has the airport utility bridge the TC by default.
    Change it to working as a router. That might help.
    If you press reset button it will default back to router btw.
    If you are on Lion.. use a real utility. http://support.apple.com/kb/DL1547

  • How to make screen field enable when table control gives an error

    Hi,
        I had a scneario like when table control data wrong then one parameter of the screen should be enabled for the input, i knew that screen-name will not work since it will have always table control fields only when table control gives an error.
    How to make the other parameter enable when table control throws an error.
    Regards,
    Jaya

    Hi Gobi,
         Thanks for your response, but issue is - how to make other screen fields enable when there was an error in the table control data.
    For table control - lets say we will use the code as i mentioned above.i am sure that we cant write the code for field enable in between loop & endloop.
    as you said if we right outside the loop-endloop, the module wont be triggered when table control throws an error, because that statement was not there in the loop-endloop.
    please let me know if you need any more information on the issue. I hope there is alternative for this in SAP.
    Thanks
    Jaya

Maybe you are looking for

  • Spreadsheet will no longer open in iCloud

    Just yesterday a file I've been working on for months will no longer open in Numbers.  The file is in iCloud and the first error I received was a warning on my Mac that the file could not be Autosaved.  I tried to save it manually (to the cloud) but

  • Regular Expressions and java

    hi everybody i have a little question: Does anybody have an idea how i can accomplish the following task: I want to have a regex that excludes words that contain a ++, --, __ but any word contains single occurence of these characters (+,-,_) should b

  • Practicount Software...for mac

    I want to use the program, or any similar Transcriptionist Line/word count program...anyone know if Mac has such a software program...I can exchange Word related material no problem, but need a native professional line count software program... thank

  • Acrobat 9 HTML to PDF conversion sets all checkboxes to checked - Duplicate question

    I am converting html files to pdf using Acrobat 9 pro. All of the check boxes and radio buttons come out checked. This is exactly the same as the following thread: Acrobat 9 HTML to PDF conversion sets all checkboxes to checked? That thread is old, b

  • VO not returning any data

    Hi, I am not getting rows from vo execution query. However I am getting rowcount through VO.getRowCount() . I want to fetch rows through VO. Thanks and Regards, Sandip