|
abssoft wrote:
Do you know controls like 'DHTMLedit'?
What part of "Just Google for 'DHTML Edit Control'." is difficult to understand?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You mean that you are using the FindWindow API?.
If I have understood correctly, I should tell you that FindWindow API does not find text in a window, it finds the window itself!
It gets the Caption and Class of the window and returns its Handle.
Tell me if I missunderstood you.
|
|
|
|
|
Thanks for Replying
I am using following API -
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As Long) As Long
Private Declare Function GetWindow Lib "User32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetWindowText Lib "User32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
|
|
|
|
|
These functions are used to find any window and return the title bar text of that window. They will NOT help you in finding any text inside a window.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello, I have a treeview in a vb.net application.
I want to collapse nodes except the present one. How I can do this?
I have obtained that some nodes are collapsed, but the present too, and I don't want this.
Thanks
|
|
|
|
|
Can't undetstand ur question.
Explain it detail with code. So that we can help you.
|
|
|
|
|
If have this code:
I want to cross the treeview for when I select one one, collapse the rest (if are expanded), except the branch of the node that are selected
Dim nodo As TreeNode
For Each nodo In CatalogTree.Nodes
If SelNode.IsSelected Then
If Not SelNode Is nodo Then
nodo.Collapse()
End If
End If
Next
When I execute the application, all the tree are collapsed, but I don't want collapse the branch of the node that are selected.
Sorry for my English, I'm for spain.
Thanks
|
|
|
|
|
You've got the right idea, you just need a little more thinking about the problem. You need to do two things.
First, you have to create a list of nodes starting from the currently selected node and working your way back up the tree till you find the root. For each step up the tree, you'll add this node to your list. Use the current node's Parent property.
Second, the code you posted is almost correct. You can then iterate through all the node, and child nodes if your requirements dictate it, and compare it to the nodes in your list. If the node is in the list, DON'T collapse it. If it isn't in the list, well, you know what to do...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for you reply, but I don't understand very well.
Can you post me the code, please? I have been proving the following thing that I see in this project: http://www.codeproject.com/cs/miscctrl/favoritescontrol.asp[^]
This project are in csharp and I convert some parts to vb.net
Now, I have this
First, one declaration of two points
Private _intX As Integer = 0
Private _intY As Integer = 0
Second, in the click event:
Private Sub CatalogTree_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CatalogTree.Click
Dim objTreeView As TreeView = CType(sender, TreeView)
Dim objNode As TreeNode = objTreeView.GetNodeAt(_intX, _intY)
Dim CurrentNode
Dim CurrentNodeName
Dim CurrentNodeRaiz
If Not objNode Is Nothing Then
If Not objNode.Tag Is Nothing Then
'A URL was clicked
CurrentNode = objNode.Tag
CurrentNodeName = objNode.Text
'RaiseEvent URLClick(Me, New System.EventArgs)
Else
'A folder node was clicked
CurrentNodeRaiz = objNode.Text
'Collapse all sibling nodes so only one folder is open at any given level
_CollapseSiblings(objNode)
'Toggle the folder
If Not objNode.IsExpanded Then
objNode.Expand()
Else
objNode.Collapse()
End If
End If
End If
End Sub
Third, in the mousedown event
Private Sub CatalogTree_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CatalogTree.MouseDown
_intX = e.X
_intY = e.Y
End Sub
and finally, one method for collapse nodes
'By Sergio
Private Function _CollapseSiblings(ByVal aobjNode As TreeNode)
Dim objNode As TreeNode = aobjNode.PrevNode
While Not objNode Is Nothing
objNode.Collapse()
objNode = objNode.PrevNode
End While
objNode = aobjNode.NextNode
While Not objNode Is Nothing
objNode.Collapse()
objNode = objNode.NextNode
End While
End Function
The link of the project that I have seen works good.
But the code that I post don't collapse any node.
What I can do?
|
|
|
|
|
I don't have nay example code, nor do I have the time to write it.
Quit cutting and pasting someone elses code and trying to make it work how you want. If you want it to work, write your own. You'll at least have a much better understanding of how your code works over someone elses.
For a better understanding of how to navigate up a node tree and save the path to the root of the tree, see Creating A Breadcrumb Control[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks for your time.
Finally, I have obtained that I want modifying the treeview click event.
|
|
|
|
|
Hi,
Thx a lot for the previous answer.
For loading a pack of records into comboBox ,which event is best ?
form_load or InitializeComponent.
Could you pls explain it?
regards,
aB
|
|
|
|
|
Definitely on the Load()
InitializeComponent() is called from the constructor, and as the name says, it does construct the form, that means the form is not completely created.
Load() is called after New() .
I use to compare it to the OnInitDialog() handler in C++ Dialog based applications.
so, create whatever you want in the New() , and initialize them on the Load()
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
hi
how i can print a form via vb in a page with size A5
noted, i use this code for print in A4
frmPrintFish.ScaleMode = vbTwips
sWide = 8.5
sTall = 11 ' or 14, etc.
frmPrintFish.Width = twipFactor * sWide
frmPrintFish.Height = twipFactor * sTall
and the varible twipfactor is set to 1440
please give me solution
|
|
|
|
|
I want to know who are opening/update/rename/delete my file thru LAN when my folder are open network sharing.
I need to know how to write this code for me to trace out who making modify of my file.
|
|
|
|
|
As far as I can tell, you can't do this in Windows. I haven't been able to find a "WhoHas" utility nor can I find any Win32 API's that will even hint at this functionality.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know that. My method is use "FileSystemWatcher" to know which file was modify. And hope at the same time can know who modify it thru LAN.
|
|
|
|
|
There's no way to do it with the FileSystemWatcher either. All you'll know is one of the people attached to that server modified the file, but not which one of them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your help.
So, have any others method to do that job? May link with IPhost, or any others? Because I not familier with the IP networking development. Or may be can use host together with the timer? Means when the file was modify, then scan the LAN IP address and know which IP are in the folder?
|
|
|
|
|
There is no association between Files/Folders and IP's or user ID's. THere is no way to connect the two to get the information you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks a lot.
|
|
|
|
|
Hi All!
I wrote a abstract class in VB.net and just define 4 methods than I inherit this class to derived class B and also with CLass C. In Class B I Implemented all 4 methods but in Class C I want to use just 2 methods. I know this is possible that just give complete defination of 2 methods that i want to use and leave empty rest of them.
When I make an object of Class C and try to access it s methods then it shows all 4 methods, I wana hide it s 2 method, which are not complety define in Class C.
any idea???
Thanks
|
|
|
|
|
It sounds like two of the four methods need to either be not abstract, or more likely defined in an interface that only class B uses. You definately cannot hide methods from a base class on a class by class basis, that would be ridiculous.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
i use flat file system in my vb.net project.
when i load data ,say CustName to a comboBox i want to have the corresponding CustID somewhere (like selecteindices.item in Listview control) so that i can catch that Id when user select a particular CustName.
1.Is there any property available in ComboBox to store a pair values.
2. How to override a .net windows control's property that is overridable.
3. Is it possible to override comboBox.items.item property ? how ?
Regards,
aB
|
|
|
|
|
baste wrote:
Is there any property available in ComboBox to store a pair values.
Yes, a combobox can store any value you like. Just set the DisplayMember property to be a property on the class you're adding, so that it knows where to look for the string to display.
baste wrote:
How to override a .net windows control's property that is overridable.
Derive a class from the control class, in this case, ComboBox. However, you don't need to in this case.
Christian Graus - Microsoft MVP - C++
|
|
|
|