|
Yes, I ended up trying some thimg very similar
do
{
bytesRead = sock.Receive(byReceive, byReceive.Length, 0);
totalRead += bytesRead;
Thread.Sleep(100);
strRetPage = strRetPage + Encoding.ASCII.GetString(byReceive, 0, bytesRead);
}
while( sock.Available > 0 );
Now the problem is that without the Sleep it reads the socket once and bails out.
Another problem is that 10% of the time the socket claims to be empty and receives nothing.
I have little hair left to pull out
-- modified at 21:17 Thursday 22nd December, 2005
|
|
|
|
|
when i display Arabic words from data base i see it as ???????
what is the problem ?
and who can solve it in ASP.Net , C# .
Palestine
|
|
|
|
|
Use Nvarchar datatype for storing into database.
and also write n'non english text' in insert query.
Santosh Satalkar
Sr. Software Engineer
Sinoindia GTT
China
|
|
|
|
|
plz give me an example to use this insert query
Palestine
|
|
|
|
|
I am barely a novice in c# and was wondering of any examples writing form variables to Word file variables. I know this can be done in Windows Forms, but I would like to do it in a WebForm. Any help would be appreciated.
dstayton
-- modified at 15:05 Wednesday 21st December, 2005
|
|
|
|
|
Hi,
For one of my project, I need to create a Directx Surface which is Circular. I dont have ides how to do it As All the Draw function of Surface and its overloads will create either Rrectangular or RoundRectangular surfaces.
My basic need is to read a part of surface information from some surface and pass it to a new surface which is Circular in nature and draw it on primary surface.
RVS
|
|
|
|
|
Hi
I have simply created a form in vs2003.
Then i added another form to the project.
when the first form load it starts the other form like this
private void OnLoad(object sender, System.EventArgs e)
{
Form2 fm2 = new Form2();
fm2.Show();
}
But then the I want to get notified when Form2 close,
and i cannot use the ShowDialog(), I simply use
this.close(); to close Form2.
Can someone help me how to get notifed when Form2 close?
Thanks
QzRz
|
|
|
|
|
Try to come up with a subject that is a little more specific. Every question in this forum is a C# questions...
Make an event handler and add it to the Closing or Closed event of the second form.
---
b { font-weight: normal; }
|
|
|
|
|
QzRz wrote: Can someone help me how to get notifed when Form2 close?
Just wire up one of the existing Form events. Wire up Closed if you only care that the form has gone away, or Closing if you want to prevent the close from occuring for some reason:
Form2 fm2 = new Form2();
fm2.Closing += new CancelEventHandler(fm2_Closing);
fm2.Show();
private void fm2_Closing(object sender, CancelEventArgs e) {
}
Share and enjoy.
Sean
|
|
|
|
|
In the mainform (the first form) i have a few events
it has to run through when it close.
So it is in the first form I want to be notified when
form2 close.
I have tried to make the stuff in the first form to
public, but that does not make them to be thrown from Form2.
|
|
|
|
|
QzRz wrote: In the mainform (the first form) i have a few events
it has to run through when it close.
So it is in the first form I want to be notified when
form2 close.
Right, I understood that. The code in my earlier message goes into your "form1", we'll call it.
You have some event in form1 that causes form2 to be displayed (a button click, or a menu selection, or something). That action happens and form2 is created, the Closing event is wired to an event handler in form1 and finally form2 is displayed. The creation of form2, its event wiring and event handling code are all in form1.
When your user closes form2, by invoking a Hide() method, or setting form2.Visible = false , or by clicking on the Windows close button at the top right of the form, the fm2_Closing event handler in form1 will be invoked.
You can do whatever you need to do with the data collected by form2 in that event handler (probably some sort of data validation).
Dig? Share and enjoy.
Sean
|
|
|
|
|
Yes, that did it
I did not know you could do this.
I appreciate you help
Thanks
|
|
|
|
|
Hi:
I am using COM Interop to transfer an array of doubles from Excel to C#. The only way I could find to do this from a google search was to have the data passed to an object. (see code below)
I am unable to cast the generic object into a double[]. In debug mode in C# I can single step into the method and see that dataObject has the elements in it, but I cant find a way to access the elements. Please could you tell me how I can access the elements of the vector?
VBA:
myInterface.CallMethod(doubleVector)
C#:
public int CallMethod(object dataObject)
{
double[] thisArray = (double[]) dataObject; // does not work: says invalid cast
}
Regards, Sam
|
|
|
|
|
What does dataObject.GetType() report the type as?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
I placed this in the method:
Type thisType = dbArray.GetType();
and in debug mode I can inspect thisType as:
{"System.Double[*]"}
Regards, Sam
|
|
|
|
|
Hmm. That stumps me; if the runtime says its a double[], you should be able to cast it unless something's wrong. Maybe you should post in the Tools For Office[^] forum.
|
|
|
|
|
I found the way to do this and have posted an article on this subject:
http://www.codeproject.com/useritems/arraysVBAToCssv1.asp
Regards, Sam
|
|
|
|
|
Hi
I am using crystal report for the first time. I have CrystalReport1.rpt with the name of table and datafields all set. Can anyone tell me how do I display the results after filtering it with a particular field value programatically. I am programming in C#.
Thanks
|
|
|
|
|
After reading thru about 12 pages of postings, and articles on wmi I found nothing explicitly describing or addressing my problem, so here is my question:::
I am Trying to retrieve the serial number from my monitors, I have verified by use of other software tools that this number does infact exist within the PnP data, and **should** be accessible by use of wmi/cim. However every time I have tried to access this information I am restricted to accessing only what the OS says I have, which is *default monitor*. Now as I stated, I have already used another tool to retireive this info, so I know the possiblity exists, so just short of calling a few "friends" over to rough up the devies who created it I'm on the hunt for my own solution. But like I said, the only thing I can find is the *default monitor* from the OS.
I did pursue an attempt with the registry data, but kinda got side-tracked once I encountered the EDID entries being in binary (didn't have the mental capacity that day to try to do conversions), so I left it alone for a few days.
and without trying to spend too much time looking into MIF / DMI I found that that may provide some useful information, but I haven't researched that too much yet.
Now I'm back working on it, and i need to find a way to access this information.
so just short of reading the entire DMI standard just wondering if anyone out there has used any thing that has worked for them or any tips on where / how to find this information (besides turning the monitor around and writing it down. )
Oh, yah, we are using Dell devices, so I know Dell has proprietary software for this, but that isn't an option for us.
thanks in advance
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
Hai all,
I would like to know if there is away to dock the MainMenu anywhere other than the standard top docking. As soon I drag and drop onto the designer it is docked to the top of the form. what should I be doing if I need to have the menubar docked below a toolbar for example?
( toolbar or a panel on the top and the menubar below it)
Any ideas would be greatly appreciated.
Thanks,
VPMahank
|
|
|
|
|
You'll need a 3rd party control to do that. Search the articles here, I know there're docking toolbars available, but haven't looked for a menus specifically.
|
|
|
|
|
I believe you can do this using a ToolStrip (.NET 2.0) combined with a ToolStripContainer (.NET 2.0).
|
|
|
|
|
Could you please elaborate a little bit on how to approach the problem?
Thanks,
VPMahank
|
|
|
|
|
Sure. Place a ToolStripContainer on your form. Place a ToolStrip on the top. It will now be movable to whatever borders of the form you've chosen in the ToolStripContainer settings.
|
|
|
|
|
Hi! I need a little help!
Is there any chance to make a shaped form!? I mean not just transparent in some parts of the form, but when i click on the transparent part of the form, i want the form to lose the focus! I`m also interesting is there any chance to make a shaped button, not the rectangle button with an image of that shape! Because, in this solution, when you click in some corner of the rectangle, where the picture is transparent, and the user think that there is no button, he can still click on it! I want a shape (circle, for example), so user can click on the button only when the cursor is in the circle! And only one more question! Is there any chance to make a button with one image, but when the mouse enter the button, mouse image goes to the moving giff image!? Thanks a lot!
|
|
|
|