|
System.Web.DataVisualization.dll i need this file so if you have this file then please upload .
Thank you in advance.
|
|
|
|
|
The file is part of a set, I suggest you install the entire package.
MS Chart Controls[^]
Next thing to do is to pick up a sheet of paper, and to title it "documentation". Jot down all the files that you're referencing, why they were needed, and where to get 'em.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hello !
i'm working on a vb.net 2010 /SQL server 2008 / Entity Framework
i have a bound datagridview with 3 columns , and inside datagrid i have an unbound combobox column that have some numbers as items (1,2,3).
if i try to select a value from unbound combobox , after leaving the cell the value on combobox is back to default value.
what can i do ?
modified 16-Jul-12 21:26pm.
|
|
|
|
|
Is this an Asp.Net project? One idea would be to make it a bound column and create a layer of indirection for the data source by using a custom class that takes into account the extra column. Another would be to check out the viewstate, maybe? That's assuming that it is an ASP.net project.
|
|
|
|
|
HI I am not expert in visual, but i try to make a program to search text in multi excel sheets. My setup is like this
I have one textbox1(to write the word i want to search for)
one search buttom
Listbox1(To add files strings for the search)Working good
buttom for clear all,clear selected,and add also working here
Listbox2(To see the result when i press search.) Not working
buttom for clear all,clear selected,and add also working here(working)
My problem is that i have searched all over to find the code for the search buttom.
I have tried many exsamples, but it always dont work.
Function is that i will add files to Listbox1(one or more)
then i textbox1 i will type the search word.
In the search buttom i press search
And then in Listbox2, The result will come out in strings(would like if i can open these string also, or see th formula from the excel sheet)
Would highly appriciate some, who have solved this or have a working solution.
I am not expert, so a full code would be appriciated.
Thanks in advance
Sincerely
abjac .
|
|
|
|
|
abjac@ wrote: Listbox2(To see the result when i press search.) Not working You need to explain what "not working" means if you expect people to be able to make useful suggestions to help you.
|
|
|
|
|
Sorry that was maybe the wrong expression. I made this setup and the search bottum(button1), when i press it it always comes up with and error. But the fact is that the code comes up with this error.
Could not find a part of the path 'C:\Documents and Settings\Alancecille\Desktop\listbox1.text'.
DirectoryNotFoundException was unhandled
But this is the path i add in listbox1 with out any problems. So i dont know why it can not find it.And also i dont know if i can use this code. The idea is to add the files(xls) i want to search in in Listbox1 and then then type the search word in textbox1, and when i press search, it shall find all strings(or formula) in the excel sheet, which have this word included. Please have a look at below code and come with some suggestions.
Thanks in advance
abjac
This is my code and as you can see the code for bottun1 is the one which cause the error, but also i think this maybe is not correct.
Imports System.IO
Public Class Form1
Dim streamer As IO.StreamReader
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim open As New OpenFileDialog
Try
open.Title = "Open Excel Sheets"
open.FileName = "xls"
open.Multiselect = True
open.Filter = "xls files |*.xls"
If open.ShowDialog = Windows.Forms.DialogResult.OK Then
For Each file As String In open.FileNames
ListBox1.Items.Add(file)
file = False
Next
End If
Catch ex As Exception
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox1.Items.Remove(ListBox1.SelectedItem)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
ListBox2.Items.Clear()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
ListBox2.Items.Remove(ListBox2.SelectedItem)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim filenames = My.Computer.FileSystem.FindInFiles("listbox1.text", "textbox1.text", True, FileIO.SearchOption.SearchAllSubDirectories)
For Each filename As String In filenames
ListBox2.Show()
Next
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim SaveFile As New SaveFileDialog()
SaveFile.Filter = "Multi search in Excel |*.xls"
SaveFile.FileName = "xls"
SaveFile.ShowDialog()
Dim WriteFile As New System.IO.StreamWriter(SaveFile.FileName)
Dim Count As Integer = ListBox1.Items.Count - 1
For i As Integer = 0 To Count
WriteFile.Write(ListBox2.Items.Item(i) & ";") 'the “;” is used to separate the items
Next
WriteFile.Close()
End Sub
End Class
modified 16-Jul-12 16:44pm.
|
|
|
|
|
My.Computer.FileSystem.FindInFiles(directory:= As String,containsText:= As string)
You are giving a constant text
Dim filenames = My.Computer.FileSystem.FindInFiles("listbox1.text", "textbox1.text", True, FileIO.SearchOption.SearchAllSubDirectories)
Your dir is something like C:\dir1\dir2
Your text must be without quotes
Jan
|
|
|
|
|
The first thing to do whenever a method throws an exception or returns an error is read the documentation[^] to check that your parameters are correct. In the above code you have
Dim filenames = My.Computer.FileSystem.FindInFiles("listbox1.text", "textbox1.text", True, FileIO.SearchOption.SearchAllSubDirectories)
and as you can see, parameter 1 is not a directory path so it will fail.
|
|
|
|
|
Hi My idea was that it should read,,, "Listbox1.text",,, and the path i add there and the same with the search word
read in this "textbox1.text" and the word i type there
I dont know how to do this, but i think if i put example the directory path directly in here and the search word after it would work. But how do i make this so it will search in the directory, what i add in Listbox1.text. ??
And search there for the word i type in Textbox1.text??
So i am sure i miss some code for make this to work. If any suggestions, it would be nice.
abjac
|
|
|
|
|
You just need to replace the strings in your method call with proper parameters which you initialise from the listbox [^] and the textbox [^]. Something like:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim litem As ListBoxItem
Dim dir As String
litem = listbox1.SelectedItem
dir = litem.Content.ToString
Dim filenames = My.Computer.FileSystem.FindInFiles(dir, textbox1.text, True, FileIO.SearchOption.SearchAllSubDirectories)
|
|
|
|
|
HI Thats great i will try when i come home tonight, still working here. But i will try and let you know if its working. Thanks for now abjac
|
|
|
|
|
HI I tried this code but its not working, i have tried different ways to avoid the error but wit no luck
The error is in this line "Dim Item As ListBoxItem"
Error 1 Type 'ListBoxItem' is not defined.
Try also to have a look to below code where i want to see the the result in Listbox2. Is this one ok you think?
Please have a look thanks
abjac
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Item As ListBoxItem
Dim dir As String
Item = ListBox1.SelectedItem
dir = Item.Content.ToString
Dim filenames = My.Computer.FileSystem.FindInFiles(dir, TextBox1.Text, True, FileIO.SearchOption.SearchAllSubDirectories)
For Each filename As String In filenames
ListBox2.Show()
Next
End Sub
|
|
|
|
|
HI I tried it and it didnt work get this error
'ListBoxItem' is not defined.
But now i am also not clear of if this is correct. I think this is for search in a folder but i want to search in an excel sheet after the word and display the info in Listbox2 where the word is found in the excel file
Any suggestions?
abjac
Dim Item As ListBoxItem
Dim dir As String
item = ListBox1.SelectedItem
dir = item.Content.ToString
Dim filenames = My.Computer.FileSystem.FindInFiles(dir, TextBox1.Text, True, FileIO.SearchOption.SearchAllSubDirectories)
For Each filename As String In filenames
ListBox2.Show()
Next
|
|
|
|
|
abjac@ wrote: 'ListBoxItem' is not defined.
Check the MSDN documentation[^].
abjac@ wrote: I think this is for search in a folder but i want to search in an excel sheet
Then I wonder why you are using FindInFiles .
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Well i am not expert, but thought FindInFIles was the solution, I want to find a word in a excel file. But please if you have any other solution, would be great to hear about
Thanks in advance
abjac
|
|
|
|
|
abjac@ wrote: but thought FindInFIles was the solution
It may well be the solution, but it depends on what you are trying to achieve. The method returns a list of filenames that contain the text you are searching for, if that is what you are trying to do. If you just need to find some text in a specific file then you may need to consider alternative options.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
What steps are necessary here:
Would like to write a program that takes over the mouse and keyboard so that another gets it's input from my program i.e. automated input from my program.
I would have to teach my program where all of the mouse click buttons are so my program could mouse move to these buttons, click, and enter the text as if it was human input.
Darryl Gschwind
|
|
|
|
|
Darryl Gschwind wrote: write a program
Is there any particular reason that you want to write a program to do this instead of using an already existing solution? I have used Autoit3[^] on many occasions to performs those very functions.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
The program would have many other duties to perform before it determines the mouse and keyboard entry.
My program is writing another program interfacing to a development platform.
A scrip would not be a solution.
It has been a log time since I have written VB code and it was VB6. Now I have access to VS2010
|
|
|
|
|
i need program in visual basic that disable all usb Ports
|
|
|
|
|
aliali74 wrote: i need program
And? Are you looking to hire someone to write it for you?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
It doesn't take a program to do that. The registry value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\UsbStor
stores that function.
Another approach is to prevent rights to \Inf\Usbstor.pnf and \Inf\Usbstor.inf files.
|
|
|
|
|
i had created a connection to the SQL Express database
but not able to create data-bound controls on the form
|
|
|
|
|
Do you have any error message?
it can be a million things why it aint working...
|
|
|
|