|
That will obviously work, but I understood that he wants to find application B, no matter where it was previously opened from
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
OP wrote: i ve got a problem, where i have two asp pages say "A" and "B".
"A" and "B" are two differnet applications running on two different browsers on a same PC.
Based on the above, I surmised that the apps(pages) are running on the same PC. Still, I might be wrong in my understanding.
Shreekar
|
|
|
|
|
Hello,
I have a datagridView and I have a text box, I would like the user to enter some letter that will narrow the search down. For example in they type s as the first letter, it will find all the words that begin with s in a column in the datagridview. Moreover, if they type st then it will narrow all the words even further.
I am using typed dataset and have it bound to the datagridview.
I have done this in order versions of visual studio by passing a query using the like keyword. But in 2005 using typed datasets and datagridView is there a more automated way to do this.
Many thanks for any suggestions,
Steve
|
|
|
|
|
hi steve,
following code may help u.
' ''-------------------Selecting searchText
Private Sub txtSearchEname_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtSearch2.KeyPress
Dim strSearch As String
Dim i As Integer
If txtSearch2.Text = "" Then
Exit Sub
End If
strSearch = txtSearch2.Text
If Asc(e.KeyChar()) = 13 Then
For i = 0 To DgvEmpList.RowCount - 1
If (UCase(Trim(DgvEmpList.Item(2, i).Value)) Like "*" & (UCase(Trim(strSearch)))
& "*") Then
DgvEmpList.Rows(rowSelected).Selected = False
DgvEmpList.Rows(i).Selected = True
rowSelected = i
End If
Next
End If
End Sub
priya
|
|
|
|
|
Hello,
Thanks a for your answer.
A better method is to use the bindingsource and set the filer. e.g.
<br />
BindingSource1.Filter = string.format("{0} LIKE '{1}%'",me.cboSearchText.Text,me.txtSearch.text)<br />
This should be in the text changed event of the text box.
Steve
|
|
|
|
|
hii steve,
good code,
but will u thell Please, wht is cboSearchText?
& wht more i have to write for bindingSource?
Thanx.
--Regards Priya
priya
|
|
|
|
|
Hi Priya,
There are 2 methods using the datarowview of the bindingsource row filter property.
<br />
dim drv as datarowview<br />
drv = directcast(me.grdMyDataGrid,datasource, datarowview)<br />
drv.rowfilter = string.format("{0} LIKE '{1}'%", cboSearch.text, txtsearch.text)<br />
There is also another method where you can use the datasource default view property, there you can also set a filter.
If you need any more help, just reply to this i will give you more sample code,
Steve
|
|
|
|
|
(VS.net 2003) I need help with an application that launches certain events when the user presses certain keys/key combinations.
The only thing I can't do in this program is determine what keys/key combinations were pressed and if the certain key was pressed than i want to launch a certain event.
For instance if ctrl + Alt + C were pressed than the program would catch the key combination pressed and then launch a corresponding event.
Any help would be much appreciated. Thankyou!
|
|
|
|
|
There are three events, KEyDown, KeyPress, and KEyUp. Your app will only get them if it has input focus. A system wide hook can give you any key press that occurs.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
The header would contain both regular charaters and unicode characters (triangle sorting indicator) in this case.
|
|
|
|
|
I am having problems with getting my hands on a copy of visual basic and was wondering if anyone could open a project for me and copy paste the source code into a message because I need it for computer science class.
Thanks a million
|
|
|
|
|
Just open the files in notepad and get the code out from there.
|
|
|
|
|
Ok i just tried that and it works for the files that I have the forms of, but for my file Projectcrypt.vbp what you suggested does not work. Thanks a million I would have never thought of that
-- modified at 19:42 Wednesday 31st January, 2007
|
|
|
|
|
I am not sure.. it has been a while since I used VB6 (I think you have a VB6 project there) but I think that file is nothing more than a project index file and does not contain any code, just a listing of all the other files in the project and some project settings.
Yup....
Look here...[^]
|
|
|
|
|
So if all I have of my program is this project, it is impossible to recover the code?
|
|
|
|
|
No, your code has to be there, and it's bound to just be text.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
What if I have the .exe version of the program? I doubt it, but is there a way to extract the code from there?
|
|
|
|
|
No, once it's an exe, for VB6, then it's been turned to code. Even in .NET, the code is gone, only an approximation can be retrieved.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
I posted recently regarding printing text.
Basically, I am trying to put a global int value combined with some predefined text, simple as that, and print it (for a record of recording something).
I wanted to do it on a word document, but this does not seem easy at all.
i was reading up on this and it looks like I could print preview something (I know this works for databases).
Anyone know how i could do it for my method?
Cheers
|
|
|
|
|
I am working in vs2005 and have a project to create a process where i can monitor applications on a given PC.
1- check if a certain application (third party) is running on the PC.
2- If the application is running, check if the user is using it (clicking on it, typing, paging ...etc)
3- If the application is not being used by the user for longer than x number of minutes, close it.
Using the process class i am ble to check for #1 above, i can also close an application, however, i still can not tell if the user is using the application or not and when was the last time they used it.
Please Help!!
Thanks
rnamro
-- modified at 16:13 Wednesday 31st January, 2007
|
|
|
|
|
Just an idea - I dont know how you can do it - but if the target application is processing any windows messages related to keyboard/mouse, then I would say it is handling user input of some sort.
Another way is to look at what that app is supposed to do in its normal work and check whether it is doing it.
Just some ideas.
Shreekar
|
|
|
|
|
I have two subs with the same set of code and I want to combine them into one by creating a function and passing the variables. Here are the two subs code:
Private Sub ImportMO()
Dim dtTable As New DataTable
Dim row As DataRow
Dim DtReceived As String = vbNull
Dim DtBackorder As String = vbNull
Dim DtCanceled As String = vbNull
Dim customername As String
Dim status As String = vbNull
Dim SoNum As String = vbEmpty
Dim Conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Scanning Files;Extended Properties=""Text;HDR=No;FMT=FixedLength"""
Dim SQLstr As String = "SELECT * FROM lsprint_MO_temp.txt"
Dim da As New OleDb.OleDbDataAdapter(SQLstr, Conn)
Private Sub ImportMS()
Dim dtTable As New DataTable
Dim row As DataRow
Dim DtReceived As String = ""
Dim DtBackorder As String = ""
Dim DtCanceled As String = ""
Dim customername As String
Dim status As String = vbNull
Dim Conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Scanning Files;Extended Properties=""Text;HDR=No;FMT=FixedLength"""
Dim SQLstr As String = "SELECT * FROM lsprint_MS_temp.txt"
Dim da As New OleDb.OleDbDataAdapter(SQLstr, Conn)
In the connection string, I want to pass a variable for the source and in the sql string I want pass a variable for the files.
Here is what I have so far,
Public Function ImportFeed(ByVal OrderFile As String, ByVal OrderFilePath As String) As String
End Function
I am lost from here. I know what I want to do but don't know how to do it.
Can anyone help me with this function?
|
|
|
|
|
Seems straightforward to me
Dim dtTable As New DataTable
Dim row As DataRow
Dim DtReceived As String = ""
Dim DtBackorder As String = ""
Dim DtCanceled As String = ""
Dim customername As String
Dim status As String = vbNull
Dim Conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Scanning Files;Extended Properties=""Text;HDR=No;FMT=FixedLength"""
Dim SQLstr As String = OrderFile
Dim da As New OleDb.OleDbDataAdapter(SQLstr, Conn)
Your data sources are the same, but if they are meant to be different, you can just cut that bit out of the string, and throw the variable in.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
But how do I handle the orderfile variable as far as setting it equal to the two text files lsprint_MO_temp.txt & lsprint_MS_temp.txt?
|
|
|
|
|
I don't understand. You pass it in. In quotes. If you want to always do select *, then you do this:
Dim SQLstr As String = "SELECT * FROM " & orderFile
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|