all groups > c# > april 2004 > threads for wednesday april 14
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
How do I implement class finalization?
Posted by JollyK at 4/14/2004 10:10:52 PM
Hello everyone,
I have a abstract class called DalBase and in that class I have a couple of
methods. One of the method that I have is called BeginTran() and this class
initializes a private Transaction object. I also have a method called
CommitTran() that disposes the private Transaction object,... more >>
Numbers being rounded off!
Posted by V. Jenks at 4/14/2004 9:34:38 PM
I'm having a problem with the Convert.ToSingle and the
O:C formatting rounding off my floating-point numbers.
When I .ToString a float, it rounds the number. It also
rounds it if I use the "C" or "F" format strings (i.e.
num.ToString("C"))
How can I accurately display a float/currency v... more >>
Processing a 5x5 convolution matrix... what do I do with the edges?
Posted by MrPolite at 4/14/2004 8:59:31 PM
I'm using a 5x5 convolution matrix to do some image processing. (I don't
really know much about image processing). I lose 2 pixels from the edges of
the image. When I apply any 5x5 matrix in photoshop however, it doesn't lose
any pixels around the edges. So I'm wondering what is usually done with... more >>
Implement IActiveDesktop
Posted by Jock at 4/14/2004 8:44:26 PM
Hi,
I would like to be able to implement the IActiveDesktop interface from
the shlobj.h header file - I would like to know how I can create a .Net
assembly from this file so that I can access the ActiveDesktop class etc. I
would like a tutorial or sample working source code - just to get up ... more >>
whats the best way to do this?
Posted by suzy at 4/14/2004 8:42:54 PM
hi,
i am 3 xml files containing train timetables, the columns in each xml file
are "departuretime" and "destination". the difference between the 3 files
are they contain train times for 3 different train companies.
i want to display 3 columns (1 for each company), and display (in HTML) the
... more >>
how do i emulate a http POST using C#
Posted by Mike at 4/14/2004 8:12:34 PM
I need to POST some hidden fields to a page, which i need to load in the
browser window..
i've tryed writting out the hidden fields and doing a
response.redirect/response.transfer but these don't send accross the hidden
fields....
so my question really is how do i send hidden fields and trans... more >>
Tab escape sequence in ComboBox ?
Posted by cybertof at 4/14/2004 8:07:44 PM
Hello,
Is there an easy way to add the TAB character "\t" in a combobox ?
If i do it, instead of alignement I have a 'square' character.
Thanks.... more >>
How to set the length of byte[]
Posted by flyfish at 4/14/2004 6:26:38 PM
If some function just like
SetLength(byteData,100)
.....?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
how can get reference to web user controle (.ascx form) aspx "table"
Posted by at 4/14/2004 5:59:31 PM
hi,
can some one tell me snip code to get reference to web user controle (.ascx
form) aspx "table" and its rows & cells.
regards
Sam.
... more >>
compilation of .net languages...
Posted by Mark Broadbent at 4/14/2004 5:16:57 PM
I think I know the outcome to this question (please forgive me because I
know it is probably asked a thousand times!)
Does Microsoft plan to bring out some kind of mechanism to compile directly
to machine code (i.e. bypassing IL (or further protecting the IL code).
I know that there is a third... more >>
What all is involved in writing an installer for a C# .NET Windows program?
Posted by Will Pittenger at 4/14/2004 5:08:35 PM
I have C# .NET Standard 2003 (not Professional) but did not a Installer
project template in the project template list. How would I use that? I
have one DLL that my program uses. (I needed controls derived from other
controls of my own creation. Without the DLL, the form editor would not
acce... more >>
Some .NET XML documentation tags are not recognized when I update my solution's documentation
Posted by Will Pittenger at 4/14/2004 4:41:56 PM
I have a Windows program C# .NET solution where when I update its XML
documentation, some tags are not recognized and turned into the
corresponding HTML. Those tags include <c>, <code>, <para>, <paramref>, and
<exception>. <remarks> works; I have not tried <include>. Is this a bug in
Studio o... more >>
split string with tab separator
Posted by Grey at 4/14/2004 4:41:42 PM
how to split the string which the separator is TAB.e.g.
string a =3D "abc bcd abc";
a.split('Tab');
Does it need to use some special character...which like vbTab in VB6...
Million Thanks... more >>
Last 16 bits
Posted by Drew at 4/14/2004 4:34:18 PM
How do I get the "last 16 bits" from a 32 bit integer using C#?
(I guess this means the right most 16 bits?)
Regards,
Drew
... more >>
Use of Marshal.FreeCoTaskMem after Marshal.PtrToStructure
Posted by Ken Allen at 4/14/2004 4:31:40 PM
The documentation is not clear on the exact behaviour of the
Marshal.PtrToStructure method and whether it copies the contents of the
IntPtr region to a new managed object or whether it creates the managed
object to reference the same region of memory.
Question 1: should I call Marshal.FreeCoTa... more >>
How to display the system menu on the taskbar without a titlebar or system menu button
Posted by Will Pittenger at 4/14/2004 4:16:48 PM
I have a C# .NET program which does without a normal titlebar for its main
window. Trouble is, I still want the user to be able to access select
commands while the program is minimized. (I provided replacements for the
Minimize and Close buttons.) I understand how to modify the system menu.
I... more >>
php like md5 function
Posted by FrzzMan at 4/14/2004 4:02:04 PM
Hello,
Do you know how to mimic PHP md5 function? I'm using followin function,
but the results are different with PHP result when using Unicode (UTF-8)
characters. Someone please help me fix this...
Try compare PHP's result and following function result with this string
"Tiếng Việt"
... more >>
Software Developer earning his Doctorate needs help
Posted by TurboTim at 4/14/2004 4:01:08 PM
I have been a Software Developer for 25 years mostly PC based for the last 20. I have been earning my Doctorate for the past 4 years and am now doing my Dissertation. The theme of my dissertation is the relationships between job characteristics, job satisfaction and turnover intention among Software... more >>
Display HTML in Application Window
Posted by Bob at 4/14/2004 3:06:05 PM
I am pretty new at C#, so bare with me. I want to be able to read a local HTML file and display it in a browser window within my application. I also want to submit that page to my application and generate a "Post" to a web server and read the contents back and display back into the same browser wi... more >>
OleDbAdapter.InsertCommand and autoincrement IDs problem
Posted by Ivaylo at 4/14/2004 2:56:02 PM
I use OleDbAdapter to fill my dataset from Access database and tables with autoincrement id columns.Also i created xsd schema for my dataset
The problem is that the dataset automatically add neu unique ID which is not correspond to realy added record ID in the database
For exp. in database i have... more >>
How to cast using a Type object?
Posted by Dave Leach at 4/14/2004 2:51:02 PM
I am writing a Windows MDI application in C#. I would like to cast an object to a specific type. I know that the object is of a compatible type. The code below shows what I would like to do, but does not compile, where the cast "(c.ItemType)" produces the error "type or namespace could not be foun... more >>
Changing the height of a toolbar button
Posted by Mike Lee at 4/14/2004 2:45:32 PM
Anyone know it is possible to change the size of a toolbar button either
in the designer or in the code? in the designer it's greyed out while
when I try it in the code I get a compiler error. Please advise, thank you.... more >>
CheckBox in Datagrid
Posted by Jim Ptak via .NET 247 at 4/14/2004 2:43:17 PM
I am desperate for help=2E I am at a loss=2E I have a dataset with 4=
columns in it=2E The first column is an actual column from a=
database table=2E The last three columns are hard codded values of=
0=2E I am using this dataset to populate a datagrid=2E The datagrid=
has a datagridtablestyl... more >>
convert Table to HtmlTable and Word.Table
Posted by Michael Meckelein at 4/14/2004 2:27:30 PM
Hi all!
I have a table like
Table myTable = new Table();
Now, I want to publish the table as part of a webpage and as part of a word
document. I tried to convert the table, but the compiler say
"Cannot convert type 'System.Web.UI.WebControls.Table' to
'System.Web.UI.HtmlControls.HtmlTable'... more >>
SaveToFile within Exchange Store Event
Posted by gerry at 4/14/2004 2:20:35 PM
I have an async OnStore event written in c# and registered in exchange 2003.
Everything seems to be working fine other than the SaveToFile().
If there is an error in the iMessage.DataSource.Open ( ie. the message has
moved ) the expected exception is raised and caught.
However when the strm.Save... more >>
Problem rebooting console app
Posted by Brady Kelly at 4/14/2004 2:03:56 PM
When I use the ExitWindowsEx function in my C# console application it
doesn't reboot. Any ideas why?... more >>
TreeView - editing node labels
Posted by Sam at 4/14/2004 1:11:02 PM
I'm having problem. I want to have a block of code run, after a user edits the label of a node, so I put the code in the event method of the afterLabelEdit event. The problem is that this code is called even before the label is finished being edited - its being called as soon as beginEdit is calle... more >>
permutation
Posted by user NO[at]SPAM domain.invalid at 4/14/2004 12:15:26 PM
Hello
I have Array of 50 ints. I want to receive random permutation, so
in each int will be different number from 0-49.
Is there any class for permutation ?
Thanx
Michal
... more >>
generic data structure question
Posted by Bob Weiner at 4/14/2004 12:04:13 PM
I'm new to C#.
What is the best (in terms of programmability and use) data structure to use
to maintain an array of information with containing 3 fields of differing
types. For instance:
string name
int age
bool gender
If I created an array of structs would I be able to retri... more >>
error code
Posted by frazer at 4/14/2004 11:46:16 AM
hi
i want to get the error code when an error occurs. is
catch(Exception ex)
{
ex.GetHashCode() //will this return a unique number for every error?
}
... more >>
Hashtable, memory leak?
Posted by Derrick at 4/14/2004 11:26:33 AM
I'm seeing what looks like a leak with Hashtable, but guessing it is
something I'm doing -
void func1()
{
Hashtable hash = getHash();
//Loop thru assorted data, check to see if data exists as key in
hashtable.
hash.Clear();
hash = null;
}
Hashtable getHash()
{
//... more >>
MSXML2 (DOM) or System.Xml Classes ???
Posted by genc ymeri at 4/14/2004 11:23:02 AM
Hi,
I'm really in the middle of the crossroad over here. My app recieves an XML
files and process it. This XML file contain some data and relationships
which are based on bussiness rules. My app based on these rules should make
a validation to process it or not further down......
While I'm ne... more >>
parameterized queries in C# - Must declare the variable
Posted by Wajih-ur-Rehman at 4/14/2004 11:09:20 AM
I am using the following query:
query = "insert into SystemEventsProperties (ID,PName,PValue) values
(@id,@pName,@pValue)";
OdbcParameter param1 = new OdbcParameter(); param1.DbType =
DbType.Int32;
param1.ParameterName = "@id"; param1.Value = maxId;
OdbcParameter param2 = ... more >>
appdomain unload ->System.Threading.ThreadAbortException: Thread was being aborted
Posted by José Joye at 4/14/2004 10:47:37 AM
When I unload an appdomain I have created, I always get the following
exeption:
System.Threading.ThreadAbortException: Thread was being aborted.
Before calling the Unload() method, I set to null all the references I have
to objects in the AppDomain.
Any idea?
Thanks,
José
... more >>
Custom control: Allow null property value
Posted by Derrick at 4/14/2004 10:26:58 AM
I have created a custom control, and for one of its properties it is
possible that the value may be null. However, at design time when a null
value is assigned, I get the error "The object 'myControl1' returned null
for the property 'TheProperty' but this is not allowed".
The property itself ... more >>
treeview
Posted by frazer at 4/14/2004 10:21:41 AM
hi i have a set of bitmaps in an array.
and i want to add it to a imagelist so that i can show those images in my
treeview.
imageList2.Images.Add (Image.FromHbitmap (picture.Bitmap)); //cant use this
gives me an error
do i need to convert from bitmap to a memory stream?
thanx
... more >>
regex split
Posted by William Stacey [MVP] at 4/14/2004 10:16:36 AM
Would like help with a (I think) a common regex split example. Thanks for
your example in advance. Cheers!
Source Data Example:
one "two three" four
Optional, but would also like to ignore pairs of brackets like:
"one" <tab> "two three" ( four "five six" )
Want fields like:
fiel... more >>
int to byte[]
Posted by Kimmo Laine at 4/14/2004 10:03:56 AM
Hi,
how can i convert int/long/? to byte[]:
public byte[] GetBytes( int i ) {
// . . .
}
public void Foo() {
byte[] b = GetBytes( 1001 );
// . . .
}
thx
Kimmo Laine
... more >>
How step into unmanaged C+++ ATL/COM code?
Posted by Ed Sutton at 4/14/2004 9:58:44 AM
How can I step into my ATL/COM object source code from my C# project?
Both my C# project and my C++ ATL/COM project have been added to the
same solution. My C# project uses a project reference to my ATL/COM
project. I set my ATL/COM project DebuggerType=Mixed. I did not see a
similar set... more >>
databindings
Posted by frazer at 4/14/2004 9:57:11 AM
hi i have the following code in my project
ArrayList pictures = (new Pictures()).GetAllPictures();
allPictures.DataSource = pictures;
allPictures.DisplayMember = "pictures.ToString()"; //pictures.ToString
returns the names of the pictures.
allPictures.ValueMember = "pictures.Bitmap"; ... more >>
AxInterop and Interop
Posted by skrishnan NO[at]SPAM snet.net at 4/14/2004 9:51:43 AM
When I use a COM control (via add reference) it generates interop
when the com is dragged into a form it creates axinterop.
what is more interesting is the axinterop works fine, the interop
causes com exception error.
i know these inherit from different base classes, but why the problem.
... more >>
available memory
Posted by Kovan Akrei at 4/14/2004 9:48:45 AM
Hi,
I wonder if it is possible to get hold of avaiable memory (only RAM) on a
machine through .Net class library? I do not want to call windws API.
I would like to use this to decide how many alive threads my program could
have each time the program runs. I use a number of threads in a simulatio... more >>
convert string to bstring
Posted by mick at 4/14/2004 9:32:37 AM
Anybody know how to convert a string into a bstring in c#?
I'm working with a com component from which one of the functions has an argument of type bstring.
Thanks in advance,
Mick... more >>
loading "private" assemblies
Posted by BillyMac at 4/14/2004 9:16:04 AM
Hello
I emply a "plug-in" architecture for a .NET Windows service. At OnStart, the service browses for DLL's in in sub-folders and loads them dyanamically using Assembly.LoadFrom()
The service executable is placed in its own folder with the assemblies required for its successful complilation.... more >>
c# code
Posted by juan at 4/14/2004 8:34:28 AM
hi
i was going thru some samples and i couldnt understand what this line means
public delegate void DataListItemEventHandler(object sender,
DataListItemEventArgs args);
what is a delegate and what are delegates used for?
thnx
... more >>
Tutorial using Datagrid
Posted by The Cleaning Wonder Boy at 4/14/2004 7:10:15 AM
Anyone know of a tutorial on building Winforms application with a
datagrid and ADO database using Stored procedures?
I am fluent in Delphi and migrating to C# and don't understand why the
difficulty with datagrids...... more >>
Updating the first row only?
Posted by George at 4/14/2004 6:36:05 AM
The flow of my app is as follows
1) Pull up an order and change the quantity of a textbox item. (Ex: change the quantity from 1 to 2
2) Click on the Update button
3) When the page posts back you should see the updated quantity of the item. (by the way, in some cases there will be multiple lines f... more >>
Late Binding to a Imported Interface
Posted by Jim at 4/14/2004 6:11:02 AM
Hey all
I'm trying to late bind a VB6 object in Component Services using c#. I've been able to do tons of late binding, but now that I have a com+ object that doesn't have a method exposed directly, I'm having tons of trouble. (lots of research, lots of newsgroups, but no success!
I have an exis... more >>
Is there a public: equivalent in C#
Posted by Brian at 4/14/2004 5:50:25 AM
This has most likely been asked before, but Google still won't allow
certain search strings such as "public:".
In CPP, you can declare a class such as...
class Foo
{
public:
Foo()
{
}
~Foo()
{
}
int m_Bar1;
int m_Bar2;
int m_Bar3;
};
If an object is bas... more >>
Remoting Problem:Requested service Not found
Posted by vijay at 4/14/2004 5:45:15 AM
Hello
I am learnign Dot NEt
I have implemted
1. remote object
2.Listener
3.Client
Listener started and listening to requests
Client started and able to nstantiate remote object
But when a Remote object method is invoked, following error happens
Error
System.Runtime.Remoting.RemotingExcep... more >>
size of a *bool*
Posted by Daniel Jin at 4/14/2004 5:36:04 AM
I read somewhere that a bool is 1 byte unless if it's in a array, then it will be 2 bytes. is that true? if so, any explaination to why that is?... more >>
GDI+: Problem with PictureBox
Posted by MAY at 4/14/2004 2:50:19 AM
Hello,
I drew some lines and rectangles with pen and brush on a picturebox, i want
convert these lines into bitmap. How can i do that??
Thanks in advance!
MAY
... more >>
Session variables
Posted by Bonj at 4/14/2004 2:31:06 AM
I see Session variables time out after 20 minutes (or whatever number of minutes you define)
I want to have some variables that won't time out, but they only occupy very small amounts of data, say 10-20 bytes per user, so I think it won't too much of a performance impact to store it in the web serv... more >>
Datagrid / Dataset question
Posted by Phil Snijder at 4/14/2004 12:27:39 AM
Hi there,
I have a form with a Datagrid on it; Datagrid is bound to an untyped dataset.
When I fill the dataset (with an oleDBDataAdapter), the data is not diplayed directly in the grid;
I have to expand some control that appears in the datagrid, and then select the table name
before the dat... more >>
Returning Exit Codes
Posted by Andrew Hayes at 4/14/2004 12:26:03 AM
Hi All
I'm calling an old VB6 program from a C#.NET application using a Process component and I was wondering if the VB6 EXE can return an exit code different than 0
I know I could use the Environment.ExitCode property or even the Environment.Exit method if the called app was written using VB.NE... more >>
|