|
Hi,
if you ask for processes, you get processes.
a process has zero, one, or more windows; some of them may be open and visible.
If you want windows, ask for windows; that would take P/Invoke and the functions
EnumWindows and even EnumChildWindows in user32.dll
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Dear Luc,
I couldnot able to get you.Can you be brief
Dana
|
|
|
|
|
Hi,
if you never used P/Invoke before, EnumWindows is not good for a first experience !
But if you did, search the documentation; look in MSDN, CodeProject and Google.
also www.pinvoke.net may help you.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Some operation depend on the system date ..
and if user changed it ,,, it's a disadvantage ...
then how can I prevent it ?
jooooo
|
|
|
|
|
you can poll it to see if it has been changed. If you can write code that sets the time, then you can change it back. I am certain you cannot stop a user changing it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Like Christian said, you cannot really prevent the user from changing the time on his/her machine, however, if your app requires some operation that is sensitive to time change, you might want to consider getting the time from an off machine source such as another machine on the network or a time server...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
anyone know why I get this error when I try to deploy my prog on to another pc different from the development pc (and how to solve it)
error:
bindconnetion did not complete successfully, the error message is:
DBMS ADO.NET is not supported in your current installation .
.net framwork is installed and all needed dll are in the startupfolder of the prog
any help is appriciated
|
|
|
|
|
is solved (partially)
apperently I still was a dll short (copied all of them and now it works)
now I still have to search for the correct dll but that's just trial and error I guess
|
|
|
|
|
i have a windows application which dynamicaly generate a pdf file and it will
store data from a table.how to code this?
thanks in advance
|
|
|
|
|
|
You can save Crystal Reports as PDF
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
hi i have datagrid i need to search. i wrote the following code
SqlDataAdapter2.SelectCommand.Parameters("Lis_key").Value = txtnumkey.Text
SqlDataAdapter2.Fill(DataSet21)
If DataSet21.Tables("Property_Mass").Rows.Count = 0 Then
MessageBox.Show("Township not Found")
End If
when i run the code and search with a correct Lis_key field, it gives me the Following Error.
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in system.data.dll
Additional information: An SqlParameter with ParameterName 'Lis_key' is not contained by this SqlParameterCollection.
What is the Problem?
it points to this line
<br />
SqlDataAdapter2.SelectCommand.Parameters("Lis_key").Value = txtnumkey.Text<br />
Thanks
Vuyiswa Maseko
|
|
|
|
|
my first guess would be that you didn't contain an specific sqlparameter in you're sql string
try adding on like this
dim sqlparam as new sqlparameter("@lis_key",value)
sqldataadapter2.parameters.add(sqlparam) 'not entirly shure about this one but it's something like it
hope this helps
|
|
|
|
|
Thanks man , i got a Solution, the sql parameter variable in the adapter was not the same as the on i passed in the Parameter function. but now its working
Thanks
Vuyiswa Maseko
|
|
|
|
|
Hello,
i have a program which i need to control it's GUI, so i will be able to take over the form of the program and can write code which will get me the abillity to press buttons.
Any ideas?
Thank you
|
|
|
|
|
You can just invoke the button's OnClick event handlers. Not sure what your users would think of your app if all the sudden it took over itself
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I think you not understand me ,
for example :
I wants to send command in my program
to click a button in another program (as word ).
thanks
i
|
|
|
|
|
KobiMora wrote: I think you not understand me
No, how about you be a bit more clear. Look back at your original post and you don't make it sound like you want to control another program outside your app
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
It's possible, but notoriously unreliable. It's not easy to do and not for the begginer to tackle.
This involves finding the correct window (all controls are relly windows), getting it's window handle, and sending the proper window messages to it. If you don't understand how Windows windowing system works and the API calls to manipulate it, you're going to find this project just about impossible to do.
|
|
|
|
|
Hi dudes,
In VB6 we could add a child node to a treeview control by specifying a key for an existing node, then a relationship then the new node to be added to the tree. How can i do something like that in vb.net, given that from the add method of the .net treeview there isn't even one thats requiring the parent key and relationship?
Thanks spans in advance
|
|
|
|
|
dim tnode as new treenode("text") ' is the main node
treeview.nodes.add(tnode)
dim tsubnode as new treenode("text") ' is the subnode
tnode.nodes.add(tsubnode)
this should give you 1 main node with 1 subnode
hope this helps
|
|
|
|
|
Thanks TDDragon for your reply,
The thing is I do not know the depth of the tree before-hand and I am adding the child nodes recursively, its a something like an explorer program. So i would need to add whatever child node to any parent whose key i know
|
|
|
|
|
if you go tru it parent node by parent node you can do it like folowing:
dim tnode as treenode()
dim subnode as treenode()
if "check the node you need to add" = "parent node" then
tnode = new treenode("text")
treeview.nodes.add(tnode)
else
subnode = new treenode("text")
tnode.nodes.add(subnode)
end if
remember this will only work if you make you'r treeview parentnode by parentnode
if not (you need to add a node to parentnode1 while you already created parentnode3) then maybe this might be some help
'first create alle parent nodes and give the tag property a key value
'then iterate true you're parent nodes and where node.tag = key add a subnode
for each t as treenode in treeview.nodes
if t.tag = key then
dim subnode as new treenode("text")
t.nodes.add(subnode)
end if
loop
this way will take more time so if possible I would recomend the first way
hope this helps
|
|
|
|
|
Thanks man, used the 2nd one coz i ended up having to 'lazy-load' the tree. thanks spans
|
|
|
|