|
|
Hi,
I try to use something else to display message that looks like tooltip.
I create a label with some message to indicate why its attached control (not real attach) is disabled, set visible = false,
I capture the mouse move event, when mouse move to the attached control and also it's disabled, the label with message will be visible, when the mouse move out of the control, the message will be hidden.
When I create the control (like textBox) directly in form, and capture Form_MouseMove() event, it works fine. But if I create a TabControl in the form and then a groupbox on the tabpage, then put the textBox control in the groupbox, now I cannot get the control when mouse move by :
ctrl = Me.GetChildAtPoint(e.Location)
Then ctrl is always Form, or tabControl. Why??
|
|
|
|
|
Is it possible to get friend members thru reflection? I tried :
MyForm.GetType.GetFields()
MyForm.GetType.GetFields(BindingFlags.NonPublic)
MyForm.GetType.GetFields(BindingFlags.NonPublic & BindingFlags.GetField)
MyForm.GetType.GetFields(BindingFlags.NonPublic & BindingFlags.GetField & BindingFlags.Instance)
None succesful.
|
|
|
|
|
I believe, internal is C# equivalent for friend in VB. Since I do not do VB, I tried in C# and following binding flags work fine for me:
BindingFlags.NonPublic | BindingFlags.Instance
|
|
|
|
|
Hi, dear all,
I have a treeView control in MDIcontainer vb project.
In some reason, in specific case, I need to disable some of the tree node (make is gray and unclickable) based on user input. I didn't have checkbox in tree node.
Is it possible to do it?
Thanks!
|
|
|
|
|
Clearing all child nodes makes it unclickable, you could remove the child nodes from the node you want to disable and set the backgroundColor property to gray.
When you enable the node again you can set the childnodes again and remove the gray color.
But this is probably not the best solution....
modified on Friday, August 13, 2010 8:39 AM
|
|
|
|
|
Thanks.
Can I hide a node?
|
|
|
|
|
If you write the hide method yourself. Not with the 2.0 Treeview object...
|
|
|
|
|
|
Today, while acquainting myself with this language I declared a static variable in a function, but I messed up slightly...
I wrote dim static rather than static dim and the compiler (VBC, V3.5) didn't throw an error, but also didn't produce any output.
They appear to have fixed it in V4.0 .
|
|
|
|
|
PIEBALDconsult wrote: dim static
Didn't Notepad show a squiggly?
dim static and static dim work equally well for me in Visual Basic 2008 Express.
|
|
|
|
|
Luc Pattyn wrote: Didn't Notepad show a squiggly?
I'll have to check; I use EDIT, and it didn't.
|
|
|
|
|
I tried edlin and it did not show a squiggly.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
No squiggly on vi either!
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
You don't need the Dim portion at all if you're declaring a Static variable.
|
|
|
|
|
Dave Kreskowiak wrote: don't need the Dim
I know, but I like to try things out and see what happens. You never know what might work if you don't try.
|
|
|
|
|
The following are equivalent:
Dim Static x As Integer
Static Dim x As Integer
Static x As Integer
"Dim" just tells VB it's a variable - if any other modifier is present, VB allows you to omit the "Dim".
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
Hi, dear all,
I create a variable as following
Dim xx as double
at now, it will return true if I check as following since I didn't initialize it.
if xx = Nothing then ... end if 'RETURN TRUE
But the problem is that after I initialize it to cdbl(0), it still return true while check Nothing.
xx = cdbl(0)
if xx = Nothing then ...end if ''''STILL RETURN TRUE
so how can I tell the difference for a variable initialized or not?
Thanks!
|
|
|
|
|
You can't. Not for a simple type. They're automatically initialized to zero as soon as you create them, so for a double, Cbl(0) and Nothing are the same thing.
If you're looking for an error code, or a way to ensure that it receives a value, you could just initialize it to double.NaN (NaN = Not a Number, the same result you get when dividing by zero). Then just test whether double.IsNaN(xx)
|
|
|
|
|
Ian,
Thank you very much, I will try it.
|
|
|
|
|
This is what nullable value types are commonly used for:
Dim xx As Double?
or:
Dim xx As Nullable(Of Double)
and then check if it's been assigned:
Dim isAssigned As Boolean = xx.HasValue
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
Thanks, David, it's very useful.
|
|
|
|
|
Don't know where to post the Question for Crystal Report so putting it here
How to Fix/Freeze Height of Detail section in Crystal Report from within crystal report.
SOFTDEV
Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.
modified on Wednesday, August 11, 2010 9:15 AM
|
|
|
|
|
I'm a bit confused at your question.
A detail section of a report will grow to accomodate as many records that are being printed. So how can you "fix or freeze" something like that ? If 1 record is printed is will take up less space than 1,000 records.
Can you post a more detailed explanation ?
|
|
|
|
|
Thank you so much for the post its a fixed format like an invoice/ bill which will be a single page thats why i want it as fix . From front end i can do it easily but wanna know how to do it within crystal reports.
Any how i have done it but through some other means/ways like making a sub report and fixing its height but i thought that if there would be a more better way to achieve it
SOFTDEV
Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.
|
|
|
|