Using Wildcards Or Specifying Multiple Objects?

Nov 15, 2011

i have a bunch of radio buttons which can have different text displayed depending on whats retrieved from the database.however i want to add code that hides any radio button that would have a 'zero' retrieved from the database.so far this is the code i was coming up with, without getting into the nitty gritty of the actual database queries

If RadioButton1.Text = Me.HWExamsDataSet.DSExamTextA.Rows.Item.tostring = 0 Then
RadioButton1.Visible = False
End Ifabase entries or queries.

it looks like it may work...but is there a way to automate it so that i can put in a reference to ANY radiobutton like radiobutton(*).text? or a bunch of buttons if need be.i know theres a way to specify additional items to a given command...just can't remember if its curly brakets etc.

View 2 Replies


ADVERTISEMENT

Select Multiple Objects Like Checking Multiple Checkboxes?

Nov 24, 2010

Is there a tool in the toolbox that i can use that replaces checkboxes. i have limited amount of space and checkboxes just keep taking up room. I need the user to select multiple objects like checking multiple checkboxes.

View 5 Replies

Get Information From Multiple Objects?

Nov 3, 2009

I want to know how to get information/text form other objects to a textbox.

View 10 Replies

Multiple Objects In One Handle?

Sep 18, 2009

I have a handle event that takes care of about 50 buttons. Is there a way to determine which button is being clicked when the event is handled? I have tried using the FromHandle, but I can't seem to get it to work.

View 4 Replies

.net - Get INotifyPropertyChanged On Multiple Inherited Objects?

Sep 2, 2011

I have a class, Vehicle. I created two child classes, Car and Plane. I want to monitor the speed, which is a Vehicle Property, and bind it to a control (label, or image, for example) in WPF. When i create a static Class which only purpose is watching the Speed Property, it works, as far as the INotifyPropertyChanged is declared with the Speed Property name.

But the problem is, I have to create dynamicly multiple Cars and Planes by looking in an XML file and deserializing my objects, and creating multiple Car or Plane UserControl (Let's not discuss this way of working, please). So I have to get the Speed property inside the Vehicle Class (which is normal), and I have to get a INotifyPropertyChanged on each Speed of each Vehicle Created. So, my Cars and Planes are loaded, and I have to get all speeds, but I can't create a static Speed property by Vehicle. By the way, by creating a non-static Speed property (as int, for example) in Vehicle Class with INotifyPropertyChanged raised in the setter, it does not work. The event seems to be raised, but my converter is not fired, and my controls does not update.

In my Vehicle Class

Private SpeedValue As Integer
<XmlIgnore()>
Public Property Speed() As Short
Get

[Code]....

The PlaneView Class is almost the same for this part.

I confirm that the converter is fired just once, the first time, when the tabs are created, because I put a breakpoint on the Convert function definition. After that, the converter is never fired again. So the picture img_fonctionnement is displayed, but it is never updated. But the Speed property is updated, I swear. And the INotifyPropertyChanged (in Speed's setter) is raised, as far as i know with the help of the debugger.

And the "an item with the same key has already been added" (which appears in a messageBox, and not as an exception) seems to appear only when I am to long with the debugger. In normal execution mode, it never shows.

View 2 Replies

How To Call Multiple Objects With Same Properties

Apr 15, 2011

How can I call multiple objects? Example..
nameTextbox.Enabled
addressTextbox.Enabled
ContactTextbox.Enabled
How can I call this objects with same properties...

So rather than typing them all with =True or False...
I just have to type a variable = True or false...
And where will I type the code.

View 9 Replies

Listbox To Picturebox - Multiple Objects ?

Feb 19, 2010

So I want to click on different things in a listbox and somethings have a picture and some dont. I want the things without a picture to all show the same thing. I've tried this:

Code:

If ListBox1.SelectedItem = object1 Then
PictureBox1.ImageLocation = object1picture
Else

[CODE]...

This only works for object2 and I know why, but I dont know the correct way to make it work for multiple objects.

View 8 Replies

Loop To Close Multiple Objects?

Oct 5, 2010

I'm using VB.net from the Visual Studio 2008. I have a large number of PictureBoxs in a form. They have been created sequentially, Pic1, Pic2, Pic3, ... Depending on how I access this form, I want to turn off a number of them. I'm working with the code below.I can put the name of the object into a variable, Pic, but am still unable to hide the object names in that variable, Pic.Hide().

Dim StartNumber As UShort = 1
Dim StopNumber As UShort = 33
Dim Number As Object = 1

[code].....

View 1 Replies

Multiple Classes For Serialize Objects?

May 9, 2009

I have one class with <Serialize> attribute called Tree. And Tree class has an arraylist of TreeNode classes. Is it possible to use Soap to convert the Tree class and arraylist of TreeNode classes to one xml file or binary file? If it is possible, do i need to use <Serialize> attribute on TreeNode classes too? If not, what should i do then?

View 3 Replies

Opposite Of A With Statement (Multiple Objects)?

Aug 17, 2011

I'm wanting to to make a color scheme selection feature for my program, which involves changing the foreground and background colors of many components at once. I have the components divided into groups in which all elements should have the same background and foreground.

vb
With BtnLoad And BtnSave And TbxListname And CmbProgDifficulty And TbxRptStandard And TbxQNA And BtnAddProbQ .ForeColor = Color.White .BackColor = Color.IndianRed End With

The problem is that this get's an error message saying that you cannot use "And" (or & or +) in the statement.If I just use one object at a time,

vb
With BtnLoad .ForeColor = Color.White .BackColor = Color.IndianRed End With

it works fine. I have so many objects though, I don't really want to copy and paste this with statement 50 times. is there a way to make a with statement take multiple objects?

View 3 Replies

Serializing Multiple Objects Internally

Nov 11, 2009

I am in the process of writing a base class for gadgets that will be displayed on a form.I want the gadget to be fully self contained and reusable.At this point it does everything that I need it to do EXCEPT, i'm having trouble figuring out a creative way to serialize my objects using only one object.I have a feeling the answer lies somewhere within the context of using shared functions but I'm having trouble wrapping my mind around it.

View 1 Replies

VS 2008 Way To Specify Bounds For Multiple Objects?

May 22, 2009

In my game, which is just for practice, I have a 2 rectangles one set as the inner bounderies, one set as a sprite, but I want to create walls for my boundaries. So how could I set a string of bounds with this

Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If Sprite.Bounds.Top <> Wall.Bounds.Top Then

[code].....

View 4 Replies

Way To Get Multiple Business Objects Into A DB (in One Go) Without RBAR In .Net?

May 13, 2011

I have a collection of populated custom business objects in my app which I'm going to insert into a SQL 2005 DB using a stored procedure. The collection size isn't massive, maybe 20-30 objects.Is there an elegant way to insert all of these objects into the DB in one go without doing something like the following?:

Open DB conn
For each item in collection ...
Set parameter values of SP from item.properties for SQLCmd

[code]....

View 4 Replies

Apply Same Logic To Multiple Entity Objects?

Oct 26, 2011

I have about 20 different report tables in my Entity Data Model that all have a few common fields (like start_date and end_date). When my reporting application pulls data for a given report, the first thing I do is filter the table for today's date. This means I have code blocks similar to this throughout my code (VB)[code]...

Is there a way to create a single generic function that can apply some logic to different objects and return that specific object instead of a generic one? Alternatively, is there a way to cast the return value back to the specific entity object type?

View 1 Replies

How To Store Multiple Objects (of Different Class Types)

Mar 22, 2012

My brain is fried at the moment, so here's the scenario.I have a form that adds a member to my VB.NET application.When I press submit I add their details: name and number as well as what products they want (internet and phone). Internet and Phone are their own class as is member.

I want to add that they HAVE whichever they have chosen and with the member store it.

[Code]...

As what happens is once the member is created (stored) I will go to input how much they have used, and then store that. But to do so I will need access to the internet and phone classes, which are associated with said member.

View 2 Replies

Multiple Webbrowser Objects But Refresh Only Active One?

Feb 27, 2010

My program has multiple webbrowser objects, each one in a different tab. How would i go about setting up a button to refresh only the webbrowser on the active tab?

View 1 Replies

Return Multiple Objects As JSON From Asp.net Webservice?

May 30, 2012

I have the following code to return a one-object JSON array,

Imports System.ServiceModel
Imports System.ServiceModel.Activation
Imports System.ServiceModel.Web

[code]....

The returned data is :

{id:1,Text:"TText test"}

How to make it returns :

[{id:1,Text:"Text 1"},{id:2,Text:"Text 2"}]

View 2 Replies

Save Multiple Objects To Single File

May 13, 2012

I am trying to save multiple type of objects to a single file, objects are a custom class that I am able to serializable and another object is a word document that is not being able to serialize via binary. Is there a way to save multiple objects to one file using vb, also would it be possible to save files like how a docx is saved, that is a .zip renamed as docx but get access to inner objects.

View 1 Replies

VS 2008 (De)Serializing Multiple Objects Into One File

Dec 21, 2009

I am trying to create a load and save function for my customizable Menu/Tool/StatusStrip controls (see signature). Those three controls use a single AppearanceControl class, which is mainly just a large list of properties (Colors) which control the colors of the Menu/Tool/StatusStrip.

I want to be able to save and load the values of these properties so the user can store them and load others with ease. Serialization seemed the obvious answer, although I never used it before.

Now, there is a slight problem that I cannot serialize Colors, so I simply gave each Color property the XmlIgnore attribute, and created an Integer property that gets and sets the Color property (using Color.ToArgb and Color.FromArgb). This way I can serialize the color properties succesfully.

Then, there is another problem. The properties are not all in the AppearanceControl class. Instead, the AppearanceControl class has a large number of subclasses, which in turn contain the color properties.

As a small example, I may have this:

vb.net
Public Class AppearanceControl
Private _toolStripColorProperties As ToolStripColorProperties
Private _menuStripColorProperties As MenuStripColorProperties

[Code]....

View 6 Replies

[2008] Resizing Multiple Objects In A Form

Feb 11, 2009

I'm trying to set up a system to resize multiple objects on a form (40+) when the form resizes. I've got it working but it's rather slow, when I resize the form it stutters a lot from looping through the objects to resize them. Is there a better way to do this that would not cause the stuttering effect?

View 10 Replies

Copy Files Using Wildcards

Jul 24, 2010

i want to copy all the files in a directory with an extension e.g .exe or maybe all them files *.*I searched on google and found this on MSDN But it doesn't work when i type *. or *.* or *.exe into the textbox and there is files in that folder.[code]

View 7 Replies

Match A Two Strings While Using Wildcards In Them?

Jul 16, 2009

i am pulling data line by line from a PPML what i need to do is: If "current line" matches my string then write that line to a new file

that part I have down my only issue is, is that the "current line" has filenames with in it that change constently i would like to be able to do something like a string with wildcards in it : "<currentline>src=""*""/>" but this does not seem to work Do i need to do an index with conditions or is there a different way if i do need to do an index how would i go about doing that in vb .net for studio 2008

View 1 Replies

Use SQL Queries With LIKE, @parameters, And % Wildcards?

Feb 22, 2012

I am using a database in Visual Basic 2010 displayed through a DataGridView. Through the DataGridView's "add query" option, I am writing these queries. My goal is to have partial search entries show up (ie if the entry is "Lewis" then it should be among the entries returned if "Le" is in the textbox.)

SELECT * FROM Table WHERE Surname LIKE '%' + @Surname + '%'

I am using the above query and it only returns exact matches despite the LIKE operator. Partial entries never show up despite the presence of the wildcard % symbol. It's as if the whole thing is being treated as an equal sign.What should I do? Is it a problem with the SQL itself or does VB's "add query" maker simply have such limited capabilities?

View 2 Replies

VS 2008 How To Search By Using Wildcards

Sep 11, 2009

I have to provide the app users, a way to search by both regex and wildcards.I've already implemented the regex option, but how to provide a search by wildcards?

View 7 Replies

Wildcards In Filename Searches

May 8, 2009

I am trying to return a filename without the extention, to keep things simple, lets just say I want it to go to a MsgBox.[code]The only thing I am getting is a * in the msgbox. I though that strings supported wildcards?

View 6 Replies

Wildcards In Replace Function?

Nov 5, 2010

i created a DatagridViewNumericUpDownColumn but i got error message Cannot access a disposed object. Object name: 'NumericUpDown'when i closed and reopen the form. It shown You are not authorized to perform this action.how can i get access to view this thread?

View 4 Replies

How To Manage Multiple DAT Files For Serialize Objects Of Same Class

Feb 13, 2010

How best to manage multiple dat files for serializable objects of the same class. If one of my data files goes past a particular size, I want to create a new file. I then loop through both files when I do processing. Is there any easier way to do this and what's the best size to do this at in terms of performance?

View 1 Replies

Repeat Array Calculations Multiple Times For Different Objects?

Mar 14, 2011

I am writing a numerical model to perform a set of calculations within a unit, pass the output to a new unit and perform the same calculations and so on. To do so, I have created a complicated set of functions. I have various arrays which store function outputs that are used for other functions within the program. I am trying to modify the language of the program so the functions can be repeated for each unit without literally repeating each code sequence with modified variable identities. For example:

for x = 1 to 5
for z = 0 to 2
y(z) = 3x +6

[Code]....

View 6 Replies

Finding Single File Using Wildcards?

Mar 3, 2012

I'm using Visual Basic Professional 2010, I have two directories of XML files. The naming convention in directory one is a user's name, a six digit date and ending in ".xml_CREATE.xml". So, I perform some work on a file in directory two. During the course of that processing I discover that a file exists in directory one called "Mike" an unknown six digit date and ending with ".xml_CREATE.xml", so while I have no way to know the date, I know it exists and would look something like Mike030312.xml_CREATE.xml. So, now I want to load that file as an XElement that I will eventually incorporate into an XDocument, so I need to perform a Load similar to:
myXMLFile = XElement.Load(My.Settings.XMLDir & "" & Mike030312.xml_CREATE.xml),
However, since I don't know the date, I need to insert wildcards at that spot. How do I make that happen?

View 13 Replies

Searching And Deleting Files (using Wildcards)

Jun 29, 2009

how to even start a code project of this sort but here it goes... I have an external Hard Drive with some music. My itunes makes duplicates of all my songs so this is what i have.

Dance.mp3
Dance 1.mp3
Dance 2.mp3
Dance 3.mp3
Party.mp3
Party 1.mp3
[Code]...

What I want to do is have the program search the files and delete all files that have a duplicate with a number behind it... Now I would use windows search but some of the songs are like 1001.mp3 or 1001 1.mp3... I want it to look like this when i get done (from the above):

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved