I am writing an app that puts multiple controls on a form at run time and then I edit the controls in a property grid. All that is working fine. I'd like to 'mark' the contol when it is 'selected just like visual studio does with the dotted border (or soemthing similar, I don't care that it is just like vs). I'm already using MouseDown event to grab the control and send it to the PropertyGrid, but I have now wired it up to take multiple controls and need to 'identify' them on the screen.
i have the project as below...And i am putting the code over here.Imports System.Data.SqlClient Imports System.Data 'We have to add this line, its mandatory, if u dnt add this line and start declaring the variable "Dim dt As DataTable" Then u will get the error.
I've got a form with following controls: Two Datetimepickers Two Buttons One TextBox One ComboBox The idea is adding and subtracting dates using Datetimepicker contols... I found codes for doing Dates Calculation but is'nt quit correct;for example: if i want to add 21years from today the result will be: sat 30 Aug 1930 The Adding Codes on comand button: Private Sub BTNadd_Click(ByVal sender As System.Object, ByVal e As
I have a question regarding the dataset usage in Reporting Services. I have a stored procedure which returns multiple select statements (result tables), and I created a Dataset in Reporting Services 2005 with this stored procedure. The problem is that I can not reference the second or third result table, and I can only use the first select statement fields. Is this the limitation on Reporting Services Dataset or is there a way to use multiple table results in one dataset?
I have a webbrowser control in VB 2010 Windows Form project that loads a webpage. This webpage contains select tags with a few options. I can select one option using:
Dim cboTemp1 As mshtml.HTMLSelectElement
[Code]....
But I need to be able to select more than one option (e.g. 1 and 6) in the select tag/element. Is that possible, the Select element has the multiple select option enabled..
I want to select to multiple sql tables using select query in vb.net..I have 2columns in sql table..I have tried this query.. But i'm getting error.
TextBox11.Text = Val(27) cmd = New SqlCommand("SELECT outside,power FROM vijay21 INNER JOIN vijay22 ON vijay21.outside=vijay22.outside WHERE outside BETWEEN " & Val(TextBox11.Text) & " AND " &
I am developing an app that has a treeview on the left in panel1 of a split container. When you click in a node it loads a user control into a tabcontrol that is in panel2. Some of the user contols contain webbrowsers that autorefresh every 15 sec (not under my control). I can successfully remove a tab by a contextmenu but I can still hear the clicking sound of the webbrowsers refreshing. Not sure what to do to completely remove the usercontrol. Treeview control code for one node: there rest are basically the same
Code: Dim tabcount As Integer tabcount = TabControlMain.TabCount
[CODE]...
Code to remove a tab and all tabs:
Code: Private Sub RemoveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemoveToolStripMenuItem.Click TabControlMain.Controls.Remove(TabControlMain.SelectedTab)
[CODE]...
I also originally had this setup to work without the tabcontrol and just load the usercontrol into panel2 of the split container. Each time a new node was selected from the treeview I would have SplitContainer1.Panel2.Controls.Clear() to remove the current usercontrol. I would still hear the clicking of the old usercontrol.
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.
The textbox that I create in vb.net does not let me select all the text using the common keystroke control + a at runtime. The textbox is able to detect all other keystroke combinations at runtime, such as control + c, control + v for cut and paste, but it does nothing for when the keystroke control + a is pressed. Is this something that vb.net textboxes do not detect and therefore I would have to program manually by having the program detect keystrokes and then have the program select the text using the code TextBox1.SelectAll() ?
I was wondering how can I select all of the images in a richtextbox at runtime .For example, suppose a file is loaded into a richtextbox control (system.windows.forms) [code]...
I am trying to code in .Net to select an area and the area will be where ever in the form, that is not restricted to a control and asusually the area appears like a square by dragging using mouse at runtime on the form and if on clicking on a button for ex "Save" i.e., saving the selected area and when the next time the page loads that particular area should be clickable.Right now i have no idea where to start but if some idea is given it will be more helpful to me to develop some code for this functionality. Does any one give a small idea that how can I do this functionality, so that I can proceed developing code?
I want to be able to select any control on the vb form at runtime. These controls will be added to theform on a click of a button. So essentially I want to dynamically be able to add and then select these controls at runtime. I would also like to make these controls dragable on the form.
I have a form where I have to use control arrays to create a multiple input form i.e. rather than processing one transaction at a time up to 16 transactions must be processed. The following really havent given me much problems at this moment labels and textboxes. I use a for construct to create all the controls including a combobox. This is where my question comes in this form combobox has to be linked to a table in a database. But furthermore and this is where it gets complicated for me anyway each seperate combobox must move independly if i select row 5 in the table in combobox 4 combobox 5 which is havent touched should still be on row 1. How do I accomplish this. I'm using a webservice. I have tried passing a loaded dataset . The code that loaded the dataset is as follows
Dim DSInfo As New Project1.localhost4.AccInfo DSInfo.Credentials = System.Net.CredentialCache.DefaultCredentials InformationData.Merge(DSInfo.GetBusinessJournals)
[Code].....
this code doesnt however provide a link to the table equallly creating a dataset in the combobox method ,loading it and then setting it as datasource also provides no link. I know i'm missing something.
I'm developing an application to allow engineers to conduct simple single table/view queries against our databases by selecting Database, Table, Fields.
I get how to use the Dynamic LINQ Library Sample to provide for dynamically selecting the Select, Where and Order by Clauses at runtime but I'm at an impass on how to allot for table choice.
Is there a way to provide for dynamically selecting the "from" table at run time
EDIT
So Both of the answers seem to be saying the same general Idea. I'm going to try to convert the C# into VB and get it to work.
The first answer converts to
NotInheritable Class DataContextExtensions Private Sub New() End Sub
In a form, I have 10 Slider control (I am using dotNetBar) and I want to reset all of their values to 0 but I am getting into a snag when I send the control the command. here is my code:
Dim ctrl As Control dim temp as string For Each ctrl In Me.Controls
[Code]....
while .name statement works, the .value gives me an error. and it isn't recognized as one of the possible properties in the pull down list after typing the "."
I know how to create a control at runtime e.g.[code]Can anyone tell me how to create multiple instances using a for-next loop? e.g.[code]The part I can't work out is how to give each new button a new name... like button1, button2 etc
I am not able to generate Multiple GroupBoxes at runtime By using below code. so, plz anyone can help me to rewirte the code....
For i = 1 To ds.Tables("tblprojects").Rows.Count - 1 Dim GroupBox1(i) As New GroupBox() Dim CheckBox1 As New CheckBox() Dim RadioButton1 As New RadioButton()
These will all contain the same items and I need to add them at runtime. I know how to loop through the controls, but not sure how to make sure I'm only editing the correct comboboxes. (I will have to do this for 2 more sets of comboboxes with similar naming conventions as well)
I generated columns from database and getting cell values from database too. my problem is that for some columns I have to generate checkbox in each cell at runtime.I m using visual studio 2010.
I wonder how you can make a picturebox selectable at runtime and also change the size and location during runtime?
Well I know how i can change the location of a picture box during runtime but that is only with a picturebox that is already defined in the form before runtime.
So I write an event for that particular Picturebox.
But now i want to do the same thing with a picturebox that a user can add during runtime and then the user should be able to select and move the picturebox.
So now i can't add code to the picturebox event so I wonder how you should do this. ( Maybe with reflection?)
And what if the user added 10 picture boxes and selects a certain picturebox. How do you make it possible that the picturebox the user clicks on is selected?
Should you store each picture box location on the Panel and then when the user clicks on a certain pixel in the panel where a certain picture box is it get's selected?
i'm having one user control in asp.net ,i just want to add the user control multiple times in a single web page in runtime in a separate table. How to do this?
I have a 3 textbox;fname, mname and lname.As soon as I click button "add entry", the fname,mname and lname will be save to database to its first name, middle name and last name column respectively.
I want to add another set of 3 textbox during runtime , when i click button "add textbox", so that there are all 6 textbox in all. And I can add 2 first name, 2 middle name and 2 last name at the same time to my database.
At design time in the IDE, you can ctrl-click or drag a box around multiple controls on a form and move them all at once. How do you do that at runtime. I need to be able to create image maps based on textual copies of medical claim forms that are generated from different systems and the ability to create dynamic label controls and move a single or multiple controls and resize is required. How does MS do this in the IDE?