all groups > c# > august 2003 > threads for wednesday august 6
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
C# has poor performance on large file ?
Posted by chris chan at 8/6/2003 11:41:33 PM
I just want to create a large file with size of 80MB
and add a char 1 at the end.
Two method I has been used.
i) seek to the End and write one char
ii) open the file , and append it to the end
both method take nearly 30sec to do so
I want to ask whether they is other method can do this job
... more >>
How to save a picture with graphic from a pictureBox
Posted by lehar NO[at]SPAM jyde.dk at 8/6/2003 11:39:00 PM
Hallo
I have a pictureBox with a picture loaded from file, then I draw some
lines on the picture, and then I want to save the new picture.
Befor I can draw lines I have to create a Graphics object, with g =
pictureBox.CreateGraphic, and draw lines g.drawLines(....)
But when saving the pic... more >>
Socket.SendTo() and headerincluded
Posted by Just at 8/6/2003 11:27:52 PM
Hi everybody
I was wondering if it is possible to use SendTo to send a whole IP package
including header to another IP than specified in the package. Say I have a
complete package and in it the destination IP is set to 10.0.0.3, but now I
want to send the package to a server which has dest... more >>
open a new browser window in Windows Forms
Posted by VR at 8/6/2003 10:49:02 PM
Hi,
How can I open a web site in a new browser window from a
regular windows form? (not an ASP.NET)
Do I have to use a COM ActiveX control or is there
anything like that already built in in .NET?
Thanks,
VR... more >>
GetInterface() without a string
Posted by Gomaw.Beoyr NO[at]SPAM no.spam.please.no at 8/6/2003 9:29:43 PM
If I have an object o and want to check if it's a certain interface,
I write like this:
bool oIsIMyInterface = o is IMyInterface;
However, if I have a Type object t, and I want to check if it's a
certain interface, I have to write the interface name as a string:
bool tIsIMyInter... more >>
PictureBox Control releasing files
Posted by Sean at 8/6/2003 9:02:35 PM
Hello all,
I have an application that is using some picture box controls that are being
used to preview jpg files. The jpg files are created on the fly and will be
overwritten when needed. The issue I'm having is that when I release the
picturebox resources, they still seem to be hanging on ... more >>
resize handles at runtime
Posted by Eric Eggermann at 8/6/2003 7:17:05 PM
I'm making a graphics heavy program, and I need to allow the user to click
on an image or block of text to select it, drag it around a page, and resize
it if necessary. Rather like the Windows forms designer. I haven't the
slightest idea how best to do the resizing handles, and moving the images
... more >>
Comparison of IPAddresses
Posted by Noël Danjou at 8/6/2003 7:10:37 PM
Hello,
I'd like to verify if an IP address (as an IPAddress parameter) is in a
range defined by two other IP addresses (also passed as IPAddress
parameters), something like IsLoopback() but not only for 127.x.y.z and not
only for x,y,z in the 0-255 range.
There is an Equals member function ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
addresses/uniqueness not displayed in debugger
Posted by google.5.warren NO[at]SPAM recursor.net at 8/6/2003 7:05:16 PM
I've been using Visual Studio .NET 2003 with C#, and I find it
annoying that some sort of address (unique id / hash code) isn't
displayed when objects are printed in the debugger (e.g.
{System.Data.DataRelation 235} rather than just
{System.Data.DataRelation}). Doing this would make it visibly a... more >>
Dotted Border
Posted by Karuppasamy at 8/6/2003 6:50:02 PM
Hi
I have created a User Control.
I want to set Dotted Border when the control is getting focus and also
set it back to solid border when it loses its focus.
How to do that?
Thanks and regards
Karuppasamy Natarajan
... more >>
Stats algorithm: Get z-score from percentile?
Posted by Dave Veeneman at 8/6/2003 6:20:59 PM
I'm looking from an algorithm that will do a statistics calculation for me--
it's the first time 'Numerical Recipies in C' has failed me! A normal
distribution table tells me the probability (by percentile) of an item,
given something called a z-score. If I have a z-score, I can look up the
pro... more >>
How to wrap HTML in XML and send it to a webcontrol??
Posted by anthonysmales at 8/6/2003 5:33:47 PM
I have a webservice which implements a webmethod called PrettyXML. This
webmethod loads an XML file and returns the XML, which is then displayed in
a webcontrol (textbox) on a webform.
If no XML file is found, it just returns null atm. I would now like to alter
it so that if the XML file is no... more >>
Error in loading DLL
Posted by MAF at 8/6/2003 5:17:54 PM
Does anyone know what might cause an Error 48 0 when loading a dll from C#?
The dll is in VB.
... more >>
SMP and C#
Posted by Chris Alton at 8/6/2003 4:59:19 PM
Does anyone know if when writing a multi-threaded
application that C# will just run all threads on one
processor? Another question will Windows 2K take the
threads and, if it deems necessary, dole the threads out
to the other processors?
Is there a way to tell the thread to run on anoth... more >>
Mutex needed? multiple readers of an XML file
Posted by pokémon at 8/6/2003 4:58:19 PM
Just wondering if I need to add a Mutex around this section (and if so,
where) where multiple apps will be making the static method call:
public static bool GetDBConn(string dbName, out string connString, out
string dbType)
{
string XMLPath = ConfigurationSettings.AppSettings["xmlFilePath... more >>
displaying pdf from memory....
Posted by at 8/6/2003 4:18:17 PM
I have a pdf that is contained in a byte[] array in memory and I want to
display this in a browser window.
The window will beopenned when a button is clicked on the current web page,
i.e. a second browser window is displayed, preferably with no menu or tool
bars....
Cheers
Jim
... more >>
TCPClient and Asyncronous Socket Problem
Posted by alex002 at 8/6/2003 3:36:41 PM
Dear all,
I am writing to a C# program to connect to the telnet server and getting
data; however, I know that I can use either TCPClient and Asyncronous Socket
to do the program. However, I don't know which is better and why. Can any
one tell me about this? Thank you for all of your help.
... more >>
HSPlits and VSPlit panels
Posted by <.> at 8/6/2003 3:21:13 PM
Is there an easier way to create HSplits and VSplits as currently its a pigs
mess and over involved for what it is. Will this be improved in later
versions or are we stuck with this pigs mess?
... more >>
OpenFile Stupid question
Posted by james at 8/6/2003 3:11:51 PM
What Class.Method should be used to Open a file on the file system
so that the appropriate program is run and the file loaded into it.
Just like as if the user double clicked the file in file viewer.
i.e. if I Open a .doc file and MSWord is set to open .doc files Word
comes up with the file loa... more >>
String enumeration/grouping
Posted by archway at 8/6/2003 2:36:20 PM
I know you cannot have string enumerations such as:
enum myStringEnum {
enumItem1 = "value 1",
enumItem2 = "value 2",
etc
}
However, I was wondering whether you had ever created something that would
mimic this? I have tried the following:
struct myStringEnum {
public const string Enum... more >>
How to serializate TextBox Control
Posted by ekey at 8/6/2003 2:06:47 PM
Hi;
I want to serializate TextBox Control, i try it ,but don't work.
How to serializate TextBox Control?
Ths
Ekey
... more >>
Controls And Colors
Posted by Richard at 8/6/2003 1:45:42 PM
All,
In my Windows based .NET C# application I tried to change
a form's background color to non-gray. The form backround
color change had the desired ripple effect for most
controls on the form however it had no effect, and is a
problem, for:
- a TabControl {not a tabpage - the tabcon... more >>
return key
Posted by Gav at 8/6/2003 1:43:51 PM
Is there a way that I can control exactly what happens when the user presses
the return key in a TextBox?
... more >>
How to call a function in a DLL with a function pointer parameter?
Posted by David Rose at 8/6/2003 1:15:21 PM
I have a DLL (not .NET) that takes a function pointer argument and calls
that function with an integer argument. The DLL is being called from C#.
So far, it is partially working, but the integer argument is getting
corrupted (MessageBoxes in the dll and C# fire).
I do not understand why... more >>
c# 2004 (Whidbey)
Posted by Arman Oganesian at 8/6/2003 12:35:39 PM
Just finished reading about upcoming features in 2004
version of VS.NET and C# in particular
http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx#
whidbey
Looks good and I am very happy (about generics, split
types...), Except 1 thing
Microsoft is reintroducing the "Edit and continue" ... more >>
Instance size
Posted by Ramona van Riet at 8/6/2003 12:25:45 PM
How can I find out what the *instance* size of an object is? I know i can
use sizeof() on value types, but using it on an objhect reference only
gives me 4, which simply means that the reference is a 4 byte pointer.
How can I find out how big the referenced object is, i.e. the total size
of al... more >>
Indexing arrays by Enums
Posted by Mike Scott at 8/6/2003 12:08:20 PM
What is the best way to index an array by an enum. Pascal has a nice feature
in that arrays can be indexed by an enum, for example
type
ButtonType = ( Left, Middle, Right ) ;
var
buttons : array[ ButtonType ] of Button ;
....
buttons[ Left ].Enabled := true ;
It appears that th... more >>
COM/VB6 interop: passing integer in variant
Posted by Lars von Wedel at 8/6/2003 11:42:28 AM
Hello,
I have problems to implement a C# component which is called by a VB6
application through COM. A method Item accepts a variant as a parameter
which can contain either a string or an integer (as an index) to access a
collection.
In certain cases, the integer I extract from the varia... more >>
DataTable.LoadDataRow -Documentation error!!!
Posted by John Viele at 8/6/2003 11:29:24 AM
The documentation of DataTable.LoadDataRow() has a major omission. To
quote:
"Finds and updates a specific row. If no matching row is found, a new row is
created using the given values."
What this does NOT tell you is that it ignores any rows which have the
INSERTED or UPDATED flags set. ... more >>
Getting Windows Service full path
Posted by R A at 8/6/2003 11:03:00 AM
Hi,
I have a Windows Service C# application.
How can I get the full path of the application exe?
Thanks,
Ronen
... more >>
HttpWebRequest and client certs?
Posted by EMonaco at 8/6/2003 9:46:32 AM
Is there any way to programmatically select a particular client certificate
and associate it with an HttpWebRequest instance? I know using WinINet this
was possible.
Erin.
... more >>
ArrayList accessed by string
Posted by Jazper at 8/6/2003 9:31:18 AM
hi
i have a simple question about ArrayLists.
Normaly ArrayLists will be accessed by index-number.
ArrayList arr = new ArrayList();
arr.Add("test");
String str = arr[0].ToString();
Now, i'd like to access not by index-number. i'd like to
access by index-string like...... more >>
TreeView scaling images?
Posted by Bryan at 8/6/2003 9:27:09 AM
I have a TreeView, with an ImageList. The ImageList's size is set to 20x15,
and all of the images it contains are 20x15. When I use it with the
TreeView, though, all of the images are scaled to what looks like 16x16. Is
there some way I can tell the TreeView not to scale the images, and display
... more >>
Visual C Sharp Professional & SQL Server Personal
Posted by TonyC at 8/6/2003 9:14:23 AM
Is there any way to connect to SQL Server with Visual C
Sharp Professional ??
I can successfully test a connection to SQL but cannot
create a connection & message says you cannot do this
with this version of VStudio.... more >>
How to determine if a string represents a valid numerical value?
Posted by Marc Scheuner [MVP ADSI] at 8/6/2003 9:08:52 AM
Folks,
I need to try and make sure that a given string is a valid numerical
value (not just int, or int32 - it could be float, decimal, what have
you). VB.NET has a neat "IsNumeric" function - too bad C# doesn't have
anything similar. Or does it??
I was thinking about trying to convert the... more >>
print snapshot of c# form without using printscreen
Posted by Ruchi Gupta at 8/6/2003 9:06:30 AM
I want to print a C# form by pressing button on the form. It will print
the contents of the form as well with the form layout.
Any suggestions
Thanks,
Ruchi
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
Switch Question
Posted by Craig S at 8/6/2003 8:48:42 AM
I have something like this:
if (strVariable.BeginsWith("SOMETHING")
//whatever
if (strVariable.BeginsWith("ELSE")
//whatever
if (strVariable.BeginsWith("SomethingEvenLonger")
//whatever
Is there any way to put that in a case statement? The key to my trouble is
that the val... more >>
Simple way to check if a string is a correct integer?
Posted by Henke at 8/6/2003 8:36:05 AM
Hi!
Is there a simple way to check if a string entered in a text box is a valid
integer?
Thanks in advance!
/Henke
... more >>
Regex Class (Regular Expressions)
Posted by Demetri at 8/6/2003 7:45:12 AM
Lets pretend you have a string array and each element is a
sentence. Two of those elements read as follows:
1. The fox escaped from the hound.
2. The fox almost escaped.
Now lets say you loop the string array and inside that
loop you use a Regex class to determine if the current
element... more >>
Verifying object's events are not being observed before disposing
Posted by bdotzour NO[at]SPAM hotmail.com at 8/6/2003 6:32:42 AM
Our application makes extensive use of C#'s event handling mechanism
to communicate between classes. A problem has cropped in that it
becomes difficult to know for sure that all observers of an object's
events have been deregistered when it's time to delete said object.
If some other object is... more >>
Design question --- Return a DataSet?
Posted by JS at 8/6/2003 4:50:59 AM
I'm trying to create a data layer and having problems returning a DataSet
from my code that's in a class module.
Please forgive me. I'm new to C# (VB'er). I decided to create my data layer
in small steps. Right now, I'm just trying to attach a ComboBox to a dataset
that's in my class module. I... more >>
comparer and comparable
Posted by nick_tucker NO[at]SPAM hotmail.com at 8/6/2003 4:03:48 AM
Why do we have the IComparable and IComparer interfaces don't they do
the same thing (dispite having function which take in eitehr one and
two parameters respectivly). an you give an exaple of where I would
use one and not the other.
Thanks
Nick... more >>
Using Server GC
Posted by Buddy at 8/6/2003 2:30:06 AM
Hello,
Can someone point me to the site where the source code
exists for where I can launch my application to use the
SERVER GC in Framework 1.0 and Framework 1.1.
Thanks... more >>
Datagrid multiselect
Posted by erald NO[at]SPAM delta-travel.nl at 8/6/2003 2:14:15 AM
is it possible to turn off the multiselect in a Datagrid? if yes, how?
Erald Kulk... more >>
How to make swf file
Posted by HyunKwan,Song at 8/6/2003 1:59:07 AM
hello
Can I make swf(flash file) file using C#?
what I need to make this ?
Do you know any URL to reference this ?
plz, I'll waiting your reply ...
... more >>
Horiz scroll error in tree view
Posted by Jesper DK at 8/6/2003 1:10:54 AM
Hi,
I have docked a tree view to the left on a form. When I
start to populate this tree view with nodes, a horizontal
scroll box appears in the bottom of the tree view even
though thee tree view is big largely big enough to fit
the nodes and text. If I widen the tree view the scroll
bar... more >>
MS Project
Posted by Robert Lario at 8/6/2003 12:49:13 AM
I would like to create a project from C#. Any body got some good
references? I have been looking at what is at MSDN. Could not find anything
that was very helpful.
Thanks
... more >>
|