Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

2 easy questions

Posted on 1999-07-23
20
Medium Priority
?
187 Views
Last Modified: 2010-05-03
Hi. Can you please answer me by giving me simple code. Thanks

1) How can I delete a file threw VB??

2) VB doesn't support greek language. I have installed it on my computer and I can write in greek in all the programs but yesterday I tried to write a sentence in VB in greek and couldn't make. I got something like this Aui instead of greek letters. I even copied the sentence and pasted it here and it was in greek. Then I inserted a textbox and runned my "application". I then wrote in the textbox in greek and everything was just fine. Finally I wrote in greek in the properties window and named my command button in greek. Once again I had no problem. The problem is restricted in the code window. What can I do about this??

Thanks in advance


alex_dagger


P.S:
3) Can I make an application which will write in a text file all the files that change or open while it is loaded?

4) Last thing. How can I in a textbox change the font of only a highlighted part of the text?


Thanks


alex_dagger
=================================================================
0
Comment
Question by:alex_dagger
[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
  • 11
  • 3
  • 2
  • +3
20 Comments
 

Author Comment

by:alex_dagger
ID: 1526956
Edited text of question.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1526957
1) Public Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long

Deletefile "c:\autoexec.bat"

2) Take a look at the strconv
strconv (s, vbUnicode)

3) Filemon, see www.sysinternals.com
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1526958
#4 can only be done using a RichTextBox.

M

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:alex_dagger
ID: 1526959
Thanks but I didn't understand your answer for the 2nd question. Can you be more precise?

Thanks




alex_dagger
0
 

Author Comment

by:alex_dagger
ID: 1526960
Thanks but you don't answer to all my questions.

alex_dagger
0
 

Author Comment

by:alex_dagger
ID: 1526961
Adjusted points to 75
0
 
LVL 4

Expert Comment

by:RichW
ID: 1526962
1.  

Kill pathName


EXAMPLE:

Dim strPath, strFile

strPath = "c:\test\"
strFile = "Test.doc"

Kill strPath & strFile


0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1526963
How is it possible that he changes the text after I answered it?

But OK.
4 is richtextbox

3) Greek needs unicode characters. So either you windows should support this characters (Greek version win95) or NT
But VB sucks with Unicode displaying..
0
 

Author Comment

by:alex_dagger
ID: 1526964
Mirkwood, if you look at the time when you answered my question you will see I edited it before you post the answer. It seems that I posted the 4th question while you were writing the question. Anyway:

1)The first question is answered. Thanks guys.

2) As I said(I think) greek characters are installed in my computer and all the other applications use them even VB when I write in the properties window or in a textbox. A couple of months ago it actually could print greek letters in the code window(now it can't). A week ago I reinstalled VB and now I can't write in greek.

3) I haven't tested filemon yet.

4) Can you give me a sample code please.


Thanks


alex_dagger
0
 
LVL 5

Expert Comment

by:AnswerTheMan
ID: 1526965
In your VB editor :
in the menu : Select Tools->Options->Editor Format->Font.
select a Greek font.
check if it applies to all the components in the left
list box.
click apply.
---------------
i write in the VB editor in much more wear languge then Greek, and that's the way pal,
0
 

Author Comment

by:alex_dagger
ID: 1526966
Thanks a lot this is it. Well I rejected your answer because you deserve only a 4th of the points so please wait until I've got all the answers I need and I will give you 20 points some how

Don't worry


Thanks


alex_dagger
0
 

Author Comment

by:alex_dagger
ID: 1526967
So?

Only some code for the 4th question. Anybody?


alex_dagger
0
 

Author Comment

by:alex_dagger
ID: 1526968
No?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1526969
That's why I really HATE it when people ask more than one question in a single thread.... you can see what the mess is.. it is better to assign less points for each question and post 4 different questions than dealing with 4 questions at the same thread....

now for #4

to change the font color of the highlighted text in a RichTextControl do this...

RTB.SelColor = &H8000000F

to change the font you do this...

RTB.SelFontName = "Arial"

you get the idea... take a look at the proprties that start with SEL...

..-=ViKtOr=-..
0
 

Author Comment

by:alex_dagger
ID: 1526970
Thanks Viktor.
0
 
LVL 5

Expert Comment

by:AnswerTheMan
ID: 1526971
alex_dagger has just registered himself in my BLACK BOOK.
i solved him his disability of writing in his GREEK fonts
in VB editor, which is a BIG problem for non-english applications writer.
in return i haven't got the pleasure to see a "GOOD ANSWER"
label in my mail.
alex_dagger : May DOG will be with you
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1526972
AnswerTheMan, as you can see 4 questions are being asked, so you can't get a Good Answer in your mail, if you've answered only one.. maybe alex will decide to give you 20 points or so separately for that...

..-=ViKtOr=-..
0
 

Author Comment

by:alex_dagger
ID: 1526973
Mirkwood post an answer so that I can give you your points.

Thanks

alex_dagger
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 270 total points
ID: 1526974
Thanks pal
0
 

Author Comment

by:alex_dagger
ID: 1526975
No thank you. Anyway I'm looking for a picture to send you. Coll idea of making this little site. See you and thanks again.

alex_dagger
0

Featured Post

Industry Leaders: 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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

715 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