all groups > c# > february 2004 > threads for thursday february 19
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
Textbox Databind
Posted by mjpiedade at 2/19/2004 10:49:37 PM
I just started with C#.
How do I navigate on a dataset by changing the value of a textbox or other
simple bound controls? Imagine that I have the customer name on a textbox
and have a datagrid with the orders that will display the orders of the
customer that the user enters on the textbox.
With... more >>
Reminder / Follow Ups Application
Posted by Sanjay Rastogi at 2/19/2004 10:16:07 PM
Present I am using Windows.Forms.Timer for reminder. But I want to sleep on events and when every event wake up they call my code. Please give the coding of the below example
for example : let us say I have three reminders..
one at 10am, one at 12am and one at 2pm same da
... more >>
Assembly.LoadFrom when offline
Posted by Greg Bacchus at 2/19/2004 9:50:23 PM
Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFrom.
E.g. Application downloads the assembly while it in online... next time it
is run it is offline and needs to still use that same assembly.
Assembly.LoadFrom throws an exceptio... more >>
Help me in choosing protocol
Posted by irfan_ahmed NO[at]SPAM hotpop.com at 2/19/2004 8:38:53 PM
HI,
I wanted to develop an applicatioin which has to show current currency
rates to to our clients (i.e. 10 currencies and 3 or 4 changes in our
data in one second) and client may buy or sell his lots. Please let me
know if TCP/IP is right protocol to use or should I use something
else. and p... more >>
efficiency question - nested function cals
Posted by Marc Pelletier at 2/19/2004 7:43:21 PM
Hello,
Are nested function calls inefficient (or inherently evil)? In Delphi
I've seen small but significant performance improvements by always
declaring a local variable and 'unwrapping' the nested calls, but I'm not
convinced it is necessarily so in c#. So for example:
public struct T... more >>
Convert a C struct to C# (an interop problem)
Posted by ~toki at 2/19/2004 7:21:37 PM
I'm triyng to use this function
int result = NativeMethods.midiOutGetDevCaps( -1, ref pSI,
(uint)Marshal.SizeOf(pSI) );
Docs say that pSI is a struct (below)
[c++]
typedef struct {
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
CHAR szPname[MAXPNAMELEN]; //... more >>
Help needed in clearing form
Posted by Mike at 2/19/2004 6:43:53 PM
Hello
I have writen a contact form in c# using system.web.mail
I can not figure out how to clear the form once it has been e-mailed.
Any ideas?
Mike
... more >>
OleDbDataAdapter Update Question
Posted by penguinrelief NO[at]SPAM yahoo.com at 2/19/2004 6:42:10 PM
Hi.. I'm making a OleDb connection to a access database.. I can fill
the dataset
fine and view the data, but when I add a new row and try to update the
db I get this error. Any help would be appreciated..
Error: An unhandled exception of type
"System.Data.OleDb.OleDbException' occurred in sys... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Debugging Add-ins
Posted by Saradhi at 2/19/2004 6:27:46 PM
Can I debug my addin written in C#?
If yes, how??... more >>
C# iterators and suspend/resume in Simula 67
Posted by Jiri Kripac at 2/19/2004 6:24:47 PM
Languages such as Simula 67 contain a general concept of coroutines that
allow the execution of a method to be suspended without rolling back the
stack and then later resumed at the same place as it has been suspended.
The C# iterators seem to be a special case of this general suspend/resume
c... more >>
Questionn on interfaces
Posted by Ohad Young at 2/19/2004 6:13:05 PM
Hi,
I have a question on interfaces in C#:
I have a simple interface that is implemented by a class. However, the class
accessibility modifier is internal, while
all interface members are public by default. What is the accessibility of
the implemented interface member?
Here is the code sam... more >>
A mutex puzzle; single instance of application
Posted by Michael A. Covington at 2/19/2004 5:57:47 PM
See:
http://www.ai.uga.edu/mc/SingleInstance.html
While attempting to use a mutex to allow only one instance of my app to run
at a time (Recipe 4.12 in C# Programmer's Cookbook), I found that if the
mutex is in a local variable in Main(), and my program launches any windows
before Application... more >>
Convert VB code to C#
Posted by bebop1 at 2/19/2004 4:56:07 PM
Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim cntrlTester As Control
Dim chkTester As CheckBox
Dim sb As New System.Text.StringBuilder
For Each cntrlTester In _
Page.C... more >>
Namespace problem
Posted by Saradhi at 2/19/2004 4:35:06 PM
Hi Group,
This seems a peculiar problem.
I am wrirng this code for creating a Remote Server=20
Here I am not able to access the namespace.=20
System.Runtime.Remoting.Channels.Tcp
Wts wrong with this one??
Does MS have removed this namespace? and if yes, whats the actual =
namespace ... more >>
can't use "NET USE" at windows services
Posted by Mullin Yu at 2/19/2004 4:10:19 PM
if i put the same code at the windows application or console, i can logon to
the computer. but, if i put the same code at the windows service and start
it, i still can't logon to the machine.
the return value is TRUE.
i tested it by going to windows explorer and then click that computer.
... more >>
Exception from HRESULT when using COM server and ISupportErrorInfo
Posted by Kimmo Laine at 2/19/2004 3:49:50 PM
Hi,
we have a (unmanaged) ATL COM server, which implements two interface:
ITestInterface1 and ITestInterface2. Both of these interfaces also support
the ISupportErrorInfo-interface.
Interface implementation is divided into two class: CTestInterface2, which
implements the ITestInterfac2, and... more >>
C# compare method
Posted by C# newbie at 2/19/2004 3:41:57 PM
Hi Group,
Is there any method in C# search to ingnore the different between some
data which are "same in concept" but different in "the way are stored" ?
Let's say I'm doing a search against an xml data item like :
"What is your name?" but it's saved as "what is your name?"
Any... more >>
.NET IDE BUG?????
Posted by Nadav at 2/19/2004 3:32:36 PM
Hi,
I am compiling a C# Strong named project on two computers, on one computer
the project is being compiled successfully and on the other it generate the
following error:
Cryptographic failure while signing assembly
'D:\...\NPSPool\obj\Debug\NPSPool.dll' -- 'The key container name
'.\NPSPoo... more >>
Formatting in C#
Posted by Smith at 2/19/2004 3:12:18 PM
Like c++, is there any way to apply formatting in c# like println("%c",i) ?
... more >>
Conversions between float and string
Posted by Gustaf Liljegren at 2/19/2004 2:48:22 PM
Values altered when I convert from string to float and back again:
using System;
class FloatTest
{
static void Main(string[] args)
{
string var1 = "800856.22";
Console.WriteLine(var1);
float var2 = Convert.ToSingle(var1.Replace(".", ","));
Console.WriteLine(var2.ToString());
... more >>
How to access an MS access database which has been set up password?
Posted by J. Su at 2/19/2004 2:35:46 PM
Hi,
I want to use C# to access an MS Access database which has been setup a
password by using Set Database Password in Microsoft Access application. How
can I do it? Please help!
Thank for your help.
Z. Su
... more >>
Interface from C# to VB 6 not working
Posted by dnlwhite NO[at]SPAM dtgnet.com at 2/19/2004 2:24:12 PM
I am working on an existing .NET (C Sharp) component that had a com
interface that was used by a VB component. When it was originally
written, it had the SSEAssemblyCom class below - minus the two last
methods (for space I modified method names in my example below). I
added those. Everything ... more >>
Asynchronous Programming
Posted by Steve - DND at 2/19/2004 2:17:02 PM
I'm trying to determine if I need to make my application multi-threaded, or
if it can be done with asynchronous programming. I realize that asynch calls
do create a new thread in the background, but when they come back, they
return to the thread that launched them, is that correct? If I go
multi... more >>
XML issue
Posted by C# newbie at 2/19/2004 2:08:39 PM
Hi Group,
I have a problem with XML! I have an xml file which starts like this:
<Plaftorm PlatformName="empty" PlatformID="1" StyleUsage="URL"
xmlns="http://www.domain.com" PatformProgrammer="mynamehere"
DateTime="09/12/2003 6:00:54 PM">
.......
......
</Plaform>
When I changed it t... more >>
how to implement a C# copy constructor
Posted by Peter at 2/19/2004 1:54:26 PM
I want to copy a parent class instance's all datas to a child's. It's
actually a C++'s copy constructor. But why the following code does not
work - there is a compile error! How it should look like?
(The background is I don't know (I don't care indeed) all members in
DataGrid, so I don't want... more >>
Automate dll register
Posted by RF at 2/19/2004 1:25:29 PM
Hi,
I have a dll that needs to be registered for an application to use. I can
use regsvr32 xxx.dll, however, I'd like to automate this process in a VS
setup installation.
I've created a VS setup project; added the dll to the setup and set it's
propery to "vsdrfCOM". After installing, the dl... more >>
Question on System.Drawing.SystemColors.Window
Posted by OC at 2/19/2004 1:25:17 PM
I have a readonly textbox that displays a message in Red under certain
conditions and default if not. It defaults to "grey" initially (the readonly
color), however, if I switch it back to default using
"textBoxArray[i].BackColor = System.Drawing.SystemColors.Window;", it
displays as White, makin... more >>
Problem with Environment.GetCommandLineArgs() ?
Posted by Chad Z. Hower aka Kudzu at 2/19/2004 1:07:48 PM
Im using Environment.GetCommandLineArgs().
However some of the arguemtns passed in have spaces, so I enclosed them in
"".
For example:
"c:\temp\My area\"
The problem is when I access this as an element of the string array it
treating the last \" (And maybe others" as escape character... more >>
Check if String is a number
Posted by Jose Ines Cantu Arrambide at 2/19/2004 1:04:24 PM
Hi,
Is there a function that can check if a string can be parsed to an int?
(Without using try{}catch{})
Thanks,
Jose.
... more >>
how to navigate in a dataset changing the text on a databound texbox
Posted by mjpiedade at 2/19/2004 12:31:07 PM
I just started with C#.
How do I navigate on a dataset by changing the value of a textbox or other
simple bound controls? Imagine that I have the customer name on a textbox
and have a datagrid with the orders that will display the orders of the
customer that the user enters on the textbox.
With... more >>
convert object to byte []
Posted by steve at 2/19/2004 12:31:03 PM
I need to get byte values from an object into a byte[] in order to write the
bytes to file.
An object (vSound) is passed to a function.
From the Autos window I can see that the Value of vSound is {System.Array}
and the Type is {System.Object}.
vSound has no properties or methods that allow yo... more >>
How do I save a DateTime value in an XML file?
Posted by mengfrank NO[at]SPAM hotmail.com at 2/19/2004 12:16:58 PM
Hi.
I want to save a DateTime value with format like
"2004-02-11T12:11:17.0000000-05:00" using XmlTextWriter.
I think I should write codes something like:
StreamWriter sw=new StreamWriter(FileName);
XmlTextWriter writer = new XmlTextWriter(sw);
// ...
writer.WriteStartElement("FileTime")... more >>
debug native c++ under c#
Posted by Maor Mishkin at 2/19/2004 12:16:53 PM
Hello All,
I have an application that is written in c#, this application calls a native
(not managed) c++ dll, the connection is good and the functions run great, I
have a problem entering the c++ code in debug mode (when trying to step into
to the code).
This could be a big problem for me, if ... more >>
Any free libs or tips on how to dock a tool window form in a MIDI app?
Posted by msadams NO[at]SPAM msadams.com at 2/19/2004 12:11:18 PM
I am attempting to making a app that has similar dockable toolwindows
as VS.Net. Are there any free libs or tips on how to do this?... more >>
ReUsing a defined object - by redefining it
Posted by Bob at 2/19/2004 11:51:11 AM
How can I reuse an object that is already defined. I want to delete some files using the FileInfo class and the "name" is a read only property so I can't set the name as I want to. I don't want to delete all the files only a few of them in different Directories
For example this gives me an error... more >>
Web User Controls
Posted by Luke Ward at 2/19/2004 11:34:59 AM
Hi All
I created web user control that has a few properties and an Update method.
These controls all get initialised and configured (all properties set) at
the page load event.
Today I included an if(!this.IsPostBack) {} around the initialisation code,
so that if an error occurred when the ... more >>
DrawString length
Posted by Frecklefoot at 2/19/2004 11:20:33 AM
I'm using one of the Graphics.DrawString() methods to draw a string on a
surface. I want to know how long (in pixels) the rendered string will be.
I've looked at the Graphics class, but can't find a method that does this.
Is there a way to determine this?
TIA!
... more >>
windows application without any form and control
Posted by Mullin Yu at 2/19/2004 11:16:37 AM
i have created a windows application, but i didn't use any form and control
indeed (like console application).
by default, there's a Form1 at the project, can i remove it or hide it so
that it hehaves like a console application.
thanks!
... more >>
How is a Del represented in a KeyPress event?
Posted by OC at 2/19/2004 11:15:47 AM
Is it something like e.char == ''?
... more >>
How to write a huge stream to a file?
Posted by Rudy Ko at 2/19/2004 11:14:13 AM
All,
I want to write a big binary stream that was getting from
WebResponse.GetResponseStream() to a file. Anyone can help?
Thanks,
Rudy
... more >>
PrintWindow
Posted by WoodBeeProgrammer at 2/19/2004 10:50:16 AM
aargh! what's wrong with the following snippet? i'm trying to use
PrintWindow with a RichTextBox.
[DllImport ("User32.dll")]
public extern static bool PrintWindow (System.IntPtr hWnd, System.IntPtr dc,
uint reservedFlag);
System.IntPtr hwnd = rtf.Handle;
Bitmap bm = new Bitmap (rtf.Siz... more >>
Assigning multiple datatypes to array
Posted by Steve Wasser at 2/19/2004 10:43:54 AM
I've got a DataTable, see? I'm pulling it from a stored procedure, dig? I've
gotta push it to an array for calculating certain columns, then spit it to a
web page. With me so far? The datacolumns are dates, doubles, strings, man.
How do I store all the different datatypes in a multidimensional ar... more >>
Insert query crash(sql server), Date time format, server is not accepting
Posted by seash at 2/19/2004 10:41:08 AM
H
when i execute this query, my query is crashing throwing an exception "cant convert char datatype to datetime type format
my query is "insert into mytable(mydate) values ('"+ varmydate+ "')
iam passing date format as dd/mm/yyyy
my system date is in format dd/mm/yyyy
is there any proble... more >>
ExplorerBar control for dotnet?
Posted by WoodBeeProgrammer at 2/19/2004 10:19:26 AM
does anyone know of a well supported control that emulates the left hand
panel in XP File Explorer? source code available in c# would be nice, but
well maintained is the most important.
Here is one that looks great but is an ocx:
http://www.innovasys.com/products/explorerbar.asp.
... more >>
how to eval a statement from an xml file, in C#?
Posted by Jason Shohet at 2/19/2004 10:14:50 AM
I want to build a rules engine in a rules.xml page. I was thinking it
would look like this:
- Rules
- rule1 if (0 < iTime <= .5) { iFee = 15; }
- rule2 if (.5 < iTime <= 1) { iFee = 20; }
- yada yada
Now lets say in my c# code I loop thru the Rules node of rules.xml, a... more >>
Decompiling and modifying an Assembly....
Posted by GazPym NO[at]SPAM hotmail.com at 2/19/2004 10:13:54 AM
....and recompiling it again
Hi all,
I've got an Assembly DLL and associated .NetModules and want to amend
a function in one of the .NetModules
I've used ILDASM to decompile the .NetModules into IL so I can modify
the code but am having trouble trying to compile up the .NetModule and
eff... more >>
DHTML Component
Posted by Volker Gruber at 2/19/2004 10:01:37 AM
Hello,
have anyone .NET DHTML Components for downloading?
I want to write an own Editor and search for those components.
Volker
... more >>
How to Stop a Process
Posted by Sunny at 2/19/2004 10:01:13 AM
Hi All
I am creating a C# app, in which there are some methods that are considerably longer than the others and take a few minutes to complete, I want to give the users an option to stop that method (which is in process).
I want to include a command button using which the user of the app, can stop... more >>
GetDefaultCommConfig VB v C#
Posted by rollasoc at 2/19/2004 9:31:08 AM
Hi,
I'm trying to get a list of COM ports on my machine using the API
GetDefaultCommConfig.
I've found an example in VB of how to do this but wanted to C# it up.
This works fine but is very slow in C#
In VB it searches for 16 COM Ports in less than a second.
In C# it searches for 10 ... more >>
[CDO] MAPI.Session Logoff takes too long
Posted by Kurt at 2/19/2004 9:26:05 AM
Hi
I am using CDO 1.21 from C# in order to iterate through the entries in a users outlook address book (as OOM was too slow). Basically I take the Name field from each "message" and insert it into a ListBox. I shall paste my code at the end, and describe my problem first
If I call my MAPI.Sessio... more >>
using the event keyword
Posted by Mark Broadbent at 2/19/2004 9:17:59 AM
hi guys, i am currently studying through my book and wonder if somebody
could clear this up before i have to look at other sources.
I have code which defines and creates an event object using a delegate
as the handler as thus..
//Start of code
using System;
// Declare a delegate for an e... more >>
C# design question
Posted by fpw23 NO[at]SPAM hotmail.com at 2/19/2004 8:08:20 AM
Hi all,
I need someone to push me in the right direction. Most of my projects
at work are small tracking applications that help people generate
month end production reports, i.e. (This many users did this many
items between these dates). I have already developed several and they
all do pre... more >>
How do I remove trainling spaces for a compare?
Posted by BobM at 2/19/2004 7:35:18 AM
I have two strings that I would like to compare. To guarantee the compare is
not affected by trailing spaces, I would like to remove them.
Will this do: MyTextBox.text.ToString().Trim()?
... more >>
Event Log Monitoring
Posted by Scott at 2/19/2004 7:34:03 AM
I would like to create a program that will monitor up to
15 different servers over a WAN link. Actually, what I am
thinking is that I will develop an application that will
be installed on each of these remote servers. This
application will do one of the following:
1) Write to a SQL Serv... more >>
Time conversion problem
Posted by ibrahim NO[at]SPAM islamabad-dot-net.no-spam.invalid at 2/19/2004 7:27:40 AM
hi all,
I want to add minutes in a time which is already in string
format.
string time="12:30"; Now add 30 minutes in it how to do
that??
plz help.....
Regards,
Ibrahim
Ibrahim@islamabad.net
Posted Via Usenet.com Premium Usenet Newsgroup Services
---------------------... more >>
Cache Application Settings
Posted by ron at 2/19/2004 7:11:08 AM
hi
I have used the System.Web.Context class to hold my Web application settings in cache for use
Is there a way to do the same with a windows application to hold those settings in a cached state
I have looked all thourgh the .Net Framework looking for an eqiveliant class but i am have trouble fin... more >>
Problem getting value from Datagrid
Posted by CDWaddell at 2/19/2004 6:56:09 AM
I have the following cod
private void btnUpdate_Click(object sender, System.EventArgs e
TextBox tbMembers = new TextBox()
tbMembers = (TextBox) dlClubs.FindControl("tbMembers")
string sqlUpdate = "UPDATE tblClub SET "
if (tbMembers.Text.Length > 0
sqlUpdate = sqlUpdate + "Mem... more >>
CurrencyManager
Posted by Kevin at 2/19/2004 6:46:07 AM
Hi Al
When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use simple bound. So for example if I have a text box, list box and a Datagrid on a windows form, and I want t... more >>
No symbols have been loaded for this document - Answer anyone?
Posted by sho_nufff76 NO[at]SPAM yahoo.com at 2/19/2004 6:41:58 AM
Looking for the be all end all answer to this issue.
1) Yes, i'm running in the Debug mode and not in Release
2) Yes, the timestamp on my pdb and dll file are in sync
3) Yes, i'm tried deleting my project and fetching our source tree
again
4) Yes, the Module window shows that all symbols are ... more >>
Array of Textboxes
Posted by fpleyer76 NO[at]SPAM gmx-dot-de.no-spam.invalid at 2/19/2004 6:27:14 AM
Hi,
can anyone tell me what ist wrong with this code ?
TextBox[] txtField = new TextBox[4];
txtField[0].Text = "Hello";
I get the error :
An unhandled exception of type 'System.NullReferenceException'
occurred in PentaEngine.exe
Additional information: Object reference not set to an ... more >>
How do I get data from Database Table selection into other TextBoxes?
Posted by 4 at 2/19/2004 6:24:06 AM
I am having some trouble w/ a school project database that I am doing. The
database is used for a ski rental shop. In the rental table I have various
customers w/ rentals on different days. I have a combobox that selects the
customer number from my customer table. What I would like it to do is
p... more >>
Save and retrieve image in SQL Database using Data adapter commands with C#.
Posted by bassembwa NO[at]SPAM hotmail.com at 2/19/2004 5:31:43 AM
Hi all...
I searhed for a code to save and retrieve image from SQL database
using Data adapter but I didn't found anything.
Thanks,
Bassem.... more >>
Iteration depth
Posted by netronproject NO[at]SPAM hotmail.com at 2/19/2004 4:46:46 AM
Was wondering what the iteration depth limit is in C#? This is in the
context of a recursive (LOGO) parser, wether I should watch the level
or not.
Thx!... more >>
Combo Box
Posted by Jonny at 2/19/2004 2:11:08 AM
Hi,
I need to a select the last entry in a sorted combo box. The index isn't a set number so it could be any number... it is populated on form_load.
Any idea's??
Thanks
/Jonny... more >>
Vote for a edit/continue function in csharp whidbey
Posted by wimthepimscake NO[at]SPAM hotpop.com at 2/19/2004 2:04:53 AM
Hi,
I recently was at the MS dev days and some speaker mentioned that there is a
cool feature that allows edit/continue, so you can debug, edit and continue
without recompiling. But, this feature was only for VB, because the
development team thinks that c# developers aren't interested in such ... more >>
iis management using wmi in c#
Posted by Bill at 2/19/2004 1:14:56 AM
As I have looked all over, even MSDN, I cannot find much on iis management
using wmi in c#. Does anyone have sample code or any documentation. If so
please email to me bduffy@no.spam@4duffy.com
remove no.spam@ of course
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-vir... more >>
Custom UserControl with subcontrols (designer support)
Posted by martin2k NO[at]SPAM tiscali.de at 2/19/2004 12:44:15 AM
Hello,
i tried to compose myself a custom usercontrol which is derieved from
System.Windows.Forms.UserControl.
It contains 2 comboboxes and one textbox (which are also custom
controls,
but directly derived from the .net classes ComboBox and TextBox)
I did the custom control in the visual... more >>
how to navigate in a dataset changing the text on a databound texbox
Posted by mjpiedade at 2/19/2004 12:10:25 AM
I just started with C#.
How do I navigate on a dataset by changing the value of a textbox or other
simple bound controls? Imagine that I have the customer name on a textbox
and have a datagrid with the orders that will display the orders of the
customer that the user enters on the textbox.
With... more >>
|