Monday, June 19, 2017

Working with Hebrew


Written by Tal Alon

Using a language that is not English in our programs can get tricky, especially if we use left to right written languages such as Hebrew. However, for most simple applications it is rather easy. This post explains the proper way to show Hebrew text on a user interface, how to work with files that we create using CVI and how to work with files created by a text editor.

Sunday, May 31, 2015

How to add sound using BASS.dll


Written by Tal Alon,

CVI has no innate sound capabilities, so if you wish to add sounds to your software you need some outside help. The windows libraries can let you run WAV files and ActiveX controls can let you play anything, but they are complicated (ish) to use. In this post I will present the BASS audio library provided by Un4Seen -another option which in my opinion is the easiest to use and most powerful.

Keep reading to learn the basics of using BASS and make some sound!

Saturday, October 6, 2012

Getting Started with CVI - Part 1

    Written by Tal Alon - October 2012

In this post we show, step by step, the way to create simple CVI programs. This post will allow you to take your first steps using this wonderful programming environment.


Monday, May 14, 2012

How to Use Multiple Panels

    Written by Erez Wenger - May 2012

In this post we show, in screenshots and code-lines, how to create and handle multiple panels in CVI.

Thursday, January 5, 2012

How To Use the File Selection Popup

   
Written by Erez Wenger - January 2012

In this post we show how to make these file/directory popups appear, how to configure them and how to get the user entered information from them.

Wednesday, December 28, 2011

How to Create Icons with CVI's Icon Editor

    
Written by Erez Wenger - December 2011

In this post we show the icon creating process and explain how to link icons with your application.

Tuesday, December 27, 2011

How To Make a Distribution Kit

   
Written by Erez Wenger and Tal Alon - December 2011

Congratulation, you've finished a CVI project. Whether you want to run your project on another computer that doesn't have CVI, send it to a friends or start publishing it, the next step is to build an installer or a  distribution kit.

* If you want to run the project on another computer without making the distribution kit, it must have CVI installed, as all CVI made applications require the CVI Run-time Engine.

In this post we show how to easily create such a distribution kit.

Thursday, November 24, 2011

How to Use Callback Functions - Part 1

 
Written by Tal Alon - November 2011

In this post we explain how to create the link between UIR elements and your code and how to make stuff happen.


Thursday, June 9, 2011

How to Plot Multiple Traces on a StripChart


Written by Erez Wenger - June 2011

In this post we explain, in images and code-lines, how to easily plot multiple traces.

Saturday, May 21, 2011

Tuesday, May 17, 2011

How To Use a Stripchart

Written by Erez Wenger - May 2011

In this post we show how to easily add a stripchart to your user interface and how to write code that will present data on it.


Saturday, April 30, 2011

DLL and CVI

   
Written by Tal Alon - April 2011

Knowing how to create DLL files and how to use them is a must for many programmers.

In this post we present the simple CVI procedure of .DLL creation and several simple ways of using DLLs (with examples of course).

Tuesday, April 12, 2011

C Language Tutorials

Even though you can find many library books teaching the C language, here are some links to on-line tutorial websites:

C Tutorials - look at the links bellow to find your topic.


Programming in C - Some of the first topics are nice but not a must.


C Tutorial - simple and concise

There are many more, and if you find a good one that is not on this list let me know.

Have fun.


Sunday, April 10, 2011

Practice your C Programming Skills



A programming language, like any language, needs a lot of practice to master.

Playing around with the language and with basic algorithms can really help. If you are a beginner I recommend you try and test various features of the C language for yourself, even the behavior of basic statements like the 'if', 'for', 'while' or 'switch' can be explored and give rise to important insights.

Try solving math and logic problems - I recommend you play around with the simple problems in Project Euler and work your way to the more sophisticated ones.

And of course, if you are a student, do your homework and do it by yourself.


Friday, March 18, 2011

Monday, March 7, 2011

Change the Attribute of a Menu Bar Item from Within the Code

Suppose we have a simple menu bar (with a Menu Bar Constant Prefix of "MENUBAR") with one item (Constant Name of "ITEM1"), the item is initially dimmed and we want to change this somewhere within the code, to do so we need to do the following :
  • Define a new variable to represent the menu bar:
        int menuHandle.
  • Assign the new variable a value representing the panel's menu bar:
        menuHandle = GetPanelMenuBar (panelHandle);
  • Change the attribute you want, in our case it will lok like this:
        SetMenuBarAttribute (menuHandle, MENUBAR_ITEM1, ATTR_DIMMED, 0);

    Tuesday, March 1, 2011

    How to Make a Workspace Compatible with Older Versions of CVI

    If you are working with a new version of CVI, you might have problems opening your projects with older CVI versions.

    Assuming you did not use any new feature that doesn't exist in older CVI versions, the only thing you have to do in order to open and work with your project (and in order to build a distribution kit) with an older CVI is to save the UIR file (or files) in the correct format:

    1) When opening the project or workspace you might get an error window telling you that the project was written in a newer version of CVI... dismiss it (Continue) and carry on.



    2) Open the .uir file (you might get another error message, dismiss it).
    3) While in  the .uir window, click 'File' and then save the .uir file with the same name as before (shown in the image below):

    Pay attention to the lower line in the file select window, it allows you to select the .uir version:


    After saving the .uir file in the correct version you will be able to work freely within the workspace.

    How to Restrict the Values a Control can Get

    Restricting a Simple Numeric Control:
    1. Double click on the control to edit its properties.
    2. Select the best data type for the job (char, int, double and should it be unsigned). 
    3. Specify the minimum and maximum values.
    4. Change "Range Checking" to 'Coerce' so that the values are truly restricted (otherwise the user will only be  notified). In 'Coerce' mode, if the user enters a value that is larger than the maximum, the value that will be entered is the maximum value, the same goes for the minimum for values that are lower.
    Restricting a String Control:
    1. Double click on the control to edit its properties.
    2. The default value of -1 in "Max Entry Length" will allow the user to enter as many characters as he wishes (no restriction) - Change the value to the maximum number of characters you want the user to enter.