jnsprad
asked on
How do i obtain the text from the search bar that is located in syspro's quotation window.
Hello once again!
Im attempting to master a search query here with syspro, and without having any reference material Ive resorted to the web for help. Im Building a customized Pane, with the pane it pulls Quote num, jobs available, Quotation date, real wip value, and the number of items quoted. I got part of the view working, but what id like to setup is to be able to search for a specific quote number, or quotation date, or even by job Number. I see that Syspro already has a search bar at the top of the page, but im not sure how i would find out whats in it progmatically. is there a handle that is set with the value of the text box? or is it set to do something else and manually refresh all the panes with the data?
Im attempting to master a search query here with syspro, and without having any reference material Ive resorted to the web for help. Im Building a customized Pane, with the pane it pulls Quote num, jobs available, Quotation date, real wip value, and the number of items quoted. I got part of the view working, but what id like to setup is to be able to search for a specific quote number, or quotation date, or even by job Number. I see that Syspro already has a search bar at the top of the page, but im not sure how i would find out whats in it progmatically. is there a handle that is set with the value of the text box? or is it set to do something else and manually refresh all the panes with the data?
ASKER
I understand your api command. But what i dont get is the · lpClassName what is that supposed to be? and how would i obtain that information from the other window? I think your on to something though, if i could get its handle though, Syspro doenst use .net frame work (;-() so i cant use the.text to get the information inside of it... how would i go about reading the handle....the code syspro has is extreemly dull compared to .net.. i cant even use one line to define a variable. in .net i could use
just for refference, the code im using to find the windows handle is:
dim variable as string = "Something"
, in this i have to use:dim varriable
varriable = "anyhting here, string, int, long anything"
just for refference, the code im using to find the windows handle is:
Public Class Form1
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim name As String = FindWindow(, "Job Query")
Messagebox.show(name)
End Sub
End Class
To start with, change the Type of 'name' from String to Long as that is that FindWindow Returns. Second use vbnullstring. See this code. Does the messagebox return a 'Number'?
Sid
Public Class Form1
Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim name As Long = FindWindow(vbNullString, "Job Query")
MessageBox.Show(name)
End Sub
End Class
Sid
ASKER
Sorry for the log timed reply, work is getting busy. Your code does return a number. although its not a static number... Changes everytime i click the button
>>>Your code does return a number.
That's good :)
>>>Changes everytime i click the button
Yes, It will.
Let me write the next part and post it back. Will be able to do it in the next couple of hours as I am stepping out for sometime :)
Sid
That's good :)
>>>Changes everytime i click the button
Yes, It will.
Let me write the next part and post it back. Will be able to do it in the next couple of hours as I am stepping out for sometime :)
Sid
ASKER
bump?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have had Syllogist walk me through the procedure. I wasnt able to successfully able to gather the item due to multiple programming languages being used to produce the application. Ticket closed. Point awarded
ASKER
Can be applied to any other programs as well..
Logic
Use FindWindow API to get the handle of the window using it's caption.
Enumerate Child windows (even textbox is window) and get it's handle.
Sid