Control Array with 22 image controls
Hello, I want to make an control array out of 22 image controls in Visual Basic language. I was struggling with different methods and am not sure how to proceed. The image controls are already on the form, just need the array to easily manipulate the properties of
the controls in a control loop.
Would any of this work? If not how would I make the statement?
file: App.xaml.vb (phone app)
NonInheritable Class App
myimageArray()
As Image Public Sub
New()
InitializeComponent()
myimageArray =
New Image() {Image1, Image2,}'And so on up to 22
End Sub
End Class
Or simply This:
InitializeComponent()
Image [] myimageArray = new Image[22](); But in VB equivalent
Thanks for the consideration. Anyway I wrote a statement that worked:
Dim myImageArray() As Image = {clipView(), clipView1, clipView2, clipView3} 'on up to 22
Probably other ways to do this but it works as intended for my phone app.
If I am in the wrong place, then
1000 apologies.
end if
Similar Messages
-
Control Array or Dynamic Controls in adf
Hi All,
Is that possible to create control arrays or we can create dynamic controls in adf like .net. Please advice or share some sample code.
Thanks,Thanks for your reply. Actually i want to create some buttons in runtime. means if i have 10 records in table i need 10 buttons on my page but they should share the same code by passing the index of control.
Thanks -
Problem with image control using more than 1 web cam
Hi,
I am using logitech quickcam pro 4000.Actually I want to get image from
3 web cam at a time wich will act as a CCTV.I want to get picture from
more than 1 web cam at a time.But,When I start the .vi,than I get image
from 1 web cam.I have attached the vi and the demonstration file.
If anyone has any idea please send me a reply.
(The code was constructed using information
from the Logitech Software Development Kit, downloaded from the Logitech web
site January 4th 2004. This
package includes the royalty free distribution with the camera driver.
To install the package, download and unzip
LabVIEW Logitech UWA.zip and run Setup.exe in the 'redist' folder. This installs drivers (if not already
installed). Then run LabVIEW and open
Logitech Image Acquisition Master.vi.
Click the LabVIEW run button.
Notes for Understanding the Code
[1] The camera is controlled by an Active-X
reference from a front panel Acitve-X container that displays the pre-view
image. To create this, create a blank
Active-X container on the front panel and select the Active-X Hydra Video
Portal class.
[2] Three methods are called, following the
Visual Basic guide from Logitech. The
first establishes a connection to the Active-X server. The status bar is activated in the preview
window (EnableUIElements), and we connect a camera (ConnectCamera2).
[3] Here we set the value of property
'EnablePreview' to turn on the preview panel.
[4] We can get the camera description for
camera zero here (the first camera connected).
[5] Here we select the video format (64x480
– can change it later). The next call
establishes the preview size by setting property values. The preview size should be the same as the
video format for fastest image acquisition.
[6] We are restricted to saving the picture
to a BMP file and then reading it in again.
This is a limitation of the SDK.
After reading the image file we can change it to a JPG if we wish to.
[7] Here we re-read the image file and
provide it to ImageDisplay.vi.
Other methods and property values are
reasonably self evident. In LabVIEW, if
you right click the Active-X reference terminal on any method, you can create a
new method by simply selecting the appropriate one from a list. The parameters for the method appear
automatically and should be reasonably self-evident from the names. If you want more details, download the SDK
from Logitech.
Other methods allow you to make movies in
real-time or time-lapse sequences.
Note that you can also monitor Active-X
events to detect inputs or parameter changes made elsewhere. For example it is possible to detect when
the button on the camera is pressed.)
Thanks
Kabir
Kabir mamun
PhD Student,DCU
[email protected]
www.iward2010.blogspot.com
Attachments:
Logitech Image Acquisition Master.vi 98 KBHi Peter,
Thanks for your e-mail.And sorry for late.
I have changed my activex server in my labview programme.Current
server name is XVideoOCX.I have attached 1 example.Still I am facing
the same problem that I am not getting disply from more than 1 web
cam.So would you be able to advice me,what should I do regarding this
matter.
Actually,This is a part of my M.Sc project.I am under pressure.Peter,Please do me this fevour.
Thanks
Kabir
1 eample from help file:
Video Disply
1. Choose the input mode (Video, Single Image Files, Screen, etc.)
XSetInputMode(0) // This
chooses video as input
2. Choose the video device
XSetVideoInput(0) //
Choose the first available video input device
3. Initialize XVideoOCX
XInit() // Initialize
XVideoOCX
4. Start internal video capture
XStart()
now XVideoOCX should display the live video
5. Stop internal video capture
XStop()
6. Close XVideoOCX
XClose()
Kabir mamun
PhD Student,DCU
[email protected]
www.iward2010.blogspot.com
Attachments:
ax2.vi 23 KB -
UI control bind with image is missing
a link or a button that bind with imagesource.
i can see the icon gif files shows in webpage
after few days, i check back the the icon show in webpage is gone with 'X'.
Is anyone have face this issue before.
this is really weird.
the project is in DC and i am using JDI to check-In activate and show on.Exactly,
When you paste image into mimes\Components folder, it should ask for new activity.
Before doing that, make sure that you have no open activities for that DC.
Once done, create a new activity for image and migrate it.
Ashu -
a link or a button that bind with imagesource.
i can see the icon gif files shows in webpage
after few days, i check back the the icon show in webpage is gone with 'X'.
Is anyone have face this issue before.
this is really weird.
the project is in DC and i am using JDI to check-In activate and show on.Hi,
If you are putting it in src/mimes/Components/<Component Name>
then you can directly refer it using its name eg. if your image name is image1.gif then provide only this name in image src property of your UI element.
Remember the name you give should be match its CASE too as it is case sensitive.
Regards,
Murtuza -
Can't propagate Cache-Control headers with Surrogate-Control header
My application may set the following response header to cause webcache to process the esi:include's:
Surrogate-Control: content=ORAESI/9.0.4, max-age=3600
It and also may set the following intended for the browser cache:
Cache-Control: private
or say:
Cache-Control: max-age=3600
However Webcache removes this and always adds the following whenever surrogate-control has been set:
Cache-Control: max-age=0
This means I can't have browser caching and esi page compilation, just one or the other.
This seems to be designed behaviour can someone explain why this is and if it can be worked around?
I realise that the Cache-Control header should be ignored by webcache but why cant I propagate it to higher caches?Patrik,
You'll need to convert the meta http-equiv tags into actual HTTP headers before sending for Web Cache to be able to parse it. -
Controlling event with two controls
Here's what I have.
I have two separate Time loops. Inside each timed loop I have an event structure. Each even structure is trigger by pressing a button each. This works just fine.
However, I'd like to add a third button, that executes both event structures. I want to do this without creating additional events in each structure. Is this possible to somehow wire this third button to the other two and trigger the two based off the action of the third? I'm having trouble getting that to work.
Thanks
Message Edited by crazyjay on 02-24-2010 09:15 PM
Solved!
Go to Solution.Quick example
Attachments:
Event with Value Signaling.vi 12 KB -
Image control- setting images conditionally
Hello All!
I am a Labview newbe and I need help with image control. I have a set of two images- one static png and one animated gif. I want to use these two images as an activity indicator in a picture box or other control. I can send one or the other to the picture box programmatically in the function block screen but I do not understand how to set the image control conditionally for condition "A" and condition "B". The code below is for two separate picture boxes. My goal is to select one image to show in a single box depending on conditions "A" or "B". The two conditions are "not running" and "running". Can this be accomplished with boolean logic? I also hope to use such a control in the future for multiple conditions to help illustrate to the user a specific hardware item to pay attention to. I am using LV 2014 on a Windows 7 box. The built VI will be used on Windows 7 and XP.
-cmengineerHappy Sunday Evening All!
I have included all files in the zip file. I changed the image for one state to a jpeg and changed the control to a jpeg control. This works to demonstrate the state change but my goal is to use the gif which is shown as decoration in the middle of the vi front panel as the running state indicator.
Now that I have tested it, I think I need to work on the file write operation as well. Instead of getting my four points of data in a row, I get one or another. Always fun!
-cmengineer
Attachments:
MyPTA_Monitor2.zip 1554 KB -
I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.
I've been unable to locate an app that will do this. The Photos app that comes with the phone or iPad has extremely limited duration controls. PhotoStream seems to load everything from my phone or iPad not allowing me to just load up a set group of images.
iPhoto for iPad is getting some terrible recent reviews. I tried a couple other free apps but they don't use Airplay.
I can do something like this with iPhoto and my MB Air, but it's kind of ugly to have the computer open in order to connect by Airplay to my Apple TV. I've thought the iPad or iPhone would be a lower profile controller.
Am I out of luck?Thanks for your help. Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV. I guess I'm just stuck with using iPhoto on my MB Air. Thanks again.
paul -
When using IMAQ fxs (such as 'Write File') in subVIs, if one wanted to use references to an image control, what property or method would be used to feed into the image terminal in the imaq fx on the subVI? Is this possible?
What did work: I was able to directly use the image control on the main feeding an image control on the subvi panel (which is then fed directly to imaq fx)
What did not work: From a refnum control for the image on the main, I used (within the subVI) the value property fed to a 'Variant to Data' with type as image control, then feeding the output of this into imaq fx.Typically you would update an Image Display control from a subVI using the Value property nodes. However, this method does not currently work with LabVIEW 7 and Vision 7, but the issue will be resolved in the next release of LabVIEW and Vision.
In the meantime, in addition to the solution you found you could also use a global variable to pass images from one VI to another. Using a global variable works, but not in the same way as a reference or property node would. With a reference or property node, you can pass a reference of the control to a subVI and have the subVI update the control's image. Using global variables, the subVI will update the global variable with the new images, but you need a loop monitoring the global variable in your top level VI.
I hope this
helps! Best wishes.
Regards,
Dawna P.
Applications Engineer
National Instruments -
Problem with database control returning multiple rows as Array using Oracle
Has anybody using Oracle gotten a Database control that
returns multiple rows to work returning an array?
The only way I can seem to return multiple rows is by returning
a RowSet. Returning an array gives me a NullPointerException
(when called within a pageFlow). When calling a database control
that returns an array from a web service I get a
"java.sql.SQLException: ResultSet has no more data." error.
The samples using the pointbase database seem to work, but when I
converted the CustomerDBClient web service to use Oracle, it starts
failing on calling the database control that returns an array
with: "java.sql.SQLException: ResultSet has no more data."
Has anybody gotten this to work using Oracle?
I'm also having some problem returning an Iterator. It seems
to work when called from a web service, but returns nothing
if called from a page flow.
I'm using Oracle 8.1.7 and WebLogic 8.1.
EricDo you need a particular service pack installed to return an array of custom object?
I am getting a ResultSet contained no data error when trying.
Thanks,
-Thomas
"Robin Karlin" <[email protected]> wrote:
>
Eddie O'Neil <[email protected]> wrote:
All--
Unfortunately, returning an Iterator to a JPF (or JSP) from a
database control is broken in WLW 8.1, though it will work inside of
a
JWS or JCS.
There shouldn't be a problem with returning an array of objects out
of Oracle to the JPF, and if you need an Iterator specifically, youcan
wrap the array in an Iterator implementation.
Sorry for the inconvenience.
Eddie
Lenny wrote:
I have gotten it to work on Oracle using Array:)
However, I haven't gotten it to work on Oracle using Iterator:( Itis so
simple, but doesn't work:(
"Eric Dokken" <[email protected]> wrote in message
news:[email protected]...
Has anybody using Oracle gotten a Database control that
returns multiple rows to work returning an array?
The only way I can seem to return multiple rows is by returning
a RowSet. Returning an array gives me a NullPointerException
(when called within a pageFlow). When calling a database control
that returns an array from a web service I get a
"java.sql.SQLException: ResultSet has no more data." error.
The samples using the pointbase database seem to work, but when I
converted the CustomerDBClient web service to use Oracle, it starts
failing on calling the database control that returns an array
with: "java.sql.SQLException: ResultSet has no more data."
Has anybody gotten this to work using Oracle?
I'm also having some problem returning an Iterator. It seems
to work when called from a web service, but returns nothing
if called from a page flow.
I'm using Oracle 8.1.7 and WebLogic 8.1.
Eric
I get the same error that Eric reported when trying to return an Array
of objects.
It is really frustrating because I can't use much of the built-in control
logic
that WLW provides. All I did was create a data pool for Oracle and a
datasource.
I modified the sample app in C:\bea81\weblogic81\samples\workshop\SamplesApp\WebApp\callJavaControl
to point to that datasource and I get the error that Eric reports above.
Can
anyone help me out????
Thanks,
Robin -
Aperture image-control compared with Photoshop?
I'm looking to get Aperture 2. I've been using iPhoto as a library, and Photoshop to control\doctor images. How does the Aperture image-control compare with Photoshop's? I'm not thinking so much here about fancy plug-ins, just basic, but subtle, color, contrast, cropping controls ... especially dealing with the highlights and shadows.
Any info from a user would be most appreciated,
Thanks,
BenSame problem here...
It started recently so I think some update create the problem. -
Array of cluster with string controll??
Hello again!
Now we have another type of problem. We have an array of clusters. The cluster is built by two controlers. One is a string and the other is a menu ring. How can we get a text in the strings that stays there even if one close the program. The text is supposed to be different. Example: B1, B2 and so on. then we want to be able to choos from a menu ring different options that are coupled with B1, B2 and so on. Best regards.Using "make current values default" will save a set of default values into all controls on the front panel. If you want the values to not just be default but be saved from run-to-run you need serialization of controls. When initializing controls (usually before the main user loop) you feed your controls data from a stored file and at the end of the program the settings are stored back (overwritten) to the same "preference" file. Reading and writing complex data forms might seem like it would be a pain to implement but Labview has a nice method for such data persistence. Use the Advanced>>Data Manipulation>>XML VI's. Flatten your control to XML using, you guest it, "Flatten to XML" then use write XML to file to save settings. Do the reverse to initialize controls by reading XML file and unflattening XML data. I have had nice results with these VIs in the past and although not the most compact data form (we are in the age of 100+GB hard drives so what's a few bytes between friends?) will give you well formatted data with almost no additional work. If you just want default data settings and not data persistence then ignore this message.
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA -
I downloaded the Rotate.llb and am trying to rotate a simple 24bit .bmp I made in Windows Paint, but the rotated image comes up blank.
I edited the default image control and indicator to have my image inside it and really don't know what else to do? The example works fine with the default image, I'm wondering if it has to do with my image properties?
I tried using "Picture to Pixmap" but to no avail. Any help would be greatly appreciated. I am attaching a screen shot of my results and the modified Rotate vi I am working on, thanks.
Attachments:
Rotate Picture Control_v2.vi 16 KB
rotate_shot.jpg 383 KBHello Sametron,
Give this a try:
Regards,
Jeff L.
Applications Engineer | National Instruments
Attachments:
201606.zip 1 KB -
Image control with a movieclip source
I have an image control sitting inside a panel. The images
source is a movieclip. When I change the change the size of the
movie clip (scale X, scale Y) the movie clip exceeds the boundary
of the image and the panel, so no scroll bars are shown. Can anyone
shed some light on this? I'm stumped.Hey Guys,
A couple things:
We don't have preloader scripts, but the way I do it is to
load them from a regular data set and put them into a hidden DIV. I
use that here:
http://www.dbooth.net/photos/index.htm?location=italy2007#
The thumbnails are loaded into a DIV that is hidden. They are
then available as previews when you mouseover the numbers.There is
a lag of course, since that do have to load at some time.
As for MySQL scripts, we have a util file here:
http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
We have two versions for each language: One that will just
auto-convert a query and another that allows you to create your own
node names.
Let me know if you have questions.
Don
Maybe you are looking for
-
AIO remote cannot find my printer HP 3520
Printer is on the same network, I can access the printer's admin page via a web browser (by typing the IP), but AIO remote app or the HP Utility app on my MacBook Air cannot detect the printer at all.
-
Production order without referance to sales order in configurable material
Dear all, I am trying to create a production order for a configurable material. I dont have a sales order for that. And I can not even create a sales order for some reason. While creating a production order the system asks for a account assignment (
-
Hello.. Some months ago I bought an Airport Express (now running 7.6.4) to extend the WIFI from an Zyxel modem. It has worked without a problem for months. Now however I am having issues with just one of the Macbooks (now running OS X 10.8.5) in the
-
SocketExceptions in petStore demo
Hi, I installed WL6.0 beta yesterday and I tried to run the PetStore demo. It runs well, I am able to get to different pages, but it is very slow. Checking the server DOS window, I noticed a lot of Socket Exceptions, and I assume one reason the appli
-
I'm trying to download vm Fusion 5 so I can run Windows 7 on my new iMac. But I am very inexperienced with computers and was wondering if anyone could help walk me through the process.