i am creating check box's dynamically and assigning them names like "chk_1" and "chk_2".now if later in my code i want to check if they have been checked how can i do that.if i do something like if chk_1.checked is True then i am getting error that chk_1 is not declared.Which is true.i am using VB.net 2.0 i can post my code if needed.
Code: Public Class Form1 Dim NPB As Button Dim x As Integer
[code]....
As you can see, when I open a program from my menu, a new button will be created with text similar to this, "C:Program ". The button it self will not do anything. How can I create the method at the same time the button it is for is created? Also how can I change the text do that it gives me, for example, CCleaner.exe instead of the whole target path?
I wanted to make an executable file from my program. I already know that compiling your project creates an executable, but I wanted to know how to make an exe with my program.
I am working on a simple windows app that will take our TripleDESCryptoServiceProvider Key and IV from a file and use it to Encrypt and Decrypt strings, etc...This works great and has for years in a utility program, but I want an easy app that can read the Key and IV...following format in the txt file:
And then create the Encryption Pair...Currently I have the following
clientDESCryptoServiceProvider = New _ TripleDESCryptoServiceProvider clientDESCryptoServiceProvider.Key = New Byte() {111, 222, 333,...} clientDESCryptoServiceProvider.IV = New Byte() {1,2,3,...}
Is there any way to pull the {111,222,333,...} and {1,2,3,...} from a text file and create the Byte() that is required?I can read the info from the text file, but cannot seem to create the right format for generating the Byte()?
I am reading data from an excel spreadsheet and i want to create several arrays to save the data in (according to how many rows of data i have which is an unknow untill i actually read the sheet).
I already have a menutoolstrip and i want to add the menuItem dynamically.I am able to add the first menuItem however, i have no idea how to add submenu.
I currently have this code to create an asp table [code]where PH is my placeholder for the table to appear in.This code creates a 1 celled table how do i get it to create multiple rows and cells?
I am having problems creating charts dynamically, using MSCharts.If I drag a chart control into a form, and then use this, I have no problems. However, if I change the code and try to create the chart dynamically, then I just get a blank white rectangle, and no graph, axis or anything.I am trying to create the graph once a user clicks a button. Here is the code I am using.
Public Class Form1 Dim Chart2 As New System.Windows.Forms.DataVisualization.Charting.Chart Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
to create excel workbook dynamically where data will be input and manipulated by user. i want graph as well to be created using the data i manipulated and entered.i want as many as work sheets to be added in workbook once it is created.
I would like to dynamically create an object (in my case a thread) and then be able reference that object. Simplistically put, I would like to read from a text file and then process each item using a thread (so that I don't have to wait for each item before starting the next). The problem is that I cannot think of a way to create a new thread dynamically ie. thread name so that I can then wait for all created threads before doing something else.
I am working on a project that requires me to read a table of items, and then display the items as button with a photo for a POS system. Any suggestions on how to implement this? This project is using .NET 3.5 and a SQL Compact 3.5 database as a data store.I am using windows forms over an MDI form.
This may be simple, but im having a tough go at it. I'm trying to make a "review" section in a step through form, where the user can see everything that has been entered and if they choose go back and "edit" that information again. One section only has to show the information that has been added by the user, basically if they don't select a certain checkbox there is no reason to display the info for that box.I want to to dynamically create labels in a Panel (Panel7) on a TabPage (TabPage3), only for the checkbox information that was selected. This is what I have right now, and I am unable to see anything on the page, I have also tried without the panel and straight onto the tabpage itself to no avail.
MsgBox(CurPat, MsgBoxStyle.Critical) If (CurPat = "True") Then Dim lblTemp As New Label
I have to create an application that will dynamically add a menu strip with menu items to a form(ie NOT dragged and dropped onto the form) in Visual Basic. The menu strip should be created in the Form_Load event handler. I have to use a TextBox for user input. If the user enters information into the TextBox and clicks on the Add Button, the text should be added to a ComboBox control.A Menu should then be created that must be added to the menu strip dynamically.
Is there a way to dynamically create an object at runtime?Background: Basically i have an employee class that i want to instantiate every time an employee logs in. What i don't want it to have an employee object already created for every employee, but when they log in the object gets created.
i know a way to play mp3 files, which is to go toolbox and add the msdx.ocx file. however is there anyway i could dynamically create an object that plays media files (other than .wavs)
I've been trying to get some PictureBox'es to appear and disappear dynamically. Here is my code I've been trying to get to work:
Private Sub Container_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Image As New PictureBox
[Code].....
Obviously, this isn't how I started out. But I've been trying everything I can to get it to actually display. If I have a PictureBox with exactly the same properties, it displays when I tell it to. This way, it doesn't. I even created an entire class and used that - nothing. I'm guessing it may be the fact that I used a Dim statement, but I'm still a teensy bit novice-y to certain aspects of VB (in particular, Image handling).
I want to write commands to .vbs file to create a vbscript dynamically based on selections in my app, but I get errors Argument not specified for parameter 'append' of 'Public Sub WriteAllText(file As String, text As String, append As Boolean, encoding As System.Text.Encoding)'.
Comma, ')', or a valid expression continuation expected.
Value of type 'Boolean' cannot be converted to 'System.Text.Encoding'.here is my code so far:
I'm making a LAN instant messenger and I'm trying to achieve something similar to how MSN will open a new chatting window when you double click on a friend. My main form has a list of friends, and I want to create a new chat window when they double click on one of those friends. I've created a "template" chat form which I want to generate dynamically, and I've run into some problems I need help with.[code]The form will only appear once as far as I can tell, and the chat form has events such as button clicks; an error occurs when I try to change something like the text property of a label for example (eg. clicking a button on the chat form changes the text of a label on the chat form will cause an error to occur). The error I actually get is:[code]Now, call me a newb if you will, but I really don't know much about threading and all that hocus pocus.
Before any jumps in and says, Why dont you just use a gridview, i have my reasons not to use it.I trying to dynamically create a table and then populate the cells via a linq object.
Good news, i can dynamically create the table and the cells. Dim numrows As Integer = MyActions.Count() Dim numcells As Integer = 5
How to dynamically create thead tbody tags in my c# code? private void MakeTable(){ Table tb = new Table(); TableRow tr = new TableRow(); TableCell td = new TableCell(); td.Text="hello world"; tr.Cells.Add(td); tb.Rows.Add(tr); }
I'm currently making an application that involves time tables / scheduling. I'm required to generate a timetable for school teaching activities. in this application, I want to display the time slots using labels and I want to enable users to drag them around to place the subject cards in the available slots. I'm even confused with the control to use for the time slots. Right now I'm thinking of using datagridview for the time slot. So I'm trying to drag the labels around and placing them in the datagridview cells.
Dim FileProperties As FileVersionInfo = FileVersionInfo.GetVersionInfo(Application.ExecutablePath) Textbox1.Text = FileProperties.FileVersion
How come we find a version of an exe that's uploaded in FTP? i need the version of an exe that's already there in FTP. i know the path where the exe file is saved in FTP.
I have created a User Control in VB 2005 that adds other controls dynamically. This is a fairly simple test project, with checkboxes added to the control at run-time. Here's the user control:
Public Class UserControl1 Public x
[Code]......
Then I built the test control and tried to added it to the Toolbox. When I did this--i.e., browsed to the dll and double-clicked it, I got the errror message:
"There are no components in ... that can be placed in the toolbox."
Is it even possible to add a User Control to the Toolbox without compile-time components?
I am dynamically creating an unlimited number of background workers and would like to handle errors from them.
In a try statement I am using the following:
Catch ex As Exception 'Me.BeginInvoke(New UpdateTextCallback(AddressOf Error_Text), New Object() {Message, Account}) Exit Sub End Try
I have commented out the BeginInvoke command because I can not get it to work. I get an error the the handle has not been created. This subroutine is in a module and I can not figure out how to get the invoke to work.
I'm making a LAN instant messenger and I'm trying to achieve something similar to how MSN will open a new chatting window when you double click on a friend. My main form has a list of friends, and I want to create a new chat window when they double click on one of those friends. I've created a "template" chat form which I want to generate dynamically, and I've run into some problems I need help with. Lets look at the code I already have.
[Code]...
Now, call me a newb if you will, but I really don't know much about threading and all that hocus pocus. Some guidance in the right direction would be great.
EDIT: ClientWind is the chat form.EDIT: That's weird. It doesn't occur with the actual builds.