|
|||||||
| TX Text Control .NET Please use this forum for TX Text Control .NET support only. If you need support for a different product, please use the appropriate forum. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
images added from memory
how can I add a filename or index to an image that has been added from memory? A user can add multiple images and delete them but I need to know the image that the user double clicked on becuase we send a byte array of the image to edit the image. But I need to know which byte array to send. Here is my code to get the image into the text control but how do I assign a unique value once this is done. The file does not exist on disk. It is stored as binary in the db.
Dim stream As New System.IO.MemoryStream Dim buffer() As Byte Dim RTFString As String Dim ImageString As New System.Text.StringBuilder Dim img As Image = byteArrayToImage(aNode.Tag("ImageFile")) Dim strFileUniqueKey As String = GenerateRandomKey() & Path.GetFileName(aNode.Tag("FileName")) da.UpdatePatientNoteImages("UpdatePatientNoteImage s", PatientID, ApplicationInfo.UserID, CInt(NoteID.Text), strFileUniqueKey, imageToByteArray(img, strFileUniqueKey)) img.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg) buffer = stream.ToArray() For Each nbyte As Byte In buffer ImageString.Append(nbyte.ToString("x2")) Next RTFString = "{\rtf1" + vbCr RTFString += "{\shp{\*\shpinst\shpfhdr0\shpbxcolumn\shpbypara\s hpwr2\shpwrk0\shpfblwtxt0\shplid1025{\sp{\sn shapeType}{\sv 75}}{\sp{\sn dxWrapDistLeft}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 0}}{\sp{\sn pib}{\sv " RTFString += "{\pict\jpegblip\picscalex50\picscaley50" + vbCr RTFString += ImageString.ToString() RTFString += "}}" RTFString += "\par}" tx.Selection.Load(RTFString, TXTextControl.StringStreamType.RichTextFormat) |
|
#2
|
||||
|
||||
|
Re: images added from memory
If your using 15.1 then just use the ID property.
|
![]() |
| Bookmarks |
| Tags |
| images , stream |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| printpreview doesn't work with images added with DisplaceCompleteLines | David Burson | TX Text Control .NET | 0 | August 20, 2008 18:25:08 |
| Inserting images from memory | tnoel | TX Text Control .NET | 2 | November 12, 2007 15:14:43 |
| Loading images from memory | wizzard | TX Text Control .NET | 2 | March 1, 2005 14:19:21 |
| HTML + Images = Insufficient Memory Error? | bcpCharles | TX Text Control .NET | 2 | December 27, 2004 22:15:25 |
| Inserting images from memory | Unregistered | TX Text Control ActiveX | 1 | December 6, 2002 11:02:35 |