How would I get the text from a pic box to print in a text box...?
Printable View
How would I get the text from a pic box to print in a text box...?
Text in a picture box or on a form is drawn on the on the control as a graphic. Once you "print" on the picture box, it is no longer text, but a "picture" of the text.
Hmmm..so i've noticed well i reverted to my original idea of putting in scroll bars but it doesn't seem to be working, i got the code from one of the other posts, but it doesn't see to me working wih text, like it doesn't realize that the text is past the border here is the code i used..
VB Code:
Private Sub CmdBack_Click() FrmRecall.Hide FrmStore.Show End Sub Private Sub CmdGet_Click() Call DisplayFile End Sub Private Sub DisplayFile() Dim recordNum As Integer Dim Question As QuestAns Open "C:\Questions.txt" For Random As #1 Len = Len(Question) PicResult2.Cls For recordNum = 1 To LOF(1) / Len(Question) Get #1, recordNum, Question PicResult2.Print "Question "; recordNum PicResult2.Print "==>"; Question.Question; Chr(13); Tab(7); Question.Ans1; Chr(13); Tab(7); Question.Ans2; Chr(13); Tab(7); Question.Ans3; Chr(13); Tab(7); Question.Ans4 Next recordNum Close #1 End Sub Private Sub Form_Load() Call SetPicSize End Sub Sub SetPicSize() ' Ok, the way this works is you've got two pictureboxes, Picture1 ' and picture2. Picture2 is inside of Picture1 and holds the ' picture that will be seen. First we check to see how big ' Picture2 is. If it's bigger then Picture1, then we'll have to ' use the scrollbars. If PicResult2.ScaleWidth > PicResult1.ScaleWidth Then HScroll1.Enabled = True HScroll1.Max = PicResult2.ScaleWidth - PicResult1.ScaleWidth HScroll1.LargeChange = Int(HScroll1.Max \ 25) + 1 HScroll1.SmallChange = Int(HScroll1.Max \ 200) + 1 Else HScroll1.Enabled = False End If If PicResult2.ScaleHeight > PicResult1.ScaleHeight Then ' VScroll1.Enabled = True VScroll1.Max = PicResult2.ScaleHeight - PicResult1.ScaleHeight VScroll1.LargeChange = Int(VScroll1.Max \ 25) + 1 VScroll1.SmallChange = Int(VScroll1.Max \ 200) + 1 Else VScroll1.Enabled = False End If End Sub Private Sub HScroll1_Change() ' Change the width and position of Picture2 PicResult2.Width = PicResult2.Width + HScroll1.Value PicResult2.Left = 0 - HScroll1.Value End Sub Private Sub VScroll1_Change() ' Change the height and position of Picture2 PicResult2.Height = PicResult2.Height + VScroll1.Value PicResult2.Top = 0 - VScroll1.Value End Sub
come on ppl plz help someone??? anyone???:( :( :( :( :( :( :( :( :( :( :( :( :( :( :(
??? no one?????
bump....please anyone