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




Writing Screen Text


I have a great deal of screen text (instructions) that I would like to display. There are some pictures asscoiated with the text. Can I display a word document that already has this info? Any examples will be helpful.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Writing Text Directly On The Screen
HI,

I want to do just that. I want to
have text come up anywhere on the
screen nomatter what form its on!
How?

Evan

Writing To Screen In VB 4
How can I place text on the screen when using a form?

Writing A Document On Screen
Hello,

I need to display a text document on the screen. the document is made of text in different sizes and fonts. How can o do that? In MFC i can use a device context and then write to it using TextOut.
I also need to print the document.

Thank you.

Compile Error Displayed When Writing To Immediate Screen
Hello
when i break the execution of a program, and then i try to writeto the immediate window i get the following pop up error



Compile error :

expected: line number or statement or end of statement

what is this error?

Help Writing A Program To Disable And Reenable Screen Saver?
I need to write a simple little .exe program to disable the screen saver when started, then when you close the program it will automatically re-enable the screen saver. I will use this little .exe for when running games that I don't want the screensaver to come on during..

anyhow, this is the registry key that I need to modify to disable and then re-enable the screen saver...


Windows Registry Editor Version 5.00


"ScreenSaveActive"="0"


then on the 'On End' event in the .exe I could reset the registry value like this:

Windows Registry Editor Version 5.00


"ScreenSaveActive"="1"

Does anybody know how to make a simple program do this?

Thanks

Writing To A TexT File From A Text Box In Visual Basic
i have been looking at how to write text entered in a text box in VB to a text file outside of visual basic, i've searched and had a look in a few bookes etc

the syntax is simple, and easy to understand, this works and prints line after line in the txt file

Open ("C:Documents and SettingsMy Documentsschool.txt") For Output As #1
Print #1, ""
Print #1, ""

but i want the info that is saved into the text file from a text box inside visual basic itself, e.g.
Open ("C:Documents and SettingsMy Documentsschool.txt") For Output As #1
Print #1, Text1.Text

but the problem with it is that each time a new number is entered into thr text box. it over writes the txt in the text file itself, what im after is something where each time text is entered into the text box it is saved into the text file,and it keeps entering text into the text file, so it makes a list of entered text, line after line, not just replacing the text before it, i know how to do this from reading a text file and inputting the info into VB itelf, just doin a if and end statment, untill EOF, but cant get it to do the same as output:/

any ideas?

[VB6] Writing Text Into One Text Box Writes The Text Into Another!
In the title it sounds rather easy but bein quite new to VB6 it seems a little complicated for me.

Navigate to this page:
http://members.chello.nl/m.vandeven1...m_unicode.html

It's the MSN wierd maker where you type in say:

-----------------
Normal Text: Hello

Weird: нєℓℓσ
-----------------

I would like this in my VB app so that when something is typed in the Normal text box the same text will be displayed in the Wierd text box only in that font above. Also the wierd text box must have write disabled so you cannot write anything in the text box, just highlight and copy the result. Help is more than appreciated

Spy Text On Screen When Mouse Move Over The Text
Who know the API's Refrences for retreiving the text on screen when mouse move and delayed for second?
Send Me on: bahman_neyestani@yahoo.com

Writing Text To A Text File
I am trying to write text from a text box to a text file (someting.txt). I also need to write it to a particular row in the file that corresponds to a the clicking of a various command buttons (15 in total). Any suggestions?

Writing To Text Log?
Could someone tell me the code for writing to a text file when a check box is selected only.

Thanks

Writing To Text Box
Hi...

Ok this is how things are...

I have a text box and have made it so that when the program loads it gets filled with spaces 80 characters to the right then it will do an vbCrLf. This happens untill it has done this 24 times. I then have it so that you can give it 2 coordinates, x and y and the cursor will jump to that position in the text box.

The problem is that i then need to be able to write something such as a char to that position where the cursor is. Yet things like text1.Print wont work and i cant do text1.text = text1.text & MyCharOrSomething Here

Please help..

Thanks heaps

Writing Out Text...???
Hi all..

I was wondering if it is possible to write out text to the form, when the form has nothing on it??

For an example

Create a new project with just a plane form and a button..

then use this..

Private Sub Command1_Click()
' Declare local variables.
Dim Radius
' Create random RGB colors.
R = 255 * Rnd
G = 255 * Rnd
B = 255 * Rnd
' Position center of circles in the center of the form.
XPos = ScaleWidth / 2
YPos = ScaleHeight / 2
' Generate a radius between 0 and almost half the form's height.
Radius = ((YPos * 0.9) + 1) * Rnd
' Draw a circle on the form.
Circle (XPos, YPos), Radius, RGB(R, G, B)

End Sub

NOTE: this was just taken from an example i found...

You can create the circle on just the form.. and control the x, y position.
Would it be possible to do the same this but to write out text to given x and y possitions?

Or would it be possible to with any other means be able to write out text to given x and y positions?

All i want to be able to do is write out text to a given position and then be able to change that position?

PLease help..

Thanks..

Writing To A Text Box Over, Over, And Over...
Every time I dump 270 characters in a string to this large text box, it appears to show them fresh from the top and the previous string completely disappears.

How many times can I do this in a day ? If I dump this long string of chars over and over and over all day long, like every 10 minutes, is the text box control going to " get full " ? Is there some maximum number of times I can write this long string of chars to this text box ?

Writing To Text Files
Hi,

I am a newcomer to writing to text files and bubble sorts.

What I am trying to do is sort data from a text file and display the results in a Picture control. My code is working fine but each time I sort it, the program is inserting a new line in the text file? Any suggestions?

My code is as follows, thanks:

Private Sub cmdSort_Click()
' Sort records within textfile
' 3 Fields (arrays) PlayerNum, TeamNum & PointsNum

picDisplay.Cls
i = 1
Open App.Path & "myRecords1.txt" For Input As #1
While Not EOF(1)
Line Input #1, PlayerNum(i)
Line Input #1, TeamNum(i)
Line Input #1, PointsNum(i)
i = i + 1
Wend
Close #1

If myOption = 0 Then ' Sort by "Player"
RecordNum = i
For n = RecordNum - 1 To 1 Step -1
For i = 1 To n
If PlayerNum(i) > PlayerNum(i + 1) Then
temp = PlayerNum(i)
PlayerNum(i) = PlayerNum(i + 1)
PlayerNum(i + 1) = temp
temp = TeamNum(i)
TeamNum(i) = TeamNum(i + 1)
TeamNum(i + 1) = temp
temp = PointsNum(i)
PointsNum(i) = PointsNum(i + 1)
PointsNum(i + 1) = temp
temp = PointsNum(i)
End If
Next i
Next n
Open App.Path & "myRecords1.txt" For Output As #1
For j = 1 To RecordNum
Print #1, PlayerNum(j)
Print #1, TeamNum(j)
Print #1, PointsNum(j)
Next
Close #1
End If

If myOption = 1 Then ' Sort by "Team"
RecordNum = i
For n = RecordNum - 1 To 1 Step -1
For i = 1 To n
If TeamNum(i) > TeamNum(i + 1) Then
temp = TeamNum(i)
TeamNum(i) = TeamNum(i + 1)
TeamNum(i + 1) = temp
temp = PointsNum(i)
PointsNum(i) = PointsNum(i + 1)
PointsNum(i + 1) = temp
temp = PlayerNum(i)
PlayerNum(i) = PlayerNum(i + 1)
PlayerNum(i + 1) = temp
temp = PlayerNum(i)
End If
Next i
Next n
Open App.Path & "myRecords1.txt" For Output As #1
For j = 1 To RecordNum
Print #1, PlayerNum(j)
Print #1, TeamNum(j)
Print #1, PointsNum(j)
Next
Close #1
End If

If myOption = 2 Then ' Sort by "Player"
RecordNum = i
For n = RecordNum - 1 To 1 Step -1
For i = 1 To n
If PointsNum(i) > PointsNum(i + 1) Then
temp = PointsNum(i)
PointsNum(i) = PointsNum(i + 1)
PointsNum(i + 1) = temp
temp = PlayerNum(i)
PlayerNum(i) = PlayerNum(i + 1)
PlayerNum(i + 1) = temp
temp = TeamNum(i)
TeamNum(i) = TeamNum(i + 1)
TeamNum(i + 1) = temp
temp = TeamNum(i)
End If
Next i
Next n
Open App.Path & "myRecords1.txt" For Output As #1
For j = 1 To RecordNum
Print #1, PlayerNum(j)
Print #1, TeamNum(j)
Print #1, PointsNum(j)
Next
Close #1
End If

End Sub

Writing Text Within A Picturebox
I need to write text within a picturebox. It is a dynamically number of texts and I am using VB5. VB5 can not create controls by code so I can not use the label/textbox control. Will I have to write each letter pixel by pixel or is there any easier way?

/Anders

Writing To A Text File
How do i get VB to write/get text from a text file?

Writing To Text File
hi

i'm trying to write some values to text file in a specified location on the text and these values are being picked from the database

for eg: The text file is as follows:
----------------------------------------------------------------------
dear <<name>>

you registration expired on <<date>>

----------------------------------------------------------------------
in this file, i've to put a name and a date which is being picked up from my database on certain set of conditions


pls advice, kind of urgent

tks - Hitesh

Writing To A Text File From Db
I am trying to write to a text file from two different tables in a
databse. The outcome that I would like to do is:

Instrument: "info from table1"
Position: "info from table 2"

And this will keep repeating till there is no more data.
Is there a way to print then skip two lines.
Then come back and print after the lines that have data.

Basic Text Writing
Hello,
OK, i'm reasonabally new to VB, and i want to create, and write some basic information to a text file.

I need to write, for now, to C: est.txt, and simply write in the text file the contents of information.Text

Thanks

Writing To A Text File
I am looking to write to a simple text file. I am using the simple open for output statement but in the acutal text file I do not want the quotes around each line that the program writes. I am sure there is a way to get rid of these quotes just not sure how. If someone could help me out it would be great. thanks

Writing To A Text File.
Hi
What is the best way for me to write to a text file. The file will be open at this point. I want to write a string into the text file that overwites everything currently in the file.

Thanks

Paul

Writing Text To A File...
I am writing text to a file as...

Write #1, strdata

When I read the file, the data string has "quotation marks" and I would like it to be written without quotation marks. Or I would like to remove the quotation marks somehow.

Any simple ideas out there.

Thanks in advance
Chris
Western Australia

Writing To A Text Box From .txt File
I'm pretty new to this game and would appreciate any help. Below is a cut down version of part of a program that I'm stuck on. The writing to a file (cmdAdd) works fine, but I really don't know what to do next to write from the .txt file back to the text boxes. I have sort of started (cmdPopulate) but I can't get anything to display. I want to start with the first record and then read the file sequentially with another button.


Option Explicit

Private Type RequestDetails

ID As Integer
Name As String * 20
Telephone As String * 15

End Type

Private Sub cmdAdd_Click()

Dim filenum As Integer
Dim recLength As Long
Dim udtRequest As RequestDetails
recLength = LenB(udtRequest)
filenum = FreeFile()

Open "a:logger.txt" For Append As #filenum Len = recLength

udtRequest.ID = txtID.Text
udtRequest.Name = txtName.Text
udtRequest.Telephone = txtTelephone.Text

Write #filenum, udtRequest.ID, udtRequest.Name, udtRequest.Telephone
Close filenum

End Sub

Private Sub cmdPopulate_Click()

Dim filenum As Integer
Dim recLength As Long
Dim udtRequest As RequestDetails
recLength = LenB(udtRequest)
filenum = FreeFile()

Open "a:logger.txt" For Input As #filenum Len = recLength

txtID.Text = udtRequest.TheDate
txtName.Text = udtRequest.Name
txtTelephone.Text = udtRequest.Telephone

End Sub

Writing To Text Files
I'm trying to write to a text into a certain format that requires no Quotation marks, How do i do this? For example, all I know how to do is

Write #1, "Beaver","Cat"

Which results in a text file that looks like this,

"Beaver","Cat"

And I need it to look like this

Beaver,Cat


Please Help

Writing To A Text File
How do u write to a text file. I know how to read from a text file but not how to write to one. Any help would be greatly appreciated

Writing To A Text File
I am taking information from excel and writing it to a text file and then reading the text file and placing the text into a outlook email message. How do I place text in a text file so that data from columns in the excel sheet are spaced to form neat columns in the text file and I am hoping in the outlook email body as well when read in from the text file. Please help.

Writing A Text Control With Vb
Does anyone know of a site or a book that has information on writing text editors, with scroll bars and carets?

Writing To A Text File
I'm trying to write to a text file and it doesn't seem to be working. Here is my code:

open "C:error.txt" For Output As #24
print #24 "Something to write"
close #24

This seems pretty straight forward but it doesnt seem to work. Any ideas?

Writing To Text File
Whenever i try to write the contents of a textbox to a file it gives me a bad record length error. i tried defining the length of the text box when i said Open, but that still didnt' work. heres the code :


CommonDialog1.ShowSave
If CommonDialog1.FileName = "" Then
Text8.Text = "You must supply a filename"
End if
For i = 1 To List3.ListCount
If Text15.Text <> "" Then
Text15.Text = Text15.Text & vbCrLf & List3.List(i)
Else
Text15.Text = List3.List(i)
End If
Next i
newvar = Text15.Text
Open CommonDialog1.FileName For Random As #4 Len = Len(newvar)

Put #4, , newvar
Close #4
Text9.Text = "Done writing to file"



it doesn't matter what i put in or how i arrange it, it just won't write to file unless i type "put #4,,"the data"

Writing To Text File
I need to write information to a text file but it has to be in a certain format.

I know how to open a file and write data down in long column but what i need if a table tha has 5 columns with about 15 rows per column. I want it to appear as a table like this,(I am using code tags to give the feel of what I am trying to do, this is not by bad programming ability)

Code:
1 2 3 4
Car yes no no yes
dog no yes no yes
house no yes no yes
Is this possibe?

If it is, how?

Thanks for any information that can be given for this problem

Writing A Text File
Hi all, is there a way to write all of the files within a directory onto a text file using vb code? please help

ss

Writing Text To A .csv File
Ok, .csv (excel) files are really cool in that you can take any text file and rename is .csv and it will take everything in quotes and everything with a comma after it and put it into cells.

So here's what I'm doing. With VB, I'm taking a .tmp file, stripping a bunch of useless information out of it, and saving it as a .csv file. But it saves it with quotes that encapsulate the entire text, so all of it goes into just one cell. Here's the code:

strNum2 = Len(txtFileName.Text) - 4
fSave = Left(txtFileName.Text, strNum2)
fSave = txtPath.Text + "/" + fSave + ".csv"
Open fSave For Output As #1
Write #1, txtDisplay.Text

I need it to save it verbatim, without adding quotes but can't seem to get it to work... I even tried the rtf.SaveFile thing but it didn't work either. did the same thing.

Any ideas?
Thanks in advance..

Writing A File In A Text Box
HELP
hiya
i need help for an assignment which is due this week.
I am trying to write information in a text box which i can the save out to a data file.

Any help will be greatfull
Thanks
Carpark69
(Jill)

Writing Hex Into A Text File
hi, I'm trying to figure out how you would write hex chars into a text file, how to sort em out and stuff

I mean I know you use something like:

Open File For Output As #1
Print #1, "Blah blah"
Print #1, "Blah blah some more"
Close #1

but how would I enter a hex number of 12 or something?

thanks!!



Windows Error 015: Unable to exit Windows. Try the door.

Writing To A Text File In VB
Hi...

I am reading text from a file and manipulating it..I want to write the modified data to another file ...Looks like We can not open 2 files at the same time...Can you please help me on how to write the data to a file...For reading, I am using Open fileaname for input....and reading each line intoa n array and modifing it...I want to write that array data into a file...pls help me...


thanks...

Writing To A Text File
I tried using this bit of code


Code:
If InStr(sCurPath2, Form1.Text1.Text & "") Then
Var = Replace(sCurPath2, Form1.Text1.Text & "", "")
End If
Debug.Print Var & sName
FileName1 = "C:Documents and SettingsCyleDesktop ext.txt"
i = FreeFile
Open FileName1 For Output As #i
Print #i, Var & sName
Close #i

The actual program (Var & sName) returns

Quote:




1st_read.bin
Copy of New Folder1st_read.bin
Copy of New FolderReadme
Copy of New FolderReadme.txt
New Folder1st_read.bin
New FolderCopy of New Folder1st_read.bin
New FolderCopy of New FolderReadme
New FolderCopy of New FolderReadme.txt
New FolderReadme
New FolderReadme.txt
Readme.txt




My text file includes this:

Quote:




Readme.txt




What am I doing wrong?

Writing Text To A .txt Document
Hey, I am really new to VB but i am planning on making a program to help out my school, its really lame and stuff but thats okey...

Right here's what i want. I want to make this program where you see the kids name's and you sellect if they are in or late, and what time they were in or late... And once you done all of m, You click SAVE and it writes all the 'in' and 'lates' to a .txt document so you can print it ? anyone got an idea how to do this ?

Thanks a million

-=Mario

Writing Text To A File
i have a text file i have created , which stores if a database macro has been successfull run in a log file.
I am able to write text as :


Open "C:Program FilesLTSPPLlog.txt" For Output As #1 ' Open file for output.

Write #1, "Database successfully Run and exported"; (Now);
Write #1, ' Write blank line.
Close #1 ' Close file.



But it overwrites what is in the file so theres just one line of text. How can i add text to whatever is in the file, as this is a logging file.
append maybe?

Writing Text From Database
Hi There,

I am still a newbie and would appreciate it very much if someone could help me. The problem is only a part of an bigger application that I am developing. The program involves giving the user some text to read. I dont want to hard code the text everytime. I want the give the user for example 5 topics to choose from a list. When he made a choice, the text paragraph chosen, must be loaded from the MS Access database into the textbox.

Thus, there must be 5 paragraph`s in the database (each differ in length), which could be chosen from a list (only the heading). When chosen, it must be loaded to the textbox.

How should one start with something like this, or is there a better way of doing this?

Thanx
PANTHERA

Writing Text To A Printer HDC
I would like to add text to each sheet in a print job.

I am not using the printer object. Instead I am using a PrintManager object from a Autodesk Inventor's API. The PrintManager Controls Print Jobs with a SubmitPrint() function.

The PrintManager object has an hDC property

Is it possible to use the following API function to write text to it?
I gave it a go and nothing seemed to happen.


Code:
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" _
(ByVal hdc As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal lpString As String, _
ByVal nCount As Long) As Long API

~T

Writing To A Text File
Hi,

I have the code below writing the text in textbox7 to a text file. But i also want it to write textbox8 to the same file.
How do i do this


Code:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Using writer As New System.IO.StreamWriter("C: est.txt")
For Each line As String In Me.TextBox7.Lines
writer.WriteLine(line)
Next

End Using
End Sub

Writing To A Text1.text
Hi Guys

How can I write multiple lines to a Text1.text. I have a script that writes to the TEXt1.Text, but it will display the last line it wrote only, it will over write the previous lines. I am using VB6. I need to be able to Append to the Text1 window.

Thanks

Writing Something In One Text Box Displays Something In Another
A wrote in text1 = α displays in text2
B wrote in text1 = в displays in text2
C wrote in text1 = displays in text2
D wrote in text1 = ∂ displays in text2
E wrote in text1 = є displays in text2
F wrote in text1 = f displays in text2
G wrote in text1 = g displays in text2
H wrote in text1 = н displays in text2

The above just gives a brief example of what im looking for. However when i put any of the unicode characters like: αв∂
They appear as question marks and not as the character they are supposed to be. Is there anything i can do to make VB accept these characters? I would like it so when A is wrote in text1 α appears in text2.
Help is more than appreciated. Thanks everyone

Writing To A Text File.
In one of my applications, I write to a text file, that is occasionally used by another program as well. Everything works fine, so long as the other program is not using the file. However, if the other program happens to be using that file while my application tries to write to it, my program gets killed, and throws an error, like 'Permission denied'.

I was wondering, is there a way to bypass this, so that my application doesnt get killed. Instead, is there a way for it to 'wait' till the file is not being used, so that it can resume writing to it? Hope im making sense here.

Writing Text File
i'm stuck on this, maybe someone could offer some insight. I am creating a text file like this. it works just as it should.


Code:
Write #1, CStr(SeqNumber); rs3![ENDORSEMENT]; Addressee; rs3![Address]; rs3![CSZ]; ""; ""; ""; ""; rs3![Barcode]


my problem is i have a combo box that the user can enter in text. i want to loop through the number of list items entered in the combo box (which i have saved in an array) and add them to the beginning of the text line above.

Troubles Writing Text!
Hello,

I've troubles when i use Gdiplus to write text. I've tried two different ways and unlogically i have two different results!

I use a path way and GdipDrawString way. The path way is used to make borders and a simple shadow. But without talking about font parameters now, it seems the result is different although i think i have the same parameters. The results are different in size for instance.
More, when i use path way all font parameters made on strformat variable are not applied !!!

Please look my code :


Code:
Public Sub MakeText(ByVal Graphics As Long, _
ByVal FontRGBColor As Long, ByVal FontName As String, ByVal value As String, _
ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long, _
ByVal FontSize As Long, ByVal FontUnderline As Boolean, ByVal FontBold As Boolean, ByVal FontItalic As Boolean, _
ByVal FontLineAlignment As StringAlignment, ByVal FontBlockAlignment As StringAlignment, _
Optional ByVal FontOpacity As Long = 255, _
Optional ByVal ShadowRGBColor As Long = -1, Optional ByVal ShadowOpacity As Long = -1, _
Optional ByVal BorderLength As Long = -1, Optional ByVal BorderOpacity As Long = -1, Optional ByVal BorderRGBColor As Long = -1)


Dim Brush As Long, PenMain As Long, FontFam As Long, curFont As Long, _
StrFormat As Long, TextRect As RECTF, FontParam As Long, _
Border As Boolean, Shadow As Boolean

If BorderLength > 0 Then
Dim path As Long, PenBorder As Long
Border = True
If BorderOpacity < 0 Then BorderOpacity = FontOpacity
If BorderRGBColor < 0 Then BorderRGBColor = FontRGBColor
Call GdipCreatePen1(GetRGB_VB2GDIP(BorderRGBColor, BorderOpacity), BorderLength, UnitPixel, PenBorder)
End If

If ShadowRGBColor > 0 Then
Dim PenMain_Sha As Long, Brush_Sha As Long, Path_Sha As Long
Shadow = True
If ShadowOpacity < 0 Then ShadowOpacity = 50
ShadowRGBColor = GetRGB_VB2GDIP(ShadowRGBColor, ShadowOpacity)
If Border Then Call GdipCreatePen1(ShadowRGBColor, BorderLength, UnitPixel, PenMain_Sha)
Call GdipCreateSolidFill(ShadowRGBColor, Brush_Sha)
Call GdipCreatePath(FillModeWinding, Path_Sha)
End If

value = StrConv(value, vbUnicode)
TextRect.Top = y1
TextRect.Left = x1
TextRect.Right = x2
TextRect.Bottom = y2

Call GdipCreatePath(FillModeAlternate, path)
Call GdipCreateSolidFill(GetRGB_VB2GDIP(FontRGBColor, FontOpacity), Brush)
Call GdipCreateFontFamilyFromName(StrConv(FontName, vbUnicode), 0, FontFam)

Call GdipSetTextRenderingHint(Graphics, TextRenderingHintSystemDefault)

If FontUnderline = True Then FontParam = FontParam + FontStyleUnderline
If FontBold = True Then FontParam = FontParam + FontStyleBold
If FontItalic = True Then FontParam = FontParam + FontStyleItalic

Call GdipCreateFont(FontFam, FontSize, FontParam, UnitPoint, curFont)

Call GdipCreateStringFormat(0, 0, StrFormat)


If Shadow Then Call GdipAddPathString(Path_Sha, value, -1, FontFam, 1, FontSize, TextRect, StrFormat)
Call GdipAddPathString(path, value, -1, FontFam, 1, FontSize, TextRect, StrFormat)

Call GdipSetStringFormatLineAlign(StrFormat, FontBlockAlignment)
Call GdipSetStringFormatAlign(StrFormat, FontLineAlignment)
Call GdipSetStringFormatTrimming(StrFormat, StringTrimmingEllipsisWord)

'Drawing
If Shadow Then
If Border Then Call GdipDrawPath(Graphics, PenMain_Sha, Path_Sha)
Call GdipFillPath(Graphics, Brush_Sha, Path_Sha)
End If
If Border Then Call GdipDrawPath(Graphics, PenBorder, path)
Call GdipDrawString(Graphics, value, -1, curFont, TextRect, StrFormat, Brush)
Call GdipFillPath(Graphics, Brush, path)




' Cleanup
Call GdipDeletePath(path)
Call GdipDeletePen(PenMain)
Call GdipDeleteStringFormat(StrFormat)
Call GdipDeleteFont(curFont) ' Delete the font object
Call GdipDeleteFontFamily(FontFam) ' Delete the font family object
Call GdipDeleteBrush(Brush)

If Shadow Then
Call GdipDeletePen(PenMain_Sha)
Call GdipDeleteBrush(Brush_Sha)
Call GdipDeletePath(Path_Sha)
End If
If Border Then Call GdipDeletePen(PenBorder)

End Sub



Can you explain me why i can't have italic or underline string, or others when i use path way? What is the best way between the path way and Gdipdrawstring?

Thanks in advance.

VB6 Writing Text To A Picture Box
In my programme I am generating various text and writing it (by the PRINT instruction) to a picture box on my form.

If each piece of text is less wide than my picture box, this works just fine. However if the text is longer than the picture box is wide, it does not continue on the next line but is lost off the right hand side of the picture box, and hence is not visible to the user.

How do I arrange that a piece of text longer than the width of my picture box will in effect 'line feed' when it gets to the right hand edge and continue on the next line please?

Am a newcomer to VB. I expect the answer is very straightforward - but I can't find a Property of a picture box which allows this to happen. In my current project I got round the problem by having loads of Print instructions (one for each line of text) and made sure that none was longer than the PB width. However should I ever re-size the picture box smaller, this will not continue to work.

Solutions will be gratefully received.

C.A.Moore

Writing To A Text File
Ok so I have this code setup to write to a text file what I have in a text box:

Private Sub Command4_Click()
Dim intFileHandle As Integer
Dim strRETP As String
strRETP = "'" & Text1.Text
intFileHandle = FreeFile
Open App.Path & "DATSettingsPutServermsg.txt" For Output As #intFileHandle
Print #intFileHandle, strRETP
Close #intFileHandle

End Sub

And it works, the only problem I have though. Is that it adds a blank line after the text. And it's for a game broadcast system, so adding a blank line makes the broadcast looks kind of messy. Anybody know how to stop it from adding that extra line? Any help would be greatly appreciated.

Writing Text File
AOA,
i have a problem in appending a txt file.
i want to write the data of TextBox in a txt file, each time in the same file.

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