How To Create Dynamic Variables
Dec 3, 2008
I need to create a label for every cell in excel that has a value depending on search criteria.Depending on what number is searched i need to display all cells in the row in different labels. There could be one label that needs to be created or many.Do i have to have each variable named differently or can i just use one label tag and give each label a different label.location = (x, y).
View 1 Replies
ADVERTISEMENT
Apr 29, 2011
I have to perform calculations dynamically in ASP/VB.NET (Possibly SQL Server). Something like this:
Dim var1, var2 as Integer
Dim Optr as string
var1 = 15
var2 = 25
Optr = +
MyResult(var1, var2, Optr)
And MyResult should equal 40. How can I do this?
View 4 Replies
Nov 23, 2009
I have a listbox that is dynamically filled by certain values depending on what table has been selected from another list box. Once a value is selected, it is being graphed vs a date & time range. With my ignorance of linq: depending on what value is selected, the linq to sql statement I need to create to grab data from my database is different as I can't use an index on an anonymous type.
result = From t In db.APS _
Where t.DateTime >= startDate And _
t.DateTime <= finishDate And t.Weight = weight _
Select t.DateTime, t.TotalConcentration
t.TotalConcentration should be selected if my listbox value is "Total Concentration", but if it's something else, like "Temperature" or "Flow Rate" (connected to appropreate database columns) - this method obviously isn't going to work. I need to be able to dynamically select a specific column from the anonymous type list, or use some other method I'm unaware of to do this.
View 1 Replies
Sep 7, 2010
we currently use our own 3rd party customer management system that is cloud-based. They offer pretty good reports; however, we need special reports and the only way to do this is to download our database though web services that the vendor offers. I have some education and experience with programming, but it has been a while. Instead of having to actively engage the webservices directly, our vendor has offered a stepping stone. They have a command line exe that interacts with the webservices and, with the use of different parameters, gets us to the point of having all the data downloaded in xml, csv, or screen printed - the only problem is that it will only do this a table at a time and there are 43 tables I need to interact with. I need to build something that can either be a console application or something that can be run automatically in the middle of the night when there is no load on the server.
Here is what I need to happen:
The command is CMSDownload.exe. It needs to login (again, there are already parameters set up to do this so I can hard code that into the script) Once logged in, the script needs to check a parameter that has been saved that signifies the last date of successful completion. (Obviously, it needs somewhere in the code to place this parameter also). As I mentioned before, each table needs to be downloaded into its own xml file individually. For instance, the following is one example of a table being downloaded in this fashion:
Generate an XML file of all of the data in the accounts table between '01/15/2009 09:13:34 AM' and 01/16/2009.CMSDownload -d somedn -u someusername -p somepassword -f c: empaccounts.xml -m xml -o all -t accounts -s 'start date' -e 'end date'
-d is a login component (credentials)
-u is a login component (username)
[Code]....
View 1 Replies
Jun 6, 2011
I am currently making a server monitoring application that pings the server to check its uplink, so far it creates all the picture boxes and labels for each server, and then pings the server, although I have a picture that I want to change dependant on the result.
Below is the code I am currently using, the problem occurs with the objectname variable which allows dynamic coding, where i get a error, saying that "Public member 'image' on type 'String' not found".
Private Sub Ping()
Dim i As Integer
Dim objectName As System.Object
For i = 1 To count - 1
[code].....
View 4 Replies
Oct 19, 2010
I currently have a sub that has a string builder that I'm wish to use as the content of a CSV which I will email later from a webpage. My stringbuilder is creating the content for the CSV but I don't know how to create the CSV dynamically (I don't want the CSV on disk).
Private Shared Sub BuildClientTrustBalanceCSV(ByVal sb As StringBuilder, ByVal clientsWithTrustBalance As List(Of NonPaymentHistory))
If clientsWithTrustBalance Is Nothing OrElse clientsWithTrustBalance.Count = 0 Then
[code]....
View 1 Replies
Jan 11, 2012
I have a form as Dashboards. I want to automatically refresh data without the data being read from the database and the user are shown.What is the best late for this scenario? I did this using a timer, but the best for this scenario is late?
View 1 Replies
Jul 16, 2009
How to create a dynamic report?
View 1 Replies
Aug 11, 2011
We have these xml formatted .config files that come with all our ASP.NET programs. Well they have keys that need to be populated and I am unable to understand how to create a variable in xml and use it. The articles on variables in xml all seem to be talking about some other type of variable than I am familiar with. I am used to working in C or other programming languages.
I want to do something like
MyVariable = "SomeString"
<add key="Key1" value=MyVariable>
View 4 Replies
Jan 12, 2012
I was wondering if some of you can help me with a problem I can't seem to get around. I've got a database that contains a list of users who are connected to an application. The usernames and number of users connected will be random. What I need to do is to display two dynamic text boxes and also have a dynamic tooltip for each of the text boxes for each user displayed. If you look at the attached screenshot I drafted up, I'll only use the first user 'John' for this example.I will hardcode my example because getting the data from the database isn't the issue I'm having. My problem is figuring out how to make the text boxes and tooltips unique for each time someone visits the form. I would also like to be able to set the text within the boxes as well. So, I would need two textboxes for John called:
[Code]...
View 2 Replies
May 26, 2009
I am attempting to create a long range calendar that dynamically loads (and unloads) event data as the user scrolls left or right through time. I'm really struggling to figure out how to lay the basic framework of the UI out and how to dynamically build the interface as the user scrolls by clicking and dragging the mouse in the view area. See the image below for a basic diagram of the intent. Each slice would have potentially multiple rectangles in it for events that occurred on that day (slice). I would like each slice to be a canvas to allow me to position those rectangles appropriately.
There are a few problems that I am not yet sure how to tackle but this is the first big one that I've been mulling over for a while and can't quite wrap my head around:
I know how to dynamically create controls but how would I go about adding things to one end of the scrollable content while removing things from the other depending on the way the user is scrolling?
View 2 Replies
Sep 25, 2010
I'm trying to create a dynamic jagged array. That is, one that i can increase the size of at runtime. Maybe its easier if I show you. I have a folder containing a varied number of files. What I want to do is set up a jagged array, with the file contents as the second array. So kind of like this:
Code:
FileList(0)
Filelist (0) (0) = Line1
Filelist (0) (1) = Line2
Filelist (0) (2) = Line3
[CODE]...
However, it throws a System.NullReferenceExeption when I try that. In addition, I don't understand jagged arrays all that well....Here is my code (that doesn't work). The jagged array must be accessible by other methods.
Code:
Imports System.IO
Public Class Form1
Public Skills()()
[CODE]...
View 4 Replies
Mar 29, 2010
I have to ask my first question at some point, so here she goes.I am trying to create a dynamic list of objects. The objects will have several types (String, Integer) associated with them. Currently I am forming a Collection as I instantiate new objects.Is there a prefered to map this collection to, say, a Datagridview? Will I have to Iterate through the collection and add the rows at each iteration?Would I be better served using an ArrayList or something else over a Collection?
View 8 Replies
Apr 7, 2011
I'm triying to create a dynamic query to Entity FW (i'm using Self tracking Entities over EF)
This is what i'm doing:
Public Class Specification(Of TEntity As Class)
Private _predicado As Expression(Of Func(Of TEntity, Boolean))
Public Sub New(ByVal columna As String, ByVal condicion As OperadoresComparacion, ByVal valor As Object)
[Code].....
View 3 Replies
Jan 7, 2012
I am trying to create a dynamic string statement[code]...
View 7 Replies
Jan 6, 2010
Currently I create a thread the following way (the normal way)
Public loginThread As Thread
Public loginThreadStart As New ThreadStart(AddressOf LogIntoWhatever)
Public callLoggedIn As New MethodInvoker(AddressOf loggedIn)
However, what I want to be able to do is something along the lines of (this obviously does not work, and is entirely pseudocode)
dim i as integer = 0
for i = 0 to i = 25
Public loginThread(i) as Thread
Public loginThreadStart(i) as New ThreadStart(AddressOf LogIntoWhatever)
next i
Public callLoggedIn as new MethodInvoker(AddressOf loggedIn)
Where I could change 25 to whatever I wanted and have that number of threads created. They would all be running an identical sub which does do not make calls of any kind to each other, they don't need knowledge of each other. Is anything like this possible?
View 3 Replies
Apr 7, 2010
Does this create a dynamic byte array?
Code:
Private m_renderedReport As Byte()()
Or this actually creates a structure?
View 1 Replies
Jun 30, 2010
How can Create Dynamic Groupboxes in the Panel??and also create Radiobuttons in each Dynamic GroupBoxes??
View 1 Replies
Jan 26, 2012
I'm a junior VB programmer and looking for some advice on this subject. I'm trying to create a chunk of code that will create dynamic storage for variables for use later by dynamic custom controls.
For example:
An INI file might have an entry in it that looks something this:
....
[var1] <-- this becomes the Storage name
description=My Variable
type=System.Int32 <-- this could be any valid VB type
last_val=456 <-- Other code would save the last value
....
And I want to access the data using a standard "property set" like so after it's created:
var1_reference.value = 55
I've tried using a generic class which works ok as long as I declare the variables at design time from within the design environment. But when I try to create them from the INI file it gets messy.
Here's the simple generic class i've constructed to test this:
Public Class GenericVar(Of T)
'
' Generic Symbol Class for data storage
'
Private VarName As String
Private VarType As Type
[Code] .....
Also, as each object is created (and they could be different types) I store a reference in an array to make it easier to keep track of, but I'm having a hard time getting access to the objects and their properties, and certainly cant seem to assign an event handler to it once its in an arraylist because the design time code doesn't know what "Type" it is in the arraylist of objects.
View 2 Replies
Feb 24, 2010
I have 10 textboxes. I want to make a certain number of these textboxes visible. The user enters a number from 1 to 10 to determine how many textboxes are visible.The textboxes are named textbox1, textbox2, .... , textbox10How do I set up a simple for loop to accomplish this?
View 2 Replies
Jan 20, 2012
I'm looking for a way to create PDF with dynamic content. When you google for it, you get 1000 hits on how to dynamicly create PDF's, but thats not what I mean.
View 6 Replies
Feb 17, 2011
I have a WPF window appliaction that I would like to build the functionality to have a dynamic style (font family, weight, size, etc) that is stored in a SQL database allowing a user to specify the type of style to use on control's such as ListView's and labels, etcI have started defining styles in the Application.XAML file and am not sure if this is the best approach to achieve a dynamic style.
View 1 Replies
Sep 9, 2009
I have a page where the page loads with the code as shown below. Pretty much every other sub on the page uses the variables gFilename, gPicType and gPicPath. In every other routine I have to go through the process of recreating gPicPath (as per the if/then block in the code). How do I create these variables ONCE, and then store them so that all the other subs can access them?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
' check to see if this is the first time the page is loaded.
If IsPostBack = False Then
[code]....
View 7 Replies
Jul 12, 2010
I am looking to create a function in which I can pass in an integer (count) and create an amount of picturebox's based on the count.For example if I pass in an integer count, it should do this, only I don't know the correct syntax for it.[code]I am making a huge list of pictureboxes that will scroll on a form, 5 showing at a time.Also, if there are a huge amount of pictureboxes, will I be better off keeping like 7 pictureboxes on the form and keep rotating images throughout? Images are coming from a folderlist in a listbox (so I can easily pull the path of the image from an index).
View 6 Replies
May 4, 2012
I want to monitor more than 10 folders on different machines by using SysTemFileWatcher. I create a class called Watcher for doing monitoring. So, for each folder I have to call that class once with a new thread. I want to name each thread with its own name like: T1, T2, T3 ... for easier controlling them. It is not nice if I declare each thread like:
Dim T1 as Thread =new Thread(Address of Watcher.StartWatcher)
Dim T2 as Thread =new Thread(Address of Watcher.StartWatcher)
...
Dim T18 as Thread =new Thread(Address of Watcher.StartWatcher)
How can I declare thread names dynamically with the names just like that. I have tried to use Thread array() but it doesn't work.
View 6 Replies
Feb 18, 2011
I currently use SiteMapPath to generate a breadcrumb for my ASP.net 3.5 (vb.net) pages and it works great.
Now I am trying to figure out how I might be able to use the same control to build a dynamic page title (in the tag). I want a reverse path listed, but the SiteMapPath control includes links and bunch of styling spans. Is there any way to remove all of that, and just get a plain path with separators?
For example, Let's say we are on the "Press Releases" page inside of the "About" section of my site.
The breadcrumb shows up as:
Home > About > Press Releases
I want to have the page title be:
Press Releases - About - Company Name
So I need it to reverse the order, drop all spans, links and styling (since this is inside the tag) and drop the root node "Home" and then add the company name to the end. Since my menu nav and breadrumbs are all driven from the sitemap file, I thought it would make sense to try to make the title do the same.
View 1 Replies
Apr 12, 2011
I am able to create simple image with text, but I want to apply MS Word Art font to my text.here is my code to create image with Text.
Font MyFont = new Font(FontFamily, Font,FontStyle.Bold, GraphicsUnit.Point);
MyGraphics = Graphics.FromImage(bmpImage);
MyGraphics.Clear(Color.FromName(Convert.ToString(Request.QueryString["bgColor"])));
MyGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
MyGraphics.DrawString(sImageText, MyFont,
[Code]...
View 1 Replies
Mar 26, 2010
Currently i only managed to implement the google map(static) into my application,but i want to replace it with a dynamic map. Is there any website or example for me to refer? I tried reading up google API website, but i still dont get it.
View 2 Replies
Feb 18, 2009
To create a dynamic table in sql server 2005 with all its privilages(constraints,..) from a xml file.
View 1 Replies
Feb 13, 2012
How to create an aspx page with a Flash object inside? And how to change the content of the Flash object?[code]...
View 1 Replies