|
hi friends..i want to group and ungroup graphic objects...am storing these objects in arraylist..so please help me.......
txs in advance...
|
|
|
|
|
hmmm... well if you need them to stay in your array then maybe you need to add a 'group id' property to your graphics object
i would suggest a groupObject that contains a collection of graphics objects;
Then you have a collection of groups rather than directly collecting graphics objects.
Just one approach to think about
If only MySelf.Visible was more than just a getter...
|
|
|
|
|
Hello ,
i find this code in C#
public static Image GetImageFromBase64String(string str, bool makeTransparent) <br />
{<br />
return GetImageFromBytes(Convert.FromBase64String(str), makeTransparent);<br />
}<br />
<br />
private System.Windows.Forms.PictureBox pictImage;<br />
pictImage.Image =GetImageFromBase64String(txtinput);<br />
in asp they aren't a method Image?
public static Image GetImageFromBase64String(string str, bool makeTransparent) <br />
{<br />
return GetImageFromBytes(Convert.FromBase64String(str), makeTransparent);<br />
}<br />
<br />
private System.Web.UI.WebControls.Image pictImage;<br />
pictImage.??? = GetImageFromBase64String(txtinput);
help me to get this picture, thank you verry mutch.
|
|
|
|
|
I think you are getting confused between PictureBox control and image itself. Picturebox is a control and you can assign any image to it in Windows forms. where as in asp.net Image is image itself. You need to specify either the url of the image or you can write the image to Response.Outputstream to display it on web page. You can't
set the Image in web application as you can set it in windows app.
In short you need to save the image to temp folder and set the ImageUrl property
OR
Write the image to Response's Outputstream as byte.
|
|
|
|
|
Thank you for your answer, i work on web service, in the output of this web service i would generate a picture, and i don't find pictureBox on toolbox, thank you verry mutch.
|
|
|
|
|
i have a server and client networked application , each time i test them , gives me an error "Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request.
"
Here is the code for the client , knowing that the server doesn't disconnect the current client , the server still see the client as connected
the client code as follows :
<br />
<br />
<br />
<br />
<br />
<br />
void RunClient()<br />
{<br />
try<br />
{<br />
IPAddress ip = IPAddress.Parse("127.0.0.1");<br />
<br />
int port = 5079;<br />
<br />
IPEndPoint ipendpoint = new IPEndPoint(ip, 5079);<br />
<br />
client = new TcpClient();<br />
<br />
client.Connect(ipendpoint);<br />
<br />
Console.WriteLine("The Client has been Connected Successfully");<br />
<br />
lock (client.GetStream())<br />
{<br />
(client.GetStream()).BeginRead(data, 0, data.Length, new AsyncCallback(IASyncResultCallBack), client);<br />
}<br />
<br />
<br />
}<br />
catch (Exception s)<br />
{<br />
this.Invoke(new SetText(SetTextMethod), new object[] { s.Message });<br />
}<br />
}<br />
<br />
void IASyncResultCallBack(IAsyncResult ar)<br />
{<br />
try<br />
{<br />
TcpClient currentclient = ar.AsyncState as TcpClient;<br />
<br />
if (currentclient != null)<br />
{<br />
if (currentclient.GetStream().CanRead)<br />
{<br />
int count = (currentclient.GetStream()).EndRead(ar);<br />
<br />
if (count <= 0)<br />
{<br />
currentclient.Close();<br />
currentclient = null;<br />
GC.Collect();<br />
return;<br />
}<br />
<br />
ReadText(data, 0, data.Length);<br />
}<br />
}<br />
<br />
<br />
lock (currentclient.GetStream())<br />
{<br />
currentclient.GetStream().BeginRead(data, 0, data.Length, new AsyncCallback(IASyncResultCallBack), currentclient);<br />
}<br />
}<br />
catch (Exception s)<br />
{<br />
this.Invoke(new SetText(SetTextMethod), new object[] { s.Message });<br />
}<br />
}<br />
The error is in the following line of code
<br />
int count = (currentclient.GetStream()).EndRead(ar);<br />
<br /> br mode="hold" />when the compiler executes the following code it jumps to the next catch block giving the above error statement .
so what is wrong ????
Human knowledge belongs to the world.
|
|
|
|
|
There's an amazing website that might help. It's called GOOGLE:
Results 1 - 10 of about 4,310 for Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request. with Safesearch on. (0.24 seconds)
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
How to convert a string containing $#351; (and alike) to its intended letter ş
How to do this (I have searched the web giving me examples of Encoding but nothing seems to work)?
|
|
|
|
|
|
I have used the XMLTextReader class to read the data from XML file and displayed
it in a listbox control...
XML file contains a path ...
Now i want to create a DataGrid having a column named Path, and
display the path in it...
I used the following code to create DataGrid..but it does not display
it..What changes should i make inorder to create the grid?Thanks for any help in advance.
private void SetupGrid()
{
DataGrid dg=new DataGrid();
this.dg.Location = new Point(100, 200);
dg.CaptionText = "Table";
dg.Name = "Table";
dg.Visible = true;
}
|
|
|
|
|
|
Your not adding the DataGrid to any control i.e.
Panel1.Controls.Add(dg);
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Is there any way that I can retrieve the content type of a document without going into the regestry. I'm not working with HttpResponse so that's out. I need something like
FileInfo file =new FileInfo(path);
file.ContentType
Only file.ContentType does not exist in dotnet. Please Help
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
I will assume you are using windows ... so you can usually cheat and use the file extension to determine the appropriate content-type. After that you could examine the file contents for known header information. However, the most accurate would be the Windows API: http://msdn.microsoft.com/en-us/library/ms775107(VS.85).aspx[^]
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
My C is not that great. Thanks for the link but can I ask you for an example of how the function is used.
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
|
Tx
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
I have a network (similar to heap) that holds objects of close to 120 different classes.
Objects within the network contains geeneric properties as well.
Task is to create a deep clone of this network. In doing this I do not want to implement ICloneable interface across all the classes of the network.
Is there any way other than serialization to create a deep clone of this network?
|
|
|
|
|
Is there any particular reason for not using Serialization ??
Cloning[^]
|
|
|
|
|
Because of performance and concurrancy problems I cannot go for serialization.
|
|
|
|
|
Hello,
i would encode a word file to base 64 digits, there are a methode to encode a picture "GetBase64StringFromImage", but not for word file. help me please to resolve this grat problem, thank you verry mutch.
|
|
|
|
|
Using a FileStream you can read your file into a byte array. You can then get a Base64 string by calling Convert.ToBase64String() passing in your byte array.
Regards,
Rob Philpott.
|
|
|
|
|
thank you verry mutch for your answer, can you give me an exemple witch help me? thank you.
|
|
|
|
|
Something like this:
string base64;
<p>
using (FileStream fs = new FileStream(@"c:\whatever.doc", FileMode.Open, FileAccess.Read))
{
byte[] data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
base64 = Convert.ToBase64String(data);
}
</p>
You then get your word document as a huge base 64 string which you can save/stream/whatever..
Regards,
Rob Philpott.
|
|
|
|
|
Thank you verry mutch for your answer, so how we can do the conversly of this aoperation, we get a word file from a code 64 digits, thank you verry mutch.
|
|
|
|