|
Which calendar? The Web Server Control or the Windows Forms MonthCalendar Control?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have a joystick.I write this code to control my device.but my application has delay after several minute of begin
my receive code:
private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
int count = serialPort1.BytesToRead;
byte[] receive = new byte[count];
serialPort1.Read(receive, 0, count);
foreach (byte data in receive)
{
receivedbyte.Enqueue(data);
}
try
{
ReceiveFrameThread.Resume();
}
}
<here is processframe code:>
void FrameMaker()<br />
{<br />
<br />
<br />
while (permission)<br />
{<br />
bool stop = false;<br />
byte[] tempX = new byte[7];<br />
try<br />
{<br />
<br />
do<br />
{<br />
lock (receivedbyte.SyncRoot)<br />
{<br />
<br />
if (receivedbyte.Count > 7 && !stop)<br />
{<br />
tempX[0] = (byte)receivedbyte.Dequeue();<br />
<br />
}<br />
}<br />
} while (tempX[0] != 0xfe);<br />
lock (receivedbyte.SyncRoot)<br />
{<br />
<br />
for (byte i = 1; i <= 6; i++)<br />
{<br />
if (receivedbyte.Count > 0)<br />
tempX[i] = (byte)receivedbyte.Dequeue();<br />
<br />
}<br />
}<br />
if (permission)<br />
ReceiveFrameThread.Suspend();<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
<br />
}<br />
FrameProcess(tempX);<br />
}<br />
<br />
}<br />
<start code is>:
void Start()
{
serialPort1.Open();
ReceiveFrameThread = new Thread(new ThreadStart(FrameMaker));
permission = true;
ReceiveFrameThread.Start();
}
&
<big>plz say to me how to dicrease this delay
|
|
|
|
|
Hi CP gurus,
I have a gSoap Web Service written using C++, it uses SOAP username and
password authentication.
I also have a C# client consuming the web service, all this was working
fine until I added the authentication on the server, now I can not get the
client to authenticate web service methods. Can someone tell me how to add authentication info
to the SOAP message posted from the C# SOAP client.
It may look something like this...
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://localhost:80/Service.wsdl"
xmlns:ns2="http://tempuri.org/ns1.xsd"><SOAP-ENV:Body><ns2:getBatteryLevel></ns2:getBatteryLevel></SOAP-ENV:Body></SOAP-ENV:Envelope>POST
/ HTTP/1.1
Host: localhost:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 489
Connection: close
Authorization: Basic dXNlcjpwYXNz
SOAPAction: ""
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://localhost:8080/Service.wsdl"
xmlns:ns2="http://tempuri.org/ns1.xsd"><SOAP-ENV:Body><ns2:GetDBOldestPendingRow><iMaxRows>100</iMaxRows></ns2:GetDBOldestPendingRow></SOAP-ENV:Body></SOAP-ENV:Envelope>
No how to add the blocked Authentication line in the SOAP message.....???
Searched Google... but no clue is left....
Thank in advance for your help.....
Have a Happy Coding.....
|
|
|
|
|
I have noticed that updating a DGV (only a couple of cells), still has the application repainting the whole grid when an Update occurs! I have an application with up to 6 DataGrids with 5 columns and up to 40 rows. As I step through my loaded database, I see results changing in real time on the DataGrids but it is very slow as it sweeps across the screen. Flicker is certainly noticeable on cell values that have not changed.
I don't see the need to repaint up to 1200 cells when only a few of them have actually changed (value & BackColor).
Even on a blank grid, I have stepped through the CellPainting Event when only the selected cell has changed yet the whole grid is still repainted.
When I take care of the CellPainting myself, only the cells I want to update are modified some flicker is still visible but the performance is vastly improved. However, the other cells are messed up from other windows when they get on top or when my window is resized.
I have noticed the ClipBounds property from the DataGridViewCellPaintingEventArgs informs you of the area that needs to be painted.
Is there something I am missing about the DataGridView CellPainting? Any help much appreciated!
john1166
modified on Tuesday, May 12, 2009 6:32 AM
|
|
|
|
|
I can get the browser reference through a BHO. I can able to get normal web page document but unable
to get the reference of PDF file which is opened on browser. How can I get, when I googled I found
that
Acrobat.AcroAVDoc avDoc = webBrowser.Document as Acrobat.AcroAVDoc;
avDoc.GetAVPageView();
avDoc.GetPDDoc();
How can I get the refernce of PDF file which is getting loaded on Internet explorer when I try to open
a PDF link...
|
|
|
|
|
HI.
I have two C# application ("first" and "Second") and i call "first.exe" from the "Second" program with this code :
System.Reflection.Assembly extAssembly = System.Reflection.Assembly.LoadFrom("c:\\first.exe");
Form extForm=(Form)extAssembly.CreateInstance("first.Form1",true);
this.AddOwnedForm(extForm);
extForm.Show();
Then I want to pass some parameters from the "second" program to the "first" program .
Can anyone help me please?
|
|
|
|
|
Parameterized constructor?
जय हिंद
|
|
|
|
|
|
Hi friends,
I am currently working on windows mobile.
I need to know how to get different time zones in mobile.
GetSystemTimeZones() function is not available in .NET compact framework.
what would i do to over come this..
Thanks in Advance
|
|
|
|
|
Hi to you all
I'm trying to nudge a picture in excel sheet, but I couldn't do that till now.
Thank you all
mohammed was a great prophet
|
|
|
|
|
Keep trying.
Anyways, what's the question?
जय हिंद
|
|
|
|
|
I have a picture located in cell(D4), I want to nudge it a little right, is there any way to do that.
Thank you
mohammed was a great prophet
|
|
|
|
|
I think Microsoft.Office.Interop.Excel.Picture will help you out.
जय हिंद
|
|
|
|
|
Thank you d@nish for trying to help me,
finally I found the right solution, and I'm going to write it down for every one.
first we have to get the cells range (the code is written within a simple for loop):
object kui = Exl.Cells[i+1,4];
Microsoft.Office.Interop.Excel.Range mr = Exl.get_Range(kui, kui);
then write this lines of code:
mr.Cells.Worksheet.Shapes.Item(i + 1).IncrementLeft(7);
mr.Cells.Worksheet.Shapes.Item(i + 1).IncrementTop(23);
and to rotate the increment you just need to write the numbers within the brackets in negative like that
mr.Cells.Worksheet.Shapes.Item(i + 1).IncrementLeft(-7)
mohammed was a great prophet
|
|
|
|
|
Hi..Experts
I have doubt to get one solution.My task is ,is it possible to take some mobile while we put a data cable to system the folders are be visible in the computer.Shall is any way to create a component in windows form using c#.net ,that by clicking one button the folders may be the sms or images should be copied or drag and drop to that windows form from the mobile.Please suggest me related to this task.
Thanks and Regards
Ch.Gayatri
|
|
|
|
|
If it is a Windows based mobile, RAPI is what you need to use. Here[^] is a library which can help you.
Not sure about other mobiles though.
जय हिंद
|
|
|
|
|
Don't post the same question in multiple forums. Pick one and stick with it.
|
|
|
|
|
Sir plz reply my answer if u know.
Thanks in advance again posted correctly in windows forum.
With Regards
Ch.Gayatri
|
|
|
|
|
hi.., gayatri..,
well am dividing your question in two parts.., that is
1. reading phone related data from the phone (ex: SMS, Phone Book etc..)
2. Reading extranal device data from the phone(ex: The files which are stored in the extranal Flash(momery card))
for the 1st one .., u have to aware of the modem at commands of your Phone manufacturer , for example if u want to read sms from the phone: give the command as AT+CMGL="ALL"(to read all sms's) , AT+CMGR=1(read 1st sms). ( for more details, like reading Phone book , signal quality etc.. read Phone modem manufactures AT Commands Guide). Before this U must have the knowledge of Serial communication.
For Serial communication see: System.IO.Ports Class
for the 2nd one.., Every phone there are two flashs, one is internal flash, 2 nd one is external.., for the 1st one, U must have the Protocol for the communicate the internal flash.., second one u can directly read data from the drive which is detected in your pc.
Thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
yes sir how shall i copied those images and sms from mobile to my own created windows form using c#.net..how?
Thanks and Regards
Ch.Gayatri
|
|
|
|
|
Hi Gayathri!!
The answer for your question HOW SHALL I is not as simple as you think....
Am not discouraging you rather am jus trying to give you some insight regarding your requirement...
As Rajesh clearly divided and explained your problem, you should proceed with a little research on the issues mentioned...
To describe it in a better way...
Requirement: Data from Mobile phone is to be viewed on the computer, Datas from computer to be transferred to the mobile phone(Either to internal FLash or External Flash)
The "data transfer" calls for another lead called communication. So firstly learn, how the communication is carried between the mobile phone and computer...
Secondly, have some knowledge on AT- Commands of mobile phones....
This is the best data on SMS details and AT commands... SMS details[^]
Thirdly, try to learn the interfacing methodologies between mobile and computer...
Once you have some idea in all this, you got a way to proceed....
Learning is fun, if you love learning....
All the best...
Jai Ho!!!!
Have a Happy Coding.....
|
|
|
|
|
Dear All,
I am uploading files to ftp server, which each file gets uploaded in a thread.
i am using the following code to upload files to ftp, upload and every thing is successfull, but my concern is the priority of uploading files.
in following code the file with the smallest size gets uploaded first, but i want that the first file should be uploaded before second and second before third and so on.
foreach (string str in filesToUpload)
{
if (str.EndsWith(".xml"))
ThreadPool.QueueUserWorkItem(new WaitCallback(uploadFile),(object)str);
}
I also used WaitHandles and AutoResetEvent, it did help but it stack my computer and also my UI.
so how can i wait one uploading before another gets uploaed or started?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
You can't do it using the ThreadPool, since QueueUserWorkItem does not guarantee that Item #1 is going to run before item #2. You'll have to implement your own thread and queue to hold the files.
|
|
|
|
|
thx dude, i find out solution
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi Friends, I have a small doubt. Example:
Everytime I want to create a new form I use this:
private void UserMenuItem_Click(object sender, EventArgs e)
{
frmUser frmUser = new frmUser();
frmUser.Show();
}
Is it possible to replace it to something like
private void OpenForm(object ObjName)
{
}
private void UserMenuItem_Click(object sender, EventArgs e)
{
OpenForm(frmUser);
}
|
|
|
|