Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Split Tooltip In Two Line...


I use the line above to split text in two lines in toooltip, but instead two line have word 2 little sqaure edn second word..
See image

my code:
Me.Image1.ToolTipText = "CAMPANIA" & vbCrLf & "NAPOLI"




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Add Tooltip With 2 Line
this is a part of code.
How to add tooltip with 2 lines on cursor mouse when the code go in call tootip?

Label4.Caption = "X: " & tPOS.x & " Y: " & tPOS.y

If tPOS.x >= 440 And tPOS.x <= 460 And tPOS.y >= 340 And tPOS.y <= 360 Then
'Call TOOLTIP
Me.Label5.Caption = "CAMPANIA": Exit Sub
Else
Me.Label5.Caption = ""
End If

More Than 1 Line ToolTip
How do I create a Tooltip with more than one line in VB6 ?

Multiple Line ToolTip
Does any of you guys Know hoe to set the tooltip property of a control so it display text on multiple lines?

Multiple Line ToolTip
Hi,

Does Windows allow multiple line ToolTip ? How do I do it in VB ?

Thanks.

How To Do A Tooltip To Be Multi-line??
Hi,
Is there any way to do a tooltip multi-line???

Thanx in advance !!!!

Showing A Multi-line Tooltip
Is there any way one can show a multi line tooltip?? Instead of the normal 1 line tool-tip supported by VB?

Carraige Returns and Line Feeds dont work because thye get displayed as that box character.

Any help?? thanks a lots!

And maybe.. any idea how to display that new pop up message box available in windows XP like when you close the Windows Messenger for the first time, and it pops up a message saying that it it still running, in the system tray?

thanks a lots!

ListView + Multi Line ToolTip
Ok this is the code i had for a Tooltip for my ListView...

[highlight=VB]


Private Sub ChatBot_OnFlags(ByVal username As String, ByVal Flags As Long, ByVal message As String, ByVal Ping As Long)

Dim blah As New clsBnetBot

If (BNFLAGS_OP And Flags) = BNFLAGS_OP Then
frmMain.lstChannel.ListItems.Remove frmMain.lstChannel.FindItem(username).Index
With frmMain.lstChannel
.ListItems.Add 1, , username, , ICON_GAVEL
.ListItems(1).ListSubItems.Add , , , blah.GetPingCode(Ping, Flags)
.ListItems(1).ToolTipText = username
End With
AddChat vbGreen, username & " [ " & Ping & " ms ] " & " - Flags: " & Flags & " Has acquired operator status."
End If

End Sub

Private Sub ChatBot_OnJoin(ByVal username As String, ByVal Flags As Long, ByVal message As String, ByVal Ping As Long)

Dim blah As New clsBnetBot

With frmMain.lstChannel
.ListItems.Add , , username, , blah.GetIconCode(message, Flags)
.ListItems(.ListItems.Count).ListSubItems.Add , , , blah.GetPingCode(Ping, Flags)
.ListItems.Item.ToolTipText = username
End With

frmMain.txtChannelInfo = frmMain.lstChannel.ListItems.Count & " User(s) in " & Bot.CurrentChannel

If Bot.JoinLeave = True Then
AddChat vbGreen, username & " - [ " & Ping & "ms ] - Flags: " & Flags & " - Has Joined The Channel."
End If

End Sub

Private Sub ChatBot_OnUser(ByVal username As String, ByVal Flags As Long, ByVal message As String, ByVal Ping As Long)

Dim blah As New clsBnetBot, i As Integer

With frmMain.lstChannel

If (BNFLAGS_OP And Flags) = BNFLAGS_OP Then

For i = .ListItems.Count To 1 Step -1

If .ListItems.Item(i).Text = username Then
.ListItems.Remove .FindItem(username).Index
End If

Next i

.ListItems.Add 1, , username, , blah.GetIconCode(message, Flags)
.ListItems(1).ListSubItems.Add , , , blah.GetPingCode(Ping, Flags)
.ListItems(1).ToolTipText = username

Else

For i = .ListItems.Count To 1 Step -1

If .ListItems.Item(i).Text = username Then
.ListItems.Remove .FindItem(username).Index
End If

Next i

.ListItems.Add , , username, , blah.GetIconCode(message, Flags)
.ListItems(.ListItems.Count).ListSubItems.Add , , , blah.GetPingCode(Ping, Flags)
.ListItems.Item.ToolTipText = username

End If

End With

frmMain.txtChannelInfo = frmMain.lstChannel.ListItems.Count & " User(s) in " & Bot.CurrentChannel

End Sub

[highlight=VB]

And this is how i do the Multi Line ToolTip


VB Code:
Private Sub Form_Load()   With ListView1.ListItems      .Add Text:="BaDDBLooD"      .Add Text:="CeLe"      .Add Text:="Spam"   End With    Set TT = New CTooltip   TT.Style = TTBalloon   TT.Icon = TTNoIcon   TT.BackColor = &H80000008   TT.ForeColor = &HFFFFFFEnd Sub Private Sub ListView1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)   Dim lvhti As LVHITTESTINFO   Dim lItemIndex As Long      lvhti.pt.X = X / Screen.TwipsPerPixelX   lvhti.pt.Y = Y / Screen.TwipsPerPixelY   lItemIndex = SendMessage(ListView1.hwnd, LVM_HITTEST, 0, lvhti) + 1      If m_lCurItemIndex <> lItemIndex Then      m_lCurItemIndex = lItemIndex      If m_lCurItemIndex = 0 Then   ' no item under the mouse pointer         TT.Destroy      Else         TT.Title = "- [ Username ] -"         TT.TipText = "Ping: " & vbNewLine & "Flags: " & vbNewLine & "Stats: "         TT.Create ListView1.hwnd      End If   End IfEnd Sub  Public Property Let Style(ByVal vData As ttStyleEnum)   'used when assigning a value to the property, on the left side of an assignment.   'Syntax: X.Style = 5   mvarStyle = vDataEnd Property Public Property Get Style() As ttStyleEnum   'used when retrieving value of a property, on the right side of an assignment.   'Syntax: Debug.Print X.Style   Style = mvarStyleEnd Property Public Property Let Centered(ByVal vData As Boolean)   'used when assigning a value to the property, on the left side of an assignment.   'Syntax: X.Centered = 5   mvarCentered = vDataEnd Property Public Property Get Centered() As Boolean   'used when retrieving value of a property, on the right side of an assignment.   'Syntax: Debug.Print X.Centered   Centered = mvarCenteredEnd Property Public Function Create(ByVal ParentHwnd As Long) As Boolean   Dim lWinStyle As Long      If m_lTTHwnd <> 0 Then      DestroyWindow m_lTTHwnd   End If      m_lParentHwnd = ParentHwnd      lWinStyle = TTS_ALWAYSTIP Or TTS_NOPREFIX      ''create baloon style if desired   If mvarStyle = TTBalloon Then lWinStyle = lWinStyle Or TTS_BALLOON       m_lTTHwnd = CreateWindowEx(0&, _      TOOLTIPS_CLASSA, _      vbNullString, _      lWinStyle, _      CW_USEDEFAULT, _      CW_USEDEFAULT, _      CW_USEDEFAULT, _      CW_USEDEFAULT, _      0&, _      0&, _      App.hInstance, _      0&)                  ''now set our tooltip info structure   With ti      ''if we want it centered, then set that flag      If mvarCentered Then         .lFlags = TTF_SUBCLASS Or TTF_CENTERTIP Or TTF_IDISHWND      Else         .lFlags = TTF_SUBCLASS Or TTF_IDISHWND      End If             ''set the hwnd prop to our parent control's hwnd      .hwnd = m_lParentHwnd      .lId = m_lParentHwnd '0      .hInstance = App.hInstance      '.lpstr = ALREADY SET      '.lpRect = lpRect      .lSize = Len(ti)   End With      ''add the tooltip structure   SendMessage m_lTTHwnd, TTM_ADDTOOLA, 0&, ti    ''if we want a title or we want an icon   If mvarTitle <> vbNullString Or mvarIcon <> TTNoIcon Then      SendMessage m_lTTHwnd, TTM_SETTITLE, CLng(mvarIcon), ByVal mvarTitle   End If    If mvarForeColor <> Empty Then      SendMessage m_lTTHwnd, TTM_SETTIPTEXTCOLOR, mvarForeColor, 0&   End If    If mvarBackColor <> Empty Then      SendMessage m_lTTHwnd, TTM_SETTIPBKCOLOR, mvarBackColor, 0&   End If      SendMessageLong m_lTTHwnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, mvarVisibleTime   SendMessageLong m_lTTHwnd, TTM_SETDELAYTIME, TTDT_INITIAL, mvarDelayTimeEnd Function Public Property Let Icon(ByVal vData As ttIconType)   mvarIcon = vData   If m_lTTHwnd <> 0 And mvarTitle <> Empty And mvarIcon <> TTNoIcon Then      SendMessage m_lTTHwnd, TTM_SETTITLE, CLng(mvarIcon), ByVal mvarTitle   End IfEnd Property Public Property Get Icon() As ttIconType   Icon = mvarIconEnd Property Public Property Let ForeColor(ByVal vData As Long)   mvarForeColor = vData   If m_lTTHwnd <> 0 Then      SendMessage m_lTTHwnd, TTM_SETTIPTEXTCOLOR, mvarForeColor, 0&   End IfEnd Property Public Property Get ForeColor() As Long   ForeColor = mvarForeColorEnd Property Public Property Let Title(ByVal vData As String)   mvarTitle = vData   If m_lTTHwnd <> 0 And mvarTitle <> Empty And mvarIcon <> TTNoIcon Then      SendMessage m_lTTHwnd, TTM_SETTITLE, CLng(mvarIcon), ByVal mvarTitle   End IfEnd Property Public Property Get Title() As String   Title = ti.lpStrEnd Property Public Property Let BackColor(ByVal vData As Long)   mvarBackColor = vData   If m_lTTHwnd <> 0 Then      SendMessage m_lTTHwnd, TTM_SETTIPBKCOLOR, mvarBackColor, 0&   End IfEnd Property Public Property Get BackColor() As Long   BackColor = mvarBackColorEnd Property Public Property Let TipText(ByVal vData As String)   mvarTipText = vData   ti.lpStr = vData   If m_lTTHwnd <> 0 Then      SendMessage m_lTTHwnd, TTM_UPDATETIPTEXTA, 0&, ti   End IfEnd Property Public Property Get TipText() As String   TipText = mvarTipTextEnd Property Private Sub Class_Initialize()   InitCommonControls   mvarDelayTime = 500   mvarVisibleTime = 5000End Sub Private Sub Class_Terminate()   DestroyEnd Sub Public Sub Destroy()   If m_lTTHwnd <> 0 Then      DestroyWindow m_lTTHwnd   End IfEnd Sub Public Property Get VisibleTime() As Long   VisibleTime = mvarVisibleTimeEnd Property Public Property Let VisibleTime(ByVal lData As Long)   mvarVisibleTime = lDataEnd Property Public Property Get DelayTime() As Long   DelayTime = mvarDelayTimeEnd Property Public Property Let DelayTime(ByVal lData As Long)   mvarDelayTime = lDataEnd Property


My Problem is... i don't know exactly how to do a tooltip for each specific Item in my ListView as easily as i can by justusing ListView.Item.ToolTipText...

So Yeah.. i wanted to do

USERNAME

FLAGS
PING
MESSAGE

For Each user in my ListView.. but i don't have no clue on how to do this with that Multi Line tooltip code

anyhelp would be apreciated!

Tooltip Text Whith More Then One Line???
Is there any way to put the "tooltip text" whith more then one line?
I tryed enter a vbcrlf, but no new line apears!

Thanks,

Multi-line Tooltip Text
Is that possible, if so how?

Split A Line?
I've got a file with a field that contains comma delimited data. This data field can be quite long, such as
"1,2A,3,4,4A,6,8,10,10A,10B,10C,11,15,16A,18,21,21A,21B,21C" and so on.

I have a second file that this data goes into, except.... the data is going into a MS Access table, and the field, a memo field, is going to only be able to display 24 characters in a report column. So --- what I want to be able to do, if while taking the data from the first table into the second table, using code, check at the 24th character of data, for a comma or for a data split and "chop" the line to as close to 24 characters as possible, tack on a Carrirage return / line feed and then grab the next piece of data and do the same thing, until that line of data is parsed and placed into the table.

Is something like this possible, and how would I go about doing something like that?

Thanks to those who respond..... I think this forum is great!

Split A Line
Hi i have a question. I want to get a line in 2 parts.

It is different everytime Example
C:windows ext.txt

i want it in c:windows and text.txt
so the code gets a variable filename and needs to split it. I tried like

strFName = Right(FileName, "")
strDName = Left(Filename, Len(Filename) - strFName)

But it doesn't work.

Who To Split A Text When Is A New Line
hi,
i want split a text when a have a new line example:
i have this text in a textbox

hello
teste

i want know the name of the character responsable for the new line/paragraf


thanks for your help
bruno

Split Line Up Into Variables
Hi. I have a line of text:

MAN FRI 05:55 PM

Would it be possible to split that up into variables?

i.e "MAN" is the departure point, I would want it to be stored in a variable name DEPARTURE. It occupies the first 3 tabs.

FRI occupies tabs 5-8 and would be stored as DEPDAY.

05:55 PM would be stored as text, in DEPTIME, and it occupies tabs 10-17.

Possible? I know there is kind of a way, something to do with Len? but I am not sure?

Rgds
PP

Line Input, Split
hi,

i have a file that input one line at a time, and then i have to extract the third column of data and the people who made the file filled in between columns with spaces (making it 8,000,000 characters long) problem is, for the life of me, i can't get it to extract the third column of numbers

heres a sample of what the file looks like:

175 00:00:24 7 129 5 1 2 2
175 00:00:24 7 127 6 1 2 2
175 00:00:24 11 160 8 1 1 1
175 00:00:24 21 123 2 1 1 1



UPDATE: hold on, the text won't copy right, it keeps removing all the extra spaces

Split Txt File With End Of Line
How do i split up a txt file at every linefeed (char13/char10) so every string comes at the right line? (Now everything comes in one long string, but i know there are linefeeds in the file..)

Thank you for good help!

Loading List &amp; Line Split Help
I'm trying to load a text file into my program that looks like this:


Code:
"Hemostat"
"AV Clamp"
"1"
"CV"
"Speculum"
"Van Buren Sounds"
"2"
"GYN"
"Needle Driver"
"Max Rex"
"3"
"Neuro"
I want the program to just pull the first two instruments and place them in a textbox with this format (instrument1:instrument2), so for example, the textbox would look like this:

Code:
Hemostat:AV Clamp
Speculum:Van Buren Sounds
Needle Driver:Max Rex
I can't seem to get past loading the text file before I'm stumped. I know that I need to assign the first line read to a variable and do the same with the second line read and discard the other two lines read and repeat.....I just don't know how to code that. Is there a way I can load a whole bunch of values into "b" and then just recall it by doing b(0), b(1), b(2), b(3), etc?


Code:
Private Sub mnuConvertInstruments_Click()
Dim a As String
Dim b As String
Dim i As Integer

On Error Resume Next
With CommonDialog1
.filename = ""

.InitDir = App.Path
.Filter = "Text Files (*.*)|*.*"
.ShowOpen
If Len(.filename) Then
Set fs2 = New FileSystemObject
Set ts2 = fs2.OpenTextFile(.filename, ForReading, False)

Do While Not ts2.AtEndOfStream


b() = ts2.ReadLine
b = Replace(b, """", "")
text1.text = b

Loop

ts2.Close
Set ts2 = Nothing
End If
End With
End Sub

Parse Command Line With Split
I am parsing the text contained in the command $
IN VB, in Project ...Properties..Make tab..I typed "1 2" for the Command Line Arguments.

Then I run the code below: I get the MsgBox 1 2 (for the sCmdLn) but then VB highlights this line: "varArray = Split (sCmdLn," ",-1,vbTextCompare). " and I get the error : Run Time error 13: Type Mismatch.
What am I doing wrong?

Thanks


Private Sub Form_Load()

Dim sCmdLn$, sFrom$, varParm1, varParm2
Dim varArray() As Variant

sCmdLn = Command()
If sCmdLn <> "" Then
MsgBox sCmdLn
varArray = Split(sCmdLn, " ", -1, vbTextCompare)
sFrom = varArray(0)
varParm1 = varArray(1)
varParm2 = varArray(2)
MsgBox varParm1
MsgBox varParm2
Else
MsgBox "There are no arguments"
End If

Split A Line From A Txt File With Tab Into An Array
How would I split a line that has a tab in the line?
For example I have an ascii file that contains multiple lines.
Each line looks something like this:
'value' 'three tabs' /*'definition of value'*/
What would I use to split the line if all I want is the value.

Code:
strPipingSchemaArr = Split(strPipingSchema, " ") 'what would I put instead of the space
txtPiping.Text = strPipingSchemaArr(0)

Any help would be greatly appreciated.

How To Split A Text File After Any Particular Line I Specify.
How can I split a text file programtically after the line number I specify.

Please Help.

Customizing Tooltip Fonts, Showing Tooltip WithOut MouseOver Event
I was just wondering whether we do the following things :

Setting Font Properties of Tooltip

Can we set font properties of a tooltip at runtime ? This would be really helpful for using it in a multilingual software. As soon as a user changes language, tooltips would be shown with different font which will be readable in their own language.


Automagically Showing Tooltips Without Mouse Intervention
Can tooltips be shown without having to use a mouse ? This is because of the fact that in some cases, numbers need to be spelled since a user would not accurately know a how much (s)he has typed if the font is too small.

It would really great if we could show the tooltip automatically on TextBox_Change event.

Joining A String Which Is Split By Carriage Return Line Feed
Hello,

I'm stuck in a situation now..I hope someone out there can help get me out of it...here's the situation:

I now have a string as follows:

abcstring =

ABCDEFG
HIJKLMNO
PQRSTUV
WXYZ


how am I able to join all the strings to form a string

ABCDEFGHIJKLMNOPQRSTUVWXYZ

i.e. delete off the carriage return line feed


Thanks in advance!

Joe

How Can I Perform A Multi Split, Useing Split? (solved With Thanks)
Useing split i have been spliting 2 values in a text field.

But i need to make multi splits at each split identifire.

IE the data..

Name,Age,Address,Notes,PhoneNo,DOB

Useing the comma how can the split command be used for muilti splits and placeing them into their own varibles?

Many Thanks

Split Function - Determine The Point In Which The String Was Split.
Hi Guys,

Iím trying to split a string using the split function. I can split it fine using the split function, but I want to know the exact point(s) that the string has been split. Anyone got a good way of doing this?

I really need to know the exact points of the split. I know that I could do this by making my own Split function that consists of a few Do Whiles - but that would be very CPU intensive, and I dont want to go there.

(p.s. The happy mothersí day logo scared the sh*t out of me. I only just realized that the US mothersí day is different to the UK mothersí day!).

Split() Function, The Way To Split Up String
People i do know that split is the way to seperate a string through a delimiter, but how shd i do to get the number of strings that is seperated from the string?

How to obtain the number of strings by using split()?



=======================================================

For those that wants to know basic usage of split():

Code:
Dim Str1 as Variant

Str1 = Split("Water-Melon", "-")

'Result will be:
'Str1(0) = "Water"
'Str1(1) = "Melon"

'To find how many splits u have

Dim int1 as Integer

int1 = Ubound(Str1) - LBound(Str1) + 1

Thank You, Lar_19.

Line Input #1, Line...how Do I Read Ahead One Line (or Back Up One Line)
I am loading a file line by line using the LIne Input but at one point i need to look ahead at the next line to decided what to do on the current line...how do i look ahead one line? or how do i use the line Input function and then back up? Any help would be greatly appreciated.

Shane Thomas
p.s. please email replys in addition to the reply of post too
shathoma@nmsu.edu

Split By Tabs Using Split()
hey,

im using split to split a string up of ","

but i want to use Tabs instead. whats the key for this?

SPLIT From: Split A String? VB6
Quote: Originally Posted by zynder Here is a simple version.


Code:

Private Sub Command1_Click()
Dim myStr As String
Dim xPos As Integer

myStr = "This:is:a:test:string"
xPos = InStr(1, myStr, ":")

Debug.Print Mid$(myStr, 1, xPos - 1)
Debug.Print Mid$(myStr, xPos + 1, Len(myStr))

End Sub



Hope it helps!

I found this thread searching for the split() function. Is there a way to create fields in a database (or a brand new dbase) based on the string being split?

Line By Line Text File Read And Correct Each Line
Can anyone help me create a small program or have any pointers
on pieces of code that reads a text file from folder "unfixed" then
fix the contents and then store the corrected contents
in another folder "fixed" and then move the file in folder "unfixed" to folder "old"

Details of contents.
There is a space infront of each line that should be removed.
Between the first group of numbers and the second there should be a zero for every space.
Then after the second group of numbers there should be just one space and the rest trimed off.


011531015222360000500355 3350505212004 50122
011531015222360000500363 5336305212004 6255
011531015222360000503465 2404505212004 50022
011531015222360000503463 1345205212004 50025
02153101522236 13 1503256


The @ symbol represents where a space should be.
I would like to read the file and then correct it and then
place the fixed contents in another folder with the original name.
Below is how I would like it to look.

01153101522236000050035500000003350505212004@
01153101522236000050036300000005336305212004@
01153101522236000050346500000002404505212004@
01153101522236000050346300000001345205212004@
021531015222360000000013@

Replacing A Line Of Text With A Blank Line, Then Delete That Line
The code below works perfect, retrieving the string of text that the user selects from the listview. Then I do bla bla bla. What I want to do is convert this so that the the user selects a string from the listview which corresponse to a string in the file. then click remove. my problem is, how do i remove a line of text from a text file? if i open for reading i cant modify the contents, if i open for writing it erases the data. and i dont want to write the data into a string, parse out the string that i don't want then rewrite the file.... that could be....not so good...

---------------------------------------------------------------------------------
'the line that actually is in the file..
email=gmatteson@myemail.com
i want to remove this line...
---------------------------------------------------------------------------------
Dim strSelected As String
strSelected = lvwAccounts.ListItems(lvwAccounts.SelectedItem.Index)

Dim objFSO As New FileSystemObject
Dim objFile As File
Dim objTS As TextStream
Dim strReadline As String
Dim strFind As String
Dim strData As String
Dim strEmail As String
Dim blnFound As Boolean

Set objFile = objFSO.GetFile(App.Path & "pop3a.txt")
Set objTS = objFile.OpenAsTextStream(ForReading)
Do Until objTS.AtEndOfStream Or blnFound = True
'reads line in file
strReadline = objTS.ReadLine
strFind = "="
strData = (InStr(1, strReadline, strFind) + 1)
strEmail = Mid(strReadline, strData)
If strEmail = lvwAccounts.SelectedItem.Text Then
frmEdit.txtEmail = strEmail
blnFound = True
End If
Loop
---------------------------------------------------------------------------------
Thanks,
- Gabe

Tooltip
Is there any way to change the tooltiptext of a TrayIcon in runtime? I want the tooltip to show how long has passed since the program started, so the text needs to be changed every time the tooltip is shown. Anyone?

ToolTip
Hi..
I have a problem with the tooltip of the tree view control i.e tool tip is displaying with in the aplication but when I run Exe of the application then it don't show the tooltip.Second Can we make a tool tip multiline.Please help me.
Thankx
V.Acharya

Tooltip API Help
i need to extract tool tip information from another application.

The other application has a listview which when hovered over a small tooltip appears with some calculation information.

I need to using API obtain the information for the listview selected items.

Anyone got any samples, links, etc?

thanks in advance

I Need A Help With Tooltip
I have a tooltip I want to show it while I am typing on a textbox. Is it possible to show tooltip without mouse over?

Tooltip
Hi ...
anyone can help me about tooltip.
i need to show up the textbox's tooltip without have my mouse cursor over it, can this be done? (eg. i push a button then a tooltip of a textbox show up).
i already try to send TTM_ACTIVATE but there is nothing happen.
Thanks for your willing to help me (again) .

Regards,
Ferry

Tooltip Does Not Appear ( IDE BUG )
i have created a simple active x control with a picture box on it

using that control in a project , the tooltip i set to my activex control , is displayed .

The tooltip does not appear if make an exe out if it.

I mean tooltip is working in vb ide but not in exe.

I am using Vb6 Sp6

ToolTip
I need to show in ToolTip quit long text.
How can I show multiline ToolTip?
I tried Label1.ToolTipText = "aaa" & vbnewline & "bbb" but it does not work...

ToolTip
HI All,
I developed one project and place its shortcut to desktop. My question is how can i create a tooltip for my exe.
Thanks in Advance

Tooltip
is simple... i need a API to display when i want an information of a textbox... for example when the date is invalid, apears a tooltip saying "invalid date" or something like that... i can use a simple API for it? send me someone!!!!

Need A Bit Of ToolTip Help
I'm trying to use ToolTips to display a shortened version of data available when the user clicks an image. But I can't get them to be multiple-line. Here's the code I'm using:

Code:Private Sub imgPic_MouseOver(Index As Integer, ...)
    imgPic.ToolTipText = "Blah blah blah" & vbNewLine & "yada yada yada"
End Sub

I've tried vbCrLf, I've tried vbCr and vbLf on their own, and all they give me is a funny character and a really long line.

DA SAX MEISTA

Tooltip
Hi ,
 In my project i want to add a utility like system tray.I hope you all have must noticed when we move mouse over the time in the system tray the tooltip shows date, do we have anything that will make these happen in VB......Plz sugest and if possible i would like to have a functionality like the system tray on the status bar component...is that possible

Tooltip
Dear Helper,


I'm in big problem,what i'm doing is i put one control ie tooltip control,in one form what i want is that should be use for another form in a desing properties of second form
What i did is i set tooltip control modifer property=friend...
but it's property is not appering in another form...

Bye

Tooltip Does Not Appear
i have created a simple active x control with a picture box on it

using that control in a project , the tooltip i set to my activex control , is displayed .

The tooltip does not appear if make an exe out if it.

I mean tooltip is working in vb ide but not in exe.

I am using Vb6 Sp6



Steps to reproduce behaviour :


1. Choose activex Control Project

2. Put a picture box control on usercontrol.

3. just make an ocx out of it.

4. now use this activex control in a standard exe project

5. set tooltiptext property of your control.

6. run and u can see the tooltiptext value

7. new make an exe out this project

8. run the exe file and tooltiptext value will not display.

Tooltip
I must apologize as I have seen the solution to my problem on here already, yet it refuses to work in my case. I am attempting to slow down the display of tooltip text in a treeview window, as it is going so fast that my nodes are disappearing and reappearing when you run the mouse over the treeview list. I am using SendMessage to access the TTM_SETDELAYTIME and TTDT_INITIAL which controls the time before the text appears(I hope). I am calling this in form_load. I am setting vData to many random variables, the main goal being to have it wait around 2 or 3 seconds before displaying. Again I'm sorry to ask this again, hopefully someone can offer some insight into my problem. Thanks.

Private Const WM_USER = &H400
Private Const TTM_SETDELAYTIME = (WM_USER + 3)
Private Const TTDT_INITIAL = 3
Private hTT As Long
Private mvarDelayTime As Long

Then:

Public Property Let DelayTime(ByVal vData As Long)

mvarDelayTime = vData
SendMessage hTT, TTM_SETDELAYTIME, TTDT_INITIAL, mvarDelayTime

End Property

ToolTip
Does anyone know how to programatically setup how fast a tooltip to display, or any properties of it like the font, size, color, etc?

I'm using tooltips .. but when the user holds the mouse button i want the tooptip to immediatly show up with no delay. and i want to set this up in code... not the system.

thankx for any info

Tooltip
Is it true that the ToolTip is seen only for the buttons which are enabled by setting the ToolTipText property of the button. Because even if i have the ToolTipText property set for a button but if that button s disabled,the ToolTip is not displayed..is there a way to get around this or thats just the way it works?

Thanks!

ToolTip
Hi;
I want to make something like the tooltip or work with regions. I don't know how.

TreeView Tooltip
Hi,
I have a treeview control, containing parent and child nodes. I have not set the ToolTipText property of the treeview to contain any text. The parent node does not display any ToolTipText, however the child nodes do display what appears to be a ToolTipText. The ToolTipText contains the text which comprises the text of the child node itself. I want to get rid of this ToolTipText as it is not necessary for my purpose. Any ideas? Thanx in advance
Gallicus

Using A Form As A Tooltip
Edit by HardCode: Split from here. Please start your own thread instead of posting in an old one. Thanks

I have something similare to what you are asking although I am not satisfied with it yet, there are a few problems but it should give you the basic outline for what you need to do. All written for VBA.

I need mine to display a non-normal tool tip which I will use a label for or the api 'In Place ToolTip' now that I know it exists thanks to the replys you have recieved on here, at the momment it just manipulates the vba listboxes tool tip which is also where most of the problems are coming from.

If you cannnot do the api code I will post what you need a little later when I have some more time, as my listbox is not exactly good use of development time at the moment!!

The code below assumes that it is in the module for a form and that the form contains a list box called StaffList and that it has been populated before the mousemove event fires such as in the activate or initialise events.



Code:
Public LastListContext As Integer 'stores previous list position

Private Sub StaffList_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Dim Lines As Integer
Dim ActiveLine As Integer
Dim SpacingPoints As Integer
Dim context As Integer

If Button = 0 Then
'this needs testing with different fonts! at the moment my list box contains tahoma size 10
'and this works fine. The 4.85 part is my estimate at the spacing between lines in the list box
'only tested at its current font and size - but works well at tahoma (10)
'The information on the point spacing between list items must be calculatable somehow such as
'a percentage of the fonts point size, or it may be static I have not yet checked!!

SpacingPoints = 4.85 'perhps this is a % of the font size in points

'no of visible lines is list height / font height + spacing (better way to get visible lines?))
Lines = StaffList.Height / (StaffList.Font.size + SpacingPoints)

LineHeight = StaffList.Height / Lines 'height in points per line
first = StaffList.TopIndex 'this is the listindex of the first visible item
ActiveLine = Y / LineHeight 'count lines from top

context = first + ActiveLine 'add number of calculated lines to the index for first item


'we need to take measures to slow down the repeat processing here, so the calculated index
'is stored in the global LastListContext, if the new calculated context is the same as the last then
'no changing of the tool tip or refreshing will take place.

'Note Add a timer so that the funtion will only fire once every x seconds - this can be tested at the
'begining, so that processing only occurs if the user pauses the mouse.

If Not context = LastListContext Then 'if the mouse is over a different list item
LastListContext = context 'store the current list item

'hiding the list and then showing it again after changing the tool tip seems to be the only way
'to apply the tooltip change visually. This will be solved by using a custom made tooltip such
'as a label or a frameless form.

StaffList.Visible = False
If Not context > StaffList.ListCount - 1 And context > -1 Then 'check bounds
'calculate row here and store to save on repeat calculations - time critical as list is hidden still!

'...............tooltip code begins here........................
validrow = FindRowByValue("Staff Record", 1, StaffList.List(context))
tip = Worksheets("Staff Record").Cells(validrow, 3).value & " "
tip = tip + Worksheets("Staff Record").Cells(validrow, 2).value
StaffList.ControlTipText = tip 'set the tip
'---------------------------------------------------------------'
Else
StaffList.ControlTipText = ""
End If
StaffList.Visible = True 'reshow the list with its new tooltip
End If
End If
End Sub

That may point you in the right direction.

(Problems)
The code just fails to trigger after a while, and the mouse must be moved away from the control and then back to it to reactivate the tool tips, this could be message flooding, so slowing it down with a timer could be an answer.

Does anyone know a way to force VBA to redraw the tooltip without hiding and then showing the parent control?

also if anyone has any information on the point spacing between listbox items that would be greatly appreciated.

By the way if you are trying to use the sendmessage API with LB_ITEMFROMPOINT in a VBA project save your time, it returns zero everytime from a VBA list box, so does not work.

Hope thats some help atleast.

Tooltip Question.
Hello and thanks for having a look!

I am trying to create a tooltip (balloon) inside of my form using the following code: http://www.developerfusion.com/show/3890/

I realize the code was not posted on this site, however, the code works great for labels that are directly on the form. (not within anything).

I would like to be able to use that code with a label that is inside of a picturebox. What happens now is that the current code will only recognize where the label is if it is directly on the form. When i put the label into a picturebox, it does nothing. No tootlip appears, i can imagine why but cannot think of how to tell it that the label is in the picturebox.

Any replies or suggestion would be greatly appreciated!
Thanks in advance!

Copyright © 2005-08 www.BigResource.com, All rights reserved