|
Hi,everyone! I used a treeview control in my application, I wanted to make treenodes like a href ,for example ,when my mouse move over it ,the font and color of treenode changed . I've done this in mousemove event. The code was like this
Private Sub treeQiaoTi_MouseMove1(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles treeQiaoTi.MouseMove
Dim info As TreeViewHitTestInfo
info = treeQiaoTi.HitTest(e.X, e.Y)
If (info.Node IsNot Nothing And m_nodePre IsNot info.Node) Then
info.Node.ForeColor = Color.Violet
info.Node.NodeFont = New Font("微软雅黑", 10.5, FontStyle.Underline)
If (m_nodePre IsNot Nothing) Then
m_nodePre.ForeColor = Color.DarkBlue
m_nodePre.NodeFont = New Font(info.Node.NodeFont, FontStyle.Bold)
End If
m_nodePre = info.Node
End If
End Sub
But now, my question is ,when mouse move over unchecked treenode, I don't want them change color and font; I means how could judge treenodes whether checked or not ?
Please give me some help and suggestions !Thx a lot !
|
|
|
|
|
Every TreeViewItem has a IsSelected property. I guess you could use that to check if that particular node is checked or not.
|
|
|
|
|
Hi,Abhinav,I've done what I wanted with this judge:
If e.Node.Checked Then
First judge the treenode whether checked or not, if it checked, changed its color!
Still thank you for your suggestion!
|
|
|
|
|
Hi all.
I am using form.
there i want a tab control having 2 tabs.
In that tab control i want to add two forms in 2 tabs.
how to add a tab control in VB6.0 and how to use it?
|
|
|
|
|
You would need a reference to the microsoft tabbed dialog control (TabCtl32.ocx). Right click components -> "Components..." and add it in the Component dialog.
Good luck!
PURPOSE: Delays program execution until designated condition is indicated.
|
|
|
|
|
OK I know that but how to use it.
I want to add two forms to the tab control.
how to do this?
Can you give me help?
|
|
|
|
|
if u want to add controls in the tabs you very well can. But can you please elabrate on the point about adding 'two forms'. i am sure i can help you with this if u could tell me that.
do you mean that u have 2 forms and want it added it in a tab?
|
|
|
|
|
Maybe this could work:
Dim frm As new Form1
frm.TopLevel = False
frm.Parent = tabMain.TabPages(0)
frm.FormBorderStyle = bsNone
frm.Show()
Good luck!
PURPOSE: Delays program execution until designated condition is indicated.
|
|
|
|
|
You cannot add a form inside a Tab control
|
|
|
|
|
it sounds to me like you should be adding two frames, build all your controls on to the correct frames and then make one frame visible and the other invisible invisible when the user clicks on the relevant tab
|
|
|
|
|
Hopefully can give enough information to get pointed in the right direction.
Wrote a fairly extensive class and placed in .dll for use in a client application AND my web service. I declare the class as a one dimensional array and then try to pass into the web service; however, when I set client.class = ws.class I get a compilation error indicating that ws.class cannot be converted to client.class.
I've tried CType and DirectCast, but both complain of the same thing. Do I need to write a conversion routine in my code to parse each node of the class? There must be an easier way....
<br />
<br />
(.dll)<br />
<br />
<br />
public class Address<br />
private _x as string<br />
private _y as string<br />
get/set for x and y<br />
<br />
public sub New()<br />
_x=""<br />
_y=""<br />
end sub<br />
end class<br />
<br />
<br />
(client)<br />
<br />
dim a() as Address<br />
... read data and populate a()<br />
<br />
dim ws as new webservice.service<br />
ws.validate(a())<br />
<br />
<br />
(web service)<br />
<br />
public sub validate(byval b() as Address)<br />
<br />
<br />
<br />
When I try to run this I get a cannot convert client.a() to webservice.b() even though they implement the .dll with the same class.<br />
<br />
I don't understand what serialization does for an array, so I'm off to study how that will effect these calls. In the mean time, if someone could point me in the proper directly, it would be greatly appreciated.<br />
<br />
<br />
<br />
<br />
<br />
|
|
|
|
|
One way to accomplish this is to put the class in a dll that both sides (client/server) reference.
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I did, both client and web service use the dll. That is what has me perplexed. The message will read module1.class cannot be converted to module2.class.
|
|
|
|
|
If you using the same dll, then why is it saying different names for the class? class1 in the client is the same as class 1 in the service.
so just to clarify
you have a dll called "mysharedclasses" you webservice has a copy that it references. your client has a copy for it to reference. correct so far?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
correct. This is the exact message:
Value of type '1-dimensional array of PNDataMap.AddressStructure' cannot be converted to '1-dimensional array of CardProgramNG.ValidateService.AddressStructure' because 'PNDataMap.AddressStructure' is not derived from 'CardProgramNG.ValidateService.AddressStructure'.
|
|
|
|
|
Of course PNDataMap.AddressStructure and CardProgramNG.ValidateService.AddressStructure are different types, even their namespaces are different. If they were the same type, the whole namespace mechanism wouldn't make any sense at all.
|
|
|
|
|
which begs the question, how do I pass a class through to a web service?
|
|
|
|
|
how do you serialize, and later deserialize some object? by using the same type, i.e. the same assembly, for both operations, whether they are executed by one or more processes. A web service doesn't change that. If one party has set the type, the other party has to agree on using the same type.
|
|
|
|
|
Good question - how do you serialize the object? As stated in the opening question, I have never had to serialize anything - meaning no experience.
|
|
|
|
|
Then start by studying the subject. Read the relevant chapter in your C#/VB.NET book, then go and look for some of those excellent CodeProject articles, and finally apply what you have learned. You're probably too old for spoon feeding anyway.
|
|
|
|
|
Hi Friends,
I am creating an xml file with excel vba. Now I wanted to add attributes to the xml child nodes..Please kindly help..
Thanks in advance
Regards,
Priya.
|
|
|
|
|
One option would be to use MS XML Core Services COM.
Add a reference to the MS XML V6 library from the Tools Reference menu in the VBA editor.
You can then refere to the MSDN documentation on how to use this with VB.
http://msdn.microsoft.com/en-us/library/ms763742(v=VS.85).aspx[^]
The example below will load an XML file from hdd.
Public Sub editXML()
Dim xmlfile As New DOMDocument
xmlfile.Load ("c:\users\dave auld\desktop\test.xml")
End Sub
|
|
|
|
|
Hi
Thanks. WIthout using XNL COM, I tried the following by directly giving in the tag line itself.
/Policy_Years Attribute=""1,1,0,1,16711680,2,0,0,1,16711680,0,0,0,0,0,0.5,10,Arial,1"" Attribute2=""""/Policy_Years-"
The above line I am spliting with /, then the first tag will be
<policy_years attr....="">
<policy_years-1>10
But when i give attribute like above I am getting error:
A name contained an invalid character. Error processing resource 'file:///D:/PIMSlite/Output/PolicyLocation.xml'. Line 15,...
</Policy_Years Attribute="1,1,0,1,16711680,2,0,0,1,16711680,0,0,0,0,0,0.5,10,Arial,1" Attribute2="">
---------------^
Is any error in the line where I have specified Attribute..
Thanks again.
Regards,
Priya.
|
|
|
|
|
You don't put attributes in the closing tags, you put them in the opening tag;
<tag attribute="some value">tag value</tag>
also, if you look at the first line you have 2 double quotes which is not valid.
Dave
<i>Don't forget to rate messages!</i><br><strong>Find Me On:</strong> <a href="http://www.dave-auld.net/" target="_blank">Web</a>|<a href="http://www.facebook.com/dave.m.auld/" target="_blank">Facebook</a>|<a href="http://www.twitter.com/daveauld/" target="_blank">Twitter</a>|<a href="http://www.linkedin.com/in/daveauld" target="_blank">LinkedIn</a><br>Waving? dave.m.auld[at]googlewave.com</br></br>
|
|
|
|
|
Hi,
Thanks for your reply.
Actually I am keeping attribute only in opening tag and also i am keeping "" since in the code it is expecting.
If i simply give <tag attribute="">value
it is giving error.It is not accepting from code.
Please help.
Regards,
Priya.
|
|
|
|