Selecting Outside The Form?
Dec 24, 2008
I have a form that needs to add user selected items to a listbox. But these selections are done outside the form itself. So in windows explorer, the form pops up and then the user keeps clicking on files and I want these file names to be added to the listbox. How can I do this? in my case, as soon as I click outside, obviously the form loses focus. How can I "listen" to mous clicks outside?
View 3 Replies
ADVERTISEMENT
Nov 1, 2009
I need to select all the comboboxes on a form with a for each loop. I have about 19 comboboxes and I need to select each one. I tried to do
for each box as combobox in me.controls
But that gave me an error and i now tried this:
for each box as control in me.controls
if box.name.contains("ComboBox") then
...
end if
next
That selected only the comboboxes but the problem is i need to access some data that is specific to comboboxes (aka the selected item(s), if its blank) but those properties are not present since "box" is a control, not a combo box.
View 1 Replies
Apr 28, 2012
I am getting a disturbing message error when I dont select image from file then when I select its just ok...it just says:
The path is not of a legal form.
So my question is how can I have a choice whether I can insert image or not...if the fileopendailog opens there is query which says you must select...so may be I don't want to select. So when I click cancel in openfiledailog, that error message prompts. I want make the query in the code to have a choice.
This is the code of putting image into sql server db:
Dim pictureLocation2
As String
Dim aa As
New OpenFileDialog
aa.Filter = ("Image files| *.jpg")
[Code] .....
View 5 Replies
Mar 7, 2012
When I select a node from treeview, it correctly shows the child form. However, when I close the child form and select the same node from the parent form, nothing happens.
Private Sub TreeView2_AfterSelect(sender As System.Object, e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView2.AfterSelect
Dim intNode As Int16 = 0
'set fore color to black
Do While intNode < 10
[Code] .....
View 6 Replies
Mar 10, 2010
I have a typical data entry form to show one Customer. All textboxes, controls, etc. are bound to a BindingSource.
Clicking a button, I pop up another form with a DataGrid to show all Customers in a table, this way:
VB
Sub btn_Click
Dim frmPopUp As New frmSearch
frmPopUp.BindingSource1.DataSource = Me.BindingSource1
[Code].....
How can I populate the fields in Form1 selecting a row of the grid in frmSearch?
What I need, is to synchronize the databindings (I think).
View 6 Replies
Nov 2, 2011
I am new to programming and i am working on a windows fom app. In this moment i have my windows form set with several controls that insert data into sql db. Now, what i need is this:
When the user select a employee name from my dropdownlist, i want the form automatically fill with the data inserted in the past to the tables db. Is like choosing the different profiles by selecting the name in the dropdownlist. I have many controls to fill, name, secondname, lastname, telmobil, address, etc.
View 4 Replies
May 20, 2011
how do I go about selecting a time of day in a form??
I have tried using a datetimepicker but it just selects a date and it displays the static time (current time).
View 2 Replies
Aug 25, 2010
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?
View 7 Replies
Mar 27, 2011
Can I select all buttons in my form on mouse hover event in few lines only?I want to add hover sound effect on all buttons when hovered.
View 2 Replies
Oct 24, 2011
I am trying to get back a single from from a EF database model using the below line of code..
Dim _classRoom As classrm = db.classrms.Select(Function(b) b.Course_ID = _CurrCourse.course_ref)
Where classrm is the name of the entity and db is declared as a new entity. What I am trying to do is select a row from the entity based on matching Course_ID which in this model is a string. So that I can later use the variable _classRoom to get other items out of the same row.. However I am getting the following error:
Unable to cast object of type 'System.Data.Objects.ObjectQuery`1[System.Boolean]' to type 'Trial_Online.classrm'.
I have to preform similar tasks with several different Entities but if I get pointed in the right direction I can manage from there...
View 2 Replies
Sep 17, 2009
Using a checkboxlist not a simple checkbox I need to select 1 checkbox otherwise display a error message in an label once I submit the form. My checkboxlist does generate correctly now I just need to validate it
'check checkboxlist
For Each ckbox In checkBoxCropsFertilzed.Items
If ckbox.Selected > 1 Then
lblErrorMessage.Text = "too many selected"
End If
Next
View 1 Replies
Jun 4, 2012
I have the following document[code]...
Now, how can I get the ID of the Div, by selecting text in his Field?
For example, if the user selects the text "Div1 - Text" (or part of him), the result should be "ID1".
if the user selects the text "Div2 - Text" (or part of him), the result should be "ID2", and so on.
View 5 Replies
Jun 16, 2010
ive got several combo boxs on a search form and its all working great if you select the items from the list, but have a problem if you type the value, the selectedvalue isnt being returned what do i need to do, this is what im using to get the value when selecting via clicking
Private Sub BTYPE_ComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTYPE_ComboBox.SelectedIndexChanged
If Len(Trim(BTYPE_ComboBox.Text)) > 0 Then BTYPE_FILTER.Text = BTYPE_ComboBox.SelectedValue.ToString Else BTYPE_FILTER.Text = 0
End Sub
View 9 Replies
Aug 3, 2010
Can anyone reccommend a good database that I can use on a local machine to storenames/addresses etc. and that integrates easily into .Net 2.0.I have used MySQL a fair bit, so something along that route would be great but without the need to install additional software on the computer or connect externally to a server
View 1 Replies
May 24, 2007
I wrote some software that use the AVICAP32.dll to do a spot of video capture.All was going well till they went and bought a laptop with a built in webcam.Now my software picks one a random and uses that for the video (somewhat annoying to say the least) Can anyone tell me how to pick a camera to use,I suspect it is related to DVM_DIALOG but my experiments have not been too successful.
View 1 Replies
Dec 5, 2010
I Have a problem with selecting a row in a datagridview. I want the user to press on the data rowheader of the data gridview of a particular row and then that rows first item are put in a string. But the problem is that if i Select an item another item is still selected. So If I press the mouse button on the row header the previous item is still selected and then the wrong data is in the string. Here is the code under the event of the datagridview mouse click:
Private Sub dataGridView1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles DataGridView1.MouseDown
Dim hit As DataGridView.HitTestInfo = DataGridView1.HitTest(e.X, e.Y)
Dim index As Integer
[code]....
View 1 Replies
Apr 10, 2010
I am trying to get back a single from from a EF database model using the below line of code..
Dim _classRoom As classrm = db.classrms.Select(Function(b) b.Course_ID = _CurrCourse.course_ref)
Where classrm is the name of the entity and db is declared as a new entity. What I am trying to do is select a row from the entity based on matching Course_ID which in this model is a string. So that I can later use the variable _classRoom to get other items out of the same row.. However I am getting the following error:
View 1 Replies
Aug 15, 2010
what is wrong in this statement i want the time to show after e selected time
i want the time to be shown after 22:00
for each r as datarow in mydataset.tables("Bookingen").rows
if r.item("td") >="22:00" then
messagebox.show(r.item("td"))
View 5 Replies
Feb 24, 2012
I have a series of ovals named "lamp1" through to "lamp26" and wish to change a particular lamp's backcolor.I have done this for labels (Controls("Label" & intButton).BackColor = Color.Black) but Controls does not work for Ovals. I assumed this was because Ovals are part of the PowerPack set but I cannot get any further.
View 1 Replies
Jul 27, 2011
I've data of 40 temperature sensors in a data table. I want to extract particular column from SQL from this data table, usually for this to occur One can Say write "Select value FROM table" where value is the parameter, this is ok, but it returns a value in specific row(s) of specific column whereas i want opposite. I want to my query to select particular column as argumument. I have 40 Columns.
Like: SELECT S1 FROM Table, SELECT S2 FROM Table .... but this is too hectic to write it for 40-50 sensors. Is there any way that i can replace S1-S2 in above statement as argument and provide it on runtime to select particular column?
View 3 Replies
Aug 7, 2009
My problem is i have two comboboxes, cmbFamily and cmbModel, I have values in cmbFamily: A320, A330 etc And i have a database that has all the available models for these aircraft types, i have got some help on a query so i can fill up cmbModel with all the models of aircraft available, but i only want to display the models related to the family that is selected in the cmbFamily combobox.
The query i have so far is
Query = New OleDb.OleDbCommand("Select Model From Availability", AccessConn)
'AccessConn is my database connection string I would like to have something that views the text in cmbFamily and then looks for all related model entries in the dataset.
View 4 Replies
Jul 1, 2010
I want to select a Particular Row from a DataTable;may i know what is the best way of doing it?
This can be done using the DataView but i want to know the best way of doing the same.
View 11 Replies
Aug 26, 2009
i can write the xml i need which looks like:[code]This shows me the value fine! when i change the attribute name to another field like: MessageBox. Show((XMLItem.Attributes("postingHiddenFieldsCount").InnerText))i get a null reference error,
View 9 Replies
Jan 31, 2012
I have following xml:
[Code]....
and I need to pick node from Id 25 to id 75. It is a portion of XML. Original XML is very long. How to do it without XPath? Dim nodeList As XmlNodeList = xmlDoc.SelectNodes("//Node[@id >" & 25 & " and @id <" & 75 & "]") Dim sb As StringBuilder = New StringBuilder For Each childNode As XmlNode In nodeList sb.Append(childNode.InnerText) Next but it is not working ...
View 1 Replies
Jun 27, 2011
I have a simple ASPX page with a listbox and a button. Listbox has about 8-10 items in it. After the user selects an item (listbox is multi-select) and clicks the button, I'm iterating through the items to get the selected one like so:
For Each Item As ListItem In lstLetters.Items
If Item.Selected Then
Dim LetterID As String[code]....
When I step through the code, I select the first item from the listbox. I setup a watch on the 'Item' variable. The code will iterate through each of the items -- but Item.Selected always reads 'False'.I double-check the page, and sure enough my item is selected on the form.What the heck is going on?
View 1 Replies
Nov 12, 2009
I want to know if there's a better method for selecting the sender of a sub like this .[code]
View 8 Replies
Sep 29, 2011
I have a datagridview that is bound to a dataview. I use a textbox to sort the list of data in the datagridview. Once the list is sorted I want to click on a row to populate the textboxes in order to update the data. Problem is once I sort the data I click on say row 3 and it pulls up the orginal data before the data was sorted in the datagrid view. For instance:
Before Sort:
1. betsy
2. james
3. john
After sort:
1. john
2. james
3. betsy
If I double click row 1 it will pull betsy info into my textboxes instead of john. I currently refresh my datagridview after every letter is entered into my textbox. I also reload my dataview and rebind the dataview with the datagridview.
View 2 Replies
Oct 5, 2011
Currently I am using this code to fill my datagrid.
Dim da As New SqlDataAdapter("Select id, name, type, add1 from [company_details]", con)
Try
If Pdetails.Visible = True Then
con.Open()
Dim ds As New DataTable
[Code] .....
View 7 Replies
Feb 14, 2010
I have a bound datagridview containing 4 columns. All I want to do is click on a row and then assign the value for each column to other controls (in this case textboxes). My problem is, I'm not sure which Event to use. I don't know how many events I've tried the code below in several different events but none of them are working.[code]
View 5 Replies
Aug 8, 2008
i have a datagridview control called videoplaylisttable it shows data from ideoplaylistdataset.videoplaylistit has two columns.how do i make it so that when the user clicks on a cell, in any column, the entire row gets highlighted and not just the single cell
View 1 Replies