Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

sendkays problem

Posted on 1999-01-21
7
Medium Priority
?
217 Views
Last Modified: 2010-05-03
I am trying to send a ctrl-A (select all) command to a richtextbox control, but it's not working....all the rest of the code works fine, but this select all is needed in order for it to work properly.  And the ctrl-home command is not working either...any ideas why?

Here's the module

Me.RichTextBox1.BackColor = vbBlack
me.RichTextBox1.SetFocus
SendKeys String:="^A"
RichTextBox1.SelColor = vbWhite

'SendKeys "^(HOME)"
0
Comment
Question by:chapie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 3

Accepted Solution

by:
a111a111a111 earned 800 total points
ID: 1469992
Here is a sample:

Private Sub Command1_Click()
'Me.RichTextBox1.BackColor = vbBlack
    Me.RichTextBox1.SetFocus
    RichTextBox1.SelStart = 0
    RichTextBox1.SelLength = Len(RichTextBox1)
   '.SendKeys String:="^A"
    RichTextBox1.SelColor = vbWhite

End Sub

0
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1469993
And to go to the "Home"

Private Sub Command1_Click()

    Me.RichTextBox1.SetFocus
    RichTextBox1.SelStart = 0
    RichTextBox1.SelLength = Len(RichTextBox1)
   
    RichTextBox1.SelColor = vbWhite
    RichTextBox1.SelStart = 0  'take me home.

End Sub


0
 
LVL 3

Author Comment

by:chapie
ID: 1469994
Outstanding, I saw those event procedures but had no idea what they were for, I was checking out the F1 help file, but I guess I overlooked checking them out there.

Thanks
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:a111a111a111
ID: 1469995
I you need more help about it look for clipboard or let me know and I'll make something for you.

http://www.hili.com/~shay
0
 
LVL 3

Author Comment

by:chapie
ID: 1469996
that should do it thanks...BTW, I've had a lot on my mind lately and I don't know for sure if I graded A or not, if I didn't I should have and msg me, I'll post a new question for you to get the proper grade, if I did then ignore this and no need to reply I'll know if I don't hear back from ya.

Actually, if I could ask your advice, there might be a general over-all method that I might be overlooking.

The app I'm building is a song display for my church, they have an overhead display that hooks into the computer to show on the sanctuary walls.

The method I'm using to store the songs would be to have them all in RTF files and the app maintains the database of the filenames, locations, and any info they enter into like Author of the song, Key, tempo, etc.

Is there any better mthod I could use, instead of having seperate RTF files, and yet maintain the layout of RTF files.

Again, if you don't reply then I'll figure that I'm using the most efficient means.

Thanks again.
0
 
LVL 3

Author Comment

by:chapie
ID: 1469997
Oops, well, I guess I do have one question in regards to the method you showed me....can the same .selstart .sellen method be used to increase the font size if there are more than one font sizes in the selected text, or will they all default to the first font size + x

I'll play around with it, but I thought that I would toss out the question anyways
0
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1469998
Well, First You did Grade it A. Thanks.
About the songs and the better idea I can think off hand is to have a database (like Access) that the Comments (Memo) will be the song iteslf.

All the rest of the song parts such as Author ,  locations and so can be as fileds.

It is easy to save the database (table) to an HTML file so the second idea is to have the song display as an HTML on netscape or
IE.

 I hope it give some you direction.

shayplace@hotmail.com
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question