all groups > c# > august 2004 > threads for friday august 20
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
Need to call a C# DLL from WINAPI DLL
Posted by John Hann at 8/20/2004 11:17:56 PM
I'm trying to extend the version of IAS server included in Windows
Server 2003 with a custom DLL. IAS, unfortunately, insists on loading
Extension DLLs with the Win32 LoadLibrary() function, which means that
wrapping my DLL with COM or .Net is not supported. So, I'm wondering if
there is a g... more >>
GDI+ graphic layer problem
Posted by pei_world at 8/20/2004 10:39:02 PM
Hi
I want to create a image with multiple layers on top. the background color
of each layer should be transparent except the last one, hence I can only
see the drawed items on such layers.
can anyone tell me whether or not C# allow to do this?
pei_world
... more >>
Compiler resolves to wrong overloaded constructor or method
Posted by Philippe Bertrand at 8/20/2004 9:31:27 PM
Is this a bug in the C# compiler or CLR runtime?
enum MyEnum { ZERO = 0, ONE = 1, TWO = 2 }
class Foo {
public Foo(string,object) { ... }
public Foo(string,MyEnum) { ... }
}
Foo f = new Foo("", 0); // Uses Foo(string,MyEnum) constructor instead of
Foo(string,object)
Foo f = ne... more >>
HOWTO: Read and Write the Registry to persist State
Posted by Dan Sikorsky at 8/20/2004 7:18:41 PM
Should application data be read and written to the Registry to persist
state, or should the App.config file be used?
If the Registry should be used, what .NET class reads and writes the
Registry?
If the App.config file should be used, reading a configuration setting is
trivial, but there ap... more >>
Text recognition
Posted by Maya at 8/20/2004 6:29:36 PM
Hello guys,
Is there an easy way in C# to recognize and pull the text between the
"From:" and "To:" strings in the following text:
..... From: John Smith To: Suzan......etc.
So at the end I would have a variable in my code has the value "John Smith"
retrieved from the above text.
Thank... more >>
How to auto-re-compile with /debug option from inside DbgCLR.exe Debugger ?
Posted by k.clark NO[at]SPAM lucent.com at 8/20/2004 5:34:04 PM
When I load a csharp program into the MS DbgCLR.exe debugger and trace it everything is fine the first time.
Assume now, I change somewhere a code statement in the source file (outside the Debug-IDE) without re-compiling it.
DbgCLR.exe recognizes that something has changed in the source file and... more >>
Question about StructureToPtr
Posted by afatdog at 8/20/2004 5:05:07 PM
[StructLayout(LayoutKind.Sequential)]
public struct COPYDATASTRUCT
{
public IntPtr dwData;
public ulong cbData;
public IntPtr lpData;
}
public struct AAA
{
public byte No; // ǹºÅ
}
COPYDATASTRUCT CopyDataStruct=new COPYDATASTRUCT();
AAA aaa=new AAA();
aaa.No =1;
CopyDataStruct... more >>
Any free hosting for .net web application?
Posted by dale at 8/20/2004 5:03:03 PM
Hi,
Does anyone get successful with free hosting for ASP.net web application?
If so, may I know web of hosting company? www.brinkster.com's free package
does not work for this, do not know why?
Thanks. -Dale... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
array verses ArrayList
Posted by Tom Jones at 8/20/2004 4:49:07 PM
I have a class that contains a collection of reference types. This class
needs to have a method that returns the collection to the caller.
The method's signature could be either (it could also be implemented as a
property):
MyObject[] GetObjects();
or
ArrayList GetObjects();
The ca... more >>
Using serial number from Customer Information page (vs.net)
Posted by Mark Harris at 8/20/2004 3:58:11 PM
I have an installer which uses a Customer Information page in it, is there
an easy way to pass the
serial number entered to a custom action?
If not, where would i find the serial number in the registry?
I'm using C# for the custom action
--
Mark Harris... more >>
Exceptions reading empty string from file
Posted by Claire at 8/20/2004 3:49:21 PM
This works ok in a new empty project. I write an empty string to a file.
Looking at the file with a hex editor, there's a single byte of value zero.
I expect this, it's utf8 encoding and this is the leading length byte.
In my "real" project I have the following code. The first MessageBox tell... more >>
Framework version issues
Posted by Tomas Vera at 8/20/2004 3:33:04 PM
Hello All,
I'm running into a problem that I don't know how to solve (properly,
at least).
Our web servers are running Win2K and have Framework v1.0.3705 running
on them.
We have a DLL that we use to verify product registration information
from our clients.
Earlier this year, our (pro... more >>
DataGrid with ComboBox - won't allow me to add more than one new row???
Posted by PeterZ at 8/20/2004 3:31:16 PM
G'day,
After doing much searching and pinching bits of ideas from here there and
everywhere I came up with a fairly 'clean' solution of including a comboBox
into a dataGrid column.
You can download a fully working C# sample with the Northwind.mdb here:
www.insightgis.com.au/web/stuff/DataGr... more >>
Decimal numbers with possible null values?
Posted by Gustaf Liljegren at 8/20/2004 3:17:46 PM
I searched for previous answers on this, but couldn't find something
fitting. I need advice on how to store decimal numbers with possible
null values in memory. The numbers may be negative, so storing null
values as -1 doesn't work. The numbers are amounts of money, so
decimal is the best dataty... more >>
How does C# assign index values to SortedList items
Posted by studen77 at 8/20/2004 2:57:01 PM
I'm not comprehending how C# assigns indexes to items you add to a SortedList
item. Here's some example code:
sl.Add ("first_item","First Item");
sl.Add ("second_item", "Second Item");
sl.Add ("third_item","third item");
sl.Add ("fourth_item","fourth item");
I then run a FOR loop t... more >>
Regexp Question: Two Nots Makes a Right to Left?
Posted by spedlists NO[at]SPAM erstads.com at 8/20/2004 2:49:13 PM
There must be a simple regexp reason for this little question but it's
driving me nuts. Below is a simple regexp to determine if a string
contains only numbers. I'm running these two strings through the two
very subtly different pieces of code: "0" and "0a"
If I do the two "nots" on it, it ... more >>
Windows Service Installation Error
Posted by dparden at 8/20/2004 2:43:02 PM
I have followed the instructions for in the Walkthrough: Creating a Windows
Service Application in the Component Designer. Everything compiles and
builds fine, but I get an error "The account name is invalid or does not
exist, or the password is invalid for the account name specified." when ... more >>
Looking for feedback on coding style
Posted by Dgates at 8/20/2004 2:37:33 PM
I'm learning ASP.NET, C# and VB.NET, and hoping to get some feedback
from more experienced programmers on a few issues regarding efficient,
readable, well-organized code.
I'm trying to program anything I do in the best possible "style," even
if it's just a silly experiment (e.g., a simulat... more >>
sqlCommand.CommandText rendered
Posted by Skeptical at 8/20/2004 2:19:56 PM
Hello,
I am trying to write a logging component which logs the every sql update and
, delete command passed to the program. My problem is I use bunch of
parameters in my sql command and somehow I need to access rendered sql
statement with all parameter values. I can reconstruct the sql stat... more >>
Why do I need to reference my base class in my UI?
Posted by Aaron at 8/20/2004 1:57:44 PM
If my BIL is inheriting and makes reference to my base class why do I also
need to make reference to my base class in my UI? I thought the BIL could
encapulate away this level of detail from the UI. Am I doing something wrong
here?
... more >>
ConfigurationSetting.GetConfig() I don't get it
Posted by james at 8/20/2004 1:44:08 PM
According to the documentation ConfigurationSetting.GetConfig( string ) is
used to get user defined config settings. Yet, no matter how I try to add
my own sections to the app.config I keep getting errors stating an invalid
config file section found. So, can someone elighten me as to how this i... more >>
C# and Pocket PC
Posted by Oliver Huppert at 8/20/2004 1:40:33 PM
Hi all,
can someone tell me what I need to develop applications for PPC2003 with C#?
I have read several meanings about this topic.
Do I need Visual Studio .NET or is Visual C# .NET Standard enough??
thanks
regards
Olli
... more >>
Reducing memory usage in a windows service
Posted by Greg Merideth at 8/20/2004 1:26:10 PM
I've written a basic windows service to provide some helper xml functions for
my web methods and even thou the service is only about 1k lines long with 1
timer, its mem usage is 10m and its vm mem usage is 14! The same code written
as a program that requires you to click on the menu options t... more >>
Very Basic DataGrid Help Needed
Posted by john_20_28_2000 NO[at]SPAM yahoo.com at 8/20/2004 1:22:40 PM
I manually put a datagrid in on a form. I then added this code to an
event to populate it:
OdbcConnection conn = new OdbcConnection("DSN=CardBase");
sqlCardHolders = "SELECT * FROM tblcardholders " +
"WHERE last_name LIKE '%" + txtLastName.Text + "%'";
DataSet rs = new DataSet()... more >>
Removing Items programmatically - using foreach
Posted by Filippo P. at 8/20/2004 12:32:27 PM
Hi there,
I have a menu (Collection) that needs to be trimmed based on security access
of the
logged user.
protected void AdjustMenuBasedOnUserSecurity(Items ItemsList)
{
foreach (Item i in ItemsList)
{
if (i.Items.Count > 0)
AdjustMenuBasedOnUserSecurity(i.I... more >>
object.TopLevel control
Posted by Levis at 8/20/2004 12:22:15 PM
Hi,
I inherited Button and I created my component (MyButton)
In this button onclick event I want show this objects parent form. When my
form is not MDIChild this codes run correct. But when my form is MDIChild
this codes show MDIParents name.
How can I show parent form name (not MDIParent)
p... more >>
Converting Char[] to String?
Posted by Marcio Kleemann at 8/20/2004 12:20:07 PM
I need to force the first letter of each word in a line of text to
uppercase. The text comes from a TextBox control in a Web Form. I'm new to
..NET and am having a problem.
Since I can't modify the string directly, I convert the string to a char[]
using .ToCharArray() and set the first letter ... more >>
Key.SetValue Help with large Hex value
Posted by yogi_bear_79 NO[at]SPAM yahoo.com at 8/20/2004 11:27:57 AM
I'm trying to set the value of a registry value that contains a rather
large hex value. Can someone look at my code and show me where I am
wrong? The below code appears to work, sort of. But I believe it is
adding my HEX number to the end of the exsisting value rather than
overwriting it:
pr... more >>
inaccurate modulo function?
Posted by johns1111 NO[at]SPAM gmx.de at 8/20/2004 11:23:39 AM
I played a little bit with modulo cause I wanted to implement a small
parser for functions as I stumbled over a calculation error. First I
thought the reason might be a type conversion I did before, but see
this small example:
using System;
namespace modulo_test
{
class Class1
{
[... more >>
LPD printing support
Posted by missoula NO[at]SPAM gmail.com at 8/20/2004 11:19:00 AM
I have a Zebra label printer that I'd like to send messages directly
to (without creating a printer in Windows). Does .NET have any
support for LPD? Thanks!... more >>
Communicating with a Windows Service from a Windows Application
Posted by mjb NO[at]SPAM matsi.com at 8/20/2004 11:17:37 AM
I have written a windows service that has a few methods which have a
return type of dataset. I also have an application that I have
written which I would like to 'hook' into my service and use the
dataset functions I have developed. My service and application are two
seperate projects under the... more >>
How can I get this statement to work: string strData = '\xB';
Posted by Max Adams at 8/20/2004 11:06:32 AM
How can I get this statement to work:
string strData = '\xB';
I get the error: Cannot implicitly convert type 'char' to 'string'.
Can anyone help?
PT
... more >>
Creation of IE Toolbar in C#
Posted by mirek at 8/20/2004 11:02:22 AM
Hi there,
does exists an example how to do %subj%? I've searched google but no usable results found.
thanx to all.
--
mirek novak... more >>
Exposing the ListViewItemCollection from a UserControl
Posted by Zoury at 8/20/2004 10:45:50 AM
Hi Folks!
i've made a UserControl that wraps a ListView control (and some others) and
i'd like to expose the Items and Columns properties. The problem is that
these properties Types are provided has embedded class inside the ListView
class .. i mean System.Windows.Forms.ListView.ListViewItemCo... more >>
Datatable.Select() method, can you specify "TOP"?
Posted by Derrick at 8/20/2004 10:25:24 AM
or is there some other MaxRows type of prop so you can limit result set?
Thanks in advance!
Derrick
... more >>
disappearing controls
Posted by Rachel Suddeth at 8/20/2004 10:17:04 AM
Here is my scenario:
I have a few custom controls that I set up on a form and tested setting
properties and appearances.
Then I added a couple references to the project which add classes I need to
get data from the server to actually do something useful. (These are
generated by 3rd party databa... more >>
Remoting and serialization
Posted by uttam_80 NO[at]SPAM yahoo-dot-com.no-spam.invalid at 8/20/2004 10:02:58 AM
Hello,
We are at a very crucial decision making stage to select between .Net
and Java. Our requirement is to download a class at runtime on the
client computer and execute it using remoting or rmi.
Just to keep my question short I am posting trimmed version of my
code.
//file: Serializable... more >>
Q: syntax for Hashtable within a Hashtable?
Posted by canimal NO[at]SPAM my-deja.com at 8/20/2004 9:59:07 AM
I bet I know the answer already.
I have a hashtable (hMaster) that holds several hashtables ("hTables") each
of which holds other hashtables ("hColumns"). Presently, I am getting at
the info I want thusly (this compiles, at least):
Hashtable hTable = (Hashtable)hMaster[tableName];
Ha... more >>
Datagrid -> DataSet
Posted by Mark at 8/20/2004 8:58:23 AM
Hi, does anyone know how I can simply get the dataset that is bound to a
DataGrid?
Something like...
DataSet dsDataSet = DataGrid1.Tables[0]...........
Thanks
Mark
... more >>
Question about Transaction IsolationLevel
Posted by Mike P at 8/20/2004 8:22:10 AM
I am using transactions on my website and the Isolation Level is
ReadCommitted. Since the website has a lot of traffic this may be
causing it to lock up every now and again.
Can somebody tell me what IsolationLevel I should use if I want the user
to be able to read while a record is being i... more >>
The object is currently in use elsewhere
Posted by talljames NO[at]SPAM hotmail-dot-com.no-spam.invalid at 8/20/2004 8:08:15 AM
Has anyone come across this exception before when dealing with C#
graphics? Have come across some answers that point to the
accelleration control under the screen's
properties/settings/advanced/troubleshooting.
ie the graphics driver.
Other answers include disposing, revalidate.
Any sug... more >>
Using SqlDataAdapter
Posted by W Akthar at 8/20/2004 6:28:24 AM
I am trying to use SqlDataAdapter to execute a Stored
Procedure.
The Stored Procedure is as follows
CREATE Procedure SP_GetAddressesFromContactID
@ID int
AS
SELECT
b.StreetAddress1,
b.StreetAddress2,
b.StreetAddress3,
b.Town,
b.PostCode,
b.County,
b.Status
FROM
Nam... more >>
first exception pause
Posted by Marek at 8/20/2004 5:24:00 AM
What can I do in order to avoid first exception pause?
I am sure everyone already experienced this behavior and there must be a
solution.
regards
... more >>
propertygrid throwing error "Controls created on one thread cannot be parented to a control on a diffrent thread."
Posted by jaire77 NO[at]SPAM eresmas.com at 8/20/2004 5:22:11 AM
In my application I have two threads.
Each of them creates a new propertygrid.
In the property grid I have a property with a color editor.
Whenever i am clicking on the combo box to change the 'Color' in the
first thread is fine.
Any other thread that tries to modify the color in the prop... more >>
Escaping $_ in Regex.Replace
Posted by ranmaguy NO[at]SPAM gmail.com at 8/20/2004 4:43:43 AM
I'm having issues trying to replace text with PHP.
For example, if I have a string of text that reads:
{tag}
And want to replace that with:
$_POST["var"]
I get the following result:
{tag}POST["var"]
The $_ seems to be replaced with the original text. The problem is, I
cannot se... more >>
Add a calulated column to a Datagrid
Posted by GML at 8/20/2004 3:39:02 AM
I have a bound datagrid in C# based on an an SQL query.
The results are displayed in a Sharepoint 2003 Webpart.
I would like to add a new column based on the results of two
columns in the datagrid.
It is not possible for me to do this within the SQL query as
the data provider I am using does no... more >>
HOW TO: Updating text and image columns at the same time?
Posted by Peter at 8/20/2004 3:31:01 AM
Hello,
Thanks for reviewing my question. My SQL table has a few string columns and
a image column. After inserting a new row into the dataset with the columns
populated, I tried calling the Update method on the DataAdapter and I get the
following error: "The query processor could not produ... more >>
call object from string variable
Posted by guzelmurat NO[at]SPAM hotmail.com at 8/20/2004 2:55:38 AM
How can i call to object from string variable ?
For instance
string x = "textBox1";
i want to call the object which name is stored in the x string
variable. The most important thing is the object type is unknown. x
may be stored "comboBox1".
I think Activator.CreateInstance makes it but ... more >>
Communication Between Service and Form Application
Posted by BizzyTalking at 8/20/2004 2:13:02 AM
Would any kindly tell me if its possible to communicate between a service and
a form application. For example, retrieve information from the service, like
current activity or progress of its operations. In particular, I would like
to to monitor more than just whether a service is running. In t... more >>
Adding a Windows Form to a Cell in UltraGrid
Posted by Nilz at 8/20/2004 1:37:02 AM
Hi all,
I want to know is there any facility with UltraGrid with which we can attach a Windows form having a text box and 2 buttons, so that we can write in the textbox and on the click of ok button the contents in the textbox will come in that cell.
If any one know plz let me know. its urgent
Th... more >>
loading XML into a dataset
Posted by Mike P at 8/20/2004 1:23:16 AM
I'm currently reading data from an XML file using XPathNavigator and
XPathNodeIterator to select the subset of data that I want. I've never
using the XPath objects before so I'm not sure how to get this data into
a dataset.
XPathDocument doc = new
XPathDocument(@"C:\inetpub\wwwroot\test\test... more >>
|