Search Results

Search found 2 results on 1 pages for 'deeps'.

Page 1/1 | 1 

  • How to open a chat window in sender and receiver side [on hold]

    - by DEEPS
    When i am trying to send a message from sender the chat window is always opening in senders side instead of receiver side.so please give a correct code to display chat box in both side. (HTML 5, JAVASCRIPT,JQUERY). This is client side code: //Send private message function sendPvtMsg(data) { var pvtmsg = data; socket.emit('message',JSON.stringify({msg: 'pvtMsg', data: { from: userName, to: toChat, pvtmsg: data }}),roomId); } socket.on('message',function(data) { var command = JSON.parse(data); var itemName = command.msg; var rec_data = command.data.message; var sender = command.data.name; //Receive message from server if (itemName == "message") { document.getElementById("chat").value += sender + " : " + rec_data + "\n"; } //Receive private message else if (itemName == "pvtMsg") { var to = command.data.to; var from = command.data.from; //To display message to sender and receiver if (userName == to || userName == from) { var pvtmsg = command.data.pvtmsg; document.getElementById("chat").value += from + "( to " + to + ")" + " : " + pvtmsg + "\n"; } } function createChatBox(chatboxtitle,minimizeChatBox) { if ($("#chatbox_"+chatboxtitle).length > 0) { if ($("#chatbox_"+chatboxtitle).css('display') == 'none') { $("#chatbox_"+chatboxtitle).css('display','block'); restructureChatBoxes(); } $("#chatbox_"+chatboxtitle+" .chatboxtextarea").focus(); return; }

    Read the article

  • How to get the "real" colors when exporting a GDI drawing to bmp

    - by Rodrigo
    Hi guys I'm developing a ASP.Net web handler that returns images making a in-memory System.Windows.Forms.Control and then exports the rendered control as a bitmap compressed to PNG, using the method DrawToBitmap(). The classes are fully working by now, except for a problem with the color assignment. By example, this is a Gauge generated by the web handler. The colors assigned to the inner parts of the gauge are red (#FF0000), yellow (#FFFF00) and green (#00FF00) but I only get a dully version of each color (#CB100F for red, #CCB70D for yellow and #04D50D for green). The background is a bmp file containing the color gradient. The color loss happens whether the background is a gradient as the sample, a black canvas, a white canvas, a transparent canvas, even when there is not a background set. With black background With transparent background With a white background Without a background set With pixel format in Format32bppArgb I've tried multiple bitmap color deeps, output formats, compression level, etc. but none of them seems to work. Any ideas? This is a excerpt of the source code: Bitmap bmp = new Bitmap(w, h, System.Drawing.Imaging.PixelFormat.Format32bppPArgb); Image bgimage = (Image) HttpContext.GetGlobalResourceObject("GraphicResources", "GaugeBackgroundImage"); Canvas control_canvas = new Canvas(); .... //the routine that makes the gauge .... control_canvas.DrawToBitmap(bmp, new Rectangle(0, 0, w, h));

    Read the article

1