|
how to put tooltip on the datagrid column header and also on cell of that column using vb.net 2003? plz help if anyone knows.here datagrid is bound at runtime.
|
|
|
|
|
Try to post your Query only once.
For putting the tooltip on each cell, try the MouseMove event of the datagrid. Enter the Required ToolTip there..
Hope this helps..
The name is Sandeep
|
|
|
|
|
In the grid's Mousemove Event Use this code to display the contents of Cell as tooltip
Hope this helps
dim str as string = ""
Dim pt As Point = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = gridName.HitTest(pt)
If gridName.VisibleRowCount > 0 Then
Dim bmb As BindingManagerBase = frm.BindingContext(gridName.DataSource, gridName.DataMember)
If hti.Row < bmb.Count And hti.Type = DataGrid.HitTestType.Cell Then
str = gridName.Item(hti.Row, hti.Column) ' Or the required tool tip
Else
str = ""
End If
Else
str =""
End If
if str <> "" then
ToolTip1.SetToolTip(sender, str)
|
|
|
|
|
how to put tooltip on the datagrid column header and also on cell of that column using vb.net 2003? plz help if anyone knows.
|
|
|
|
|
if i want to create a button component, i can do it by inherting the button class .but if i want to create a component with two buttons in that how can i do that?
-- modified at 7:47 Tuesday 26th June, 2007
|
|
|
|
|
|
pretty easy
just make a UserControl project
or add a class inherited from UserControl
A.E.K
|
|
|
|
|
Hi
If you inherit button then you won't get design time of component,
hence you use without inheritance, drag drop button on your usercontrol and code accrodingly.
Or
Inherit Button and draw two button in runtime.
Which ever suits you the best
Regards & Wishes
Navneet Hegde
Nashik(City Of Pilgrimage)
Develop2Program & Program2Develop
|
|
|
|
|
Hmmmm I know this is a forum for VB/VB.Net and both VBScript and C# are neither of these but I don't know where else to ask
Is there any chance some one could convert this code for me. Ideally to C# but to VB.Net would be fine (aslong as you don't cheat and use a function from the VB lib's in the BCL's ).
Function MyGregorianDate(l_Val)
' **********************************************************************************
' Description : Returns a date from a property tag in Outlook properties
' Arguments : <l_val> The VB number to convert
' Created : 03/02/2007
' Version : 1.0
' **********************************************************************************
Dim l_FracSecs
Dim l_RemSecs
Dim l_Secs
Dim l_RemMins
Dim l_Mins
Dim l_RemHours
Dim l_Hours
Dim l_RemDays
Dim l_Year
Dim l_RemDays2
l_FracSecs=((l_val/10000000)-INT(l_val/10000000))*10000000
l_RemSecs=l_Val/10000000
l_Secs=Round(((l_RemSecs/60)-INT(l_RemSecs/60))*60,0)
l_RemMins=Int(l_RemSecs/60)
l_Mins=Round(((l_RemMins/60)-INT(l_RemMins/60))*60,0)
l_RemHours=INT(l_RemMins/60)
l_Hours=Round(((l_RemHours/24)-INT(l_RemHours/24))*24,0)
l_RemDays=INT(l_RemHours/24)
l_Year=1601+INT(l_RemDays/365)
l_RemDays2=109572+DateSerial(l_Year,1,1)-DateSerial(1901,1,1)
MyGregorianDate=DateAdd("d",l_RemDays-l_RemDays2,"01/01/" & l_Year)
MyGregorianDate=DateAdd("h",l_Hours,MyGregorianDate)
MyGregorianDate=DateAdd("n",l_Mins,MyGregorianDate)
MyGregorianDate=DateAdd("s",l_Secs,MyGregorianDate)
If Year(MyGregorianDate)<1902 Then
MyGregorianDate=""
End If
End Function
|
|
|
|
|
What do you mean by
[--> aslong as you don't cheat <--]
what do you think this forum or Codeproject is for
People out here are not to serve anyone.
Wishes & Regards
Navneet Hegde
Nashik(City Of Pilgrimage)
Develop2Program & Program2Develop
|
|
|
|
|
I think your mistaking me for someone who doesn't regularly help out round here :P
Navneet Hegde wrote: [--> aslong as you don't cheat <--]
By that I ment that I would then convert the VB.Net code to C# myself but I don't want to add in the VB lib's.
It was also said slightly sarcastically as it wouldn't really be cheating to use it, but that obviously went over your head.
Navneet Hegde wrote: People out here are not to serve anyone.
Yes I know, I spend all day at work and often spend my breaks giving answers and getting no thanks for it. Not that I demand thanks, but people often demand answers.
Thanks for the reply tho :P
|
|
|
|
|
originSH wrote: but I don't want to add in the VB lib's.
What VB lib's??
|
|
|
|
|
Microsoft.VisualBasic
I know they are fully managed and have some funky stuff in but it still makes me feel dirty ![Wink | ;)](https://www.codeproject.com/script/Forums/Images/smiley_wink.gif)
|
|
|
|
|
I doubt anyone will ever need this but just in case they do, this is my effort at the translation:
//l_FracSecs=((l_val/10000000)-INT(l_val/10000000))*10000000
double secondFractions = ((number / 10000000) - ((int)(number / 10000000))) * 10000000;
//l_RemSecs=l_Val/10000000
double remainingSeconds = number / 10000000;
//l_Secs=Round(((l_RemSecs/60)-INT(l_RemSecs/60))*60,0)
double seconds = Math.Round(((remainingSeconds / 60) - ((int)(remainingSeconds / 60))) * 60, 0);
//l_RemMins=Int(l_RemSecs/60)
double remainingMinutes = (remainingSeconds / 60);
//l_Mins=Round(((l_RemMins/60)-INT(l_RemMins/60))*60,0)
double minutes = Math.Round(((remainingMinutes / 60) - ((int)(remainingMinutes / 60))) * 60, 0);
//l_RemHours=INT(l_RemMins/60)
double remainingHours = (remainingMinutes / 60);
//l_Hours=Round(((l_RemHours/24)-INT(l_RemHours/24))*24,0)
double hours = Math.Round(((remainingHours / 24) - ((int)(remainingHours / 24))) * 24, 0);
//l_RemDays=INT(l_RemHours/24)
double remainingDays = (remainingHours / 24);
//l_Year=1601+INT(l_RemDays/365)
double year = 1601 + ((int)(remainingDays / 365));
//l_RemDays2=109572+DateSerial(l_Year,1,1)-DateSerial(1901,1,1)
DateTime currentYear = new DateTime((int)year, 1, 1);
DateTime epoch = new DateTime(1901, 1, 1);
double remainingDays2 = 109572 + ((TimeSpan)(currentYear - epoch)).TotalDays;
DateTime output = new DateTime((int)year, 1, 1, (int)hours, (int)minutes, (int)seconds);
return output;
|
|
|
|
|
SO, what's the input value into this function? Is it the number of milliseconds from a certain date/time? What does this value represent?
|
|
|
|
|
It takes a long (I forgot to grab the method signature). As for exactly what it does I'm not 100%, it was something I was trying to do with parsing outlooks MSG files.
The whole thing has been like wandering around in a big dark cave looking for a sandwich
That code is from someone who was parsing MSG files with VBScript but it turned out that the MSG file I had didn't even have anything that could be converted using that function.
I just posted it up incase anyone is ever search on the lines of code.
|
|
|
|
|
I just ask because if it's something like milliseconds, you can do it in a single line of code:
Dim d As DateTime = New DateTime(1901, 1, 1).AddMilliseconds(val)
All you have to know is the date that the epoch starts.
|
|
|
|
|
Yeah, if it turned out this method was what I wanted I would have looked into it more and figured out exactly what the code does As it turned out it was another deadend ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
All timestamps start with a known epoch somewhere. All you have to do with this code is plug in a known value for the date/time serial number and see where the date/time ends up, then adjust the starting point accordingly. In my example, that was Midnight, Jan 1, 1901.
|
|
|
|
|
Thanks ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hi All,
I am working with webservices and its security.
I have a webservice and client application.now i need to secure the web service while calling and as well as serving the request.
I had created the x509 certificate and ........
Now i am not able to proceed further...
I will give the sample code i wrote in order to authenticate the user using the x509 certificate:
<WebMethod()> _
Public Function NewAuthentication(ByVal mvarUserID As String, ByVal mvarpassword As String, ByVal X509cert As X509Certificate) As DataSet 'UsernameForCertificateAssertion) As DataSet
Dim ds As New DataSet
Dim cert As New RLDInvData.Security()
Dim XCert As New System.Security.Cryptography.X509Certificates.X509Certificate()
' Dim file As New String
' XCert = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile("").ToString()
Dim pol As New MyPolicy()
XCert = X509Certificate.CreateFromCertFile(pol.ToString())
If Not XCert Is Nothing Then
Dim objSec As New RLDInvData.Security()
'Dim objSec As New RLDInvData.Websecurity
ds = objSec.Logon_DS(mvarUserID, mvarpassword)
X509cert = XCert
objSec = Nothing
End If
Return ds
End Function
RLDInvData is the dll file in which i wrote the class for security which is called after calling the webservice.
Pls help me in getting the X509 certificate and pas it as a parameter and process the authentication.
Thanks in advance
-- modified at 7:53 Tuesday 26th June, 2007
|
|
|
|
|
I am working on a dental software.I need to display all 32 teeth of a selected patient with markings of each treatment he had undergone.I am displaying images of all 32 teeth on the form, without any treatment shown, in 32 picture boxes.If there is a treatment on a particular tooth it should be shown in the picture box with a differnt appearance indicating the treatment he has taken.For example if he has taken a root canal treatment for tooth no.4 then the root portion should be filled with red color.If another treatment is taken on the same tooth then that treatment also should be displayed in the figure along with the previous treatment.My problem is how to go about it.Any programming idea and/or code samples are welcome.
Asha
|
|
|
|
|
One possible way would be to investigate the Microsoft.Ink namespace. This would allow you to annotate the images (works with a mouse, not just the pen) and this Ink could be serialised into the database.
An advantage of this is that the original images are kept intact and the storage space is very low.
There are many ways of doing this but as someone familiar with ink applications I would be tempted to do it this way
|
|
|
|
|
Can u give me sample code or links on this.
|
|
|
|
|