all groups > c# > november 2003 > threads for monday november 24
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
app.config file connection string when using c# Winforms to MSAccess database
Posted by sutcliffe_grant NO[at]SPAM hotmail.com at 11/24/2003 11:31:23 PM
I am unable to get the connection to work with using the app.config
file.
the connection works when I use 'in line' connection as below:
------------------------------------------------------------------
I have a declaration in the class
private OleDbConnection con;
Then code in a procedure ... more >>
How to get a handle of a object in c#
Posted by violin at 11/24/2003 11:29:46 PM
I want to get the address of a c# object,and store that
address in a IntPtr value, like we use handle in VC6.How
can i achieve it?... more >>
Question about Remoting
Posted by Dom Holmes at 11/24/2003 11:04:51 PM
If I setup a simple remote example with a Server object that creates a
RemoteObject which is then accessed by a Client object, is there any way I
could give the RemoteObject access to the Client object?
I basically need the Client to access the RemoteObject's methods and vice
versa.
Many ... more >>
Problem with refresh after delegate event fires. c# and asp.net.
Posted by George K at 11/24/2003 10:23:30 PM
Hi, i have a very irriting problem that i have written a short piece of code
to demonstrate. The problem is that my aspx page is not fully refreshed
after an event, which is delegated to an ImageButton during runtime, is
fired. Any suggestions would be great. This code is the c# behind a webfor... more >>
Parsing a directory
Posted by John Young at 11/24/2003 10:23:11 PM
I'm trying to parse a directory, but am not sure of the best way of
doing it. Preferably using only .net instructions. Can anyone give me an
idea of how to do this?
Thanks in advance for any help that anyone can give me...
John
... more >>
Calling protected method from interface that doesn't include method
Posted by Jon Shemitz at 11/24/2003 8:57:15 PM
I'm puzzled by this, code clarified from working code
IToolboxService GetToolboxService(IDesignerHost AnyDesigner)
{
return (IToolboxService)
AnyDesigner.RootComponent.Site.
GetService( typeof(IToolboxService) );
}
Now, RootComponent is an IComponent, and Site is... more >>
AxWebBrowser questions
Posted by Nick Howard at 11/24/2003 8:18:55 PM
Hello,
I hope these questions aren't too terribly dumb. I'm
using a AxWebBrowser control in a C# app to display html
to the user. I create the html on the fly. Is it possible
to pass AxWebBrowser a string of html to display instead
of a filename?
One other question. I will have links... more >>
use MSComm control in C#
Posted by jiatiejun at 11/24/2003 7:21:30 PM
I add the MSComm control in my C# program,
but I can't get byte [] data,
only to get string data;
there are some problem when char >126 or <32
How to access NO ASCII char (for examples: like UNICODE Chinese,
Japanese...) like a [0..255] char ?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
class diagram generation tools?
Posted by Dan at 11/24/2003 6:58:11 PM
Hello, I was wondering if anyone knows about a free tool which can build
graphical diagrams of C-sharp classes from CS code... When I programmed in
C++, I used doxygen to create my code documentation together with graphical
representations of classes with their relations using graphviz. Now I use... more >>
newbie question
Posted by Stuart Grant at 11/24/2003 6:31:19 PM
Hi All,
I have just downloaded the Boralnd C#Builder, .NetSDK, .NetRedistributable
etc etc.
I know want to learn C#, can anyone point me to a good resource on the web
and perhaps recommend some books.
On the book front, I have been using Wrox books for Classic ASP 3.0
development and fou... more >>
Timer blocking problems...
Posted by Anthony Boudouvas at 11/24/2003 6:22:56 PM
Hi to all,
i have a form with 2 System.Windows.Forms.Timer objects.
One fire every 5 seconds and the other every 10 seconds,
the both take actions in two hashtables declared in same form.
When timers fire, main form is somewhat blocking until timers finish
their job, (socket operations). (I... more >>
get window handle from point
Posted by Logan McKinley at 11/24/2003 6:08:31 PM
I need to draw a dot where ever the user clicks (which will be on either
the form or a couple dynamically placed picture boxes). I thought the
following code should work:
//---
[DllImport("user32.dll", EntryPoint = "WindowFromPoint")]
static public extern IntPtr WindowFromPoint(System.Drawi... more >>
Please!!! Need help with WebUI.Panel
Posted by Jim H at 11/24/2003 5:56:36 PM
I have a web application which has a WebUI.PlaceHolder on it. I have a
single custom Output rendering control that has a bunch of WebUI.Table
controls (the number is determined at run time) that I add using
Controls.Add during CreateChildControls of the renderer. Everything works
fine with tha... more >>
Cancel escape characters
Posted by Tim Mulholland at 11/24/2003 5:49:51 PM
I am trying to parse a string of RTF pulled from the RTF property of a
textbox, going through it character by character
<example>
string s = textBox1.Rtf;
for (int iii = 0; iii < s.Length; iii++)
{
char c = s[iii];
DoSomething(c);
}
however, the RTF code contains a ton of backslash c... more >>
Convert.ToInt32(double) strange rounding behaviour
Posted by Norvin Laudon at 11/24/2003 5:12:20 PM
Hi,
Can somebody explain the following, from the MSDN documentation for the
"System.Convert.ToInt32(double)" function
<quote>
Return Value
value rounded to the nearest 32-bit signed integer. If value is halfway
between two whole numbers, the even number is returned; that is, 4.5 is
conv... more >>
Serialiazing a form
Posted by NotYetaNurd at 11/24/2003 4:40:45 PM
Hi,
i want to persist a few properties of a form ...how do i do it ? any
leads is greatly appriciated
regards,
....
... more >>
How to insert record into SQL 2k by Insert Statement
Posted by Mullin Yu at 11/24/2003 4:35:23 PM
I got object reference not set, is the connection string wrong? Indeed, I
know int values should be pass to Open() and Execute() method, but don't
know the parameter variable given by .net.
Any help?
// dsn: system dsn
// database: is the database instance used
string connectionString = "d... more >>
Closing form event
Posted by Chris Bruce at 11/24/2003 4:33:39 PM
In my application I need a way to distiguish between the following events:
1. When a user closes an MDI child window.
2. When the user closes the MDI parent window which subsequently closes
the MDI child window.
My application does certain logic when the user actually closes the MDI
... more >>
Parsing strings containing date and time
Posted by Morten Wennevik at 11/24/2003 4:03:54 PM
I'm trying to get a DateTime object out of different strings containing
unknown datetimeformat.
An example would be "Mon, 24 Nov 2003 15:23:13 +0100"
DateTime.Parse() does not work and I'm not sure how to use the
IFormatProvider or DateTimeStyles
Any ideas?
(NB! currentculture is not Eng... more >>
How to access currently logged in user from Active Directory. (Without custom login page)
Posted by anonymous at 11/24/2003 3:46:23 PM
Hi all,
I've been searching the way to achieve the following task.
But no luck so far.
I have a web site(main site), which requires authentication. This
authentication is set at Windows directory level, so user will see the
pop up gray box in order to log in rather than custom web page. T... more >>
Newbie Web Form Problem
Posted by Mike at 11/24/2003 3:42:14 PM
I have done the first walkthrough of creating a basic web forms page where
you use a webcontrol button to display text inside a htmlcontrol.
When I build and browse the form, the button isn't displayed.
The next tutorial uses a web control data grid and that doesn't display.
Any suggestion... more >>
Suggestion: compiler warning/info for implicit boxing
Posted by J.Marsch at 11/24/2003 3:40:22 PM
I don't know whether this is the appropriate place to give product feedback,
but here goes:
I would love to see some kind of diagnostic to let me know when implicit
boxing has occurred.
We have had a few instances where one developer or another was working on
code, and did not realize that ... more >>
Creating a .lnk file programmatically
Posted by John Spiegel at 11/24/2003 3:22:14 PM
Hi all,
How would you go about creating a .lnk file programmatically? I can't seem
to find an appropriate class.
TIA,
John
... more >>
prepending text to a file
Posted by Tony at 11/24/2003 3:20:11 PM
Hi
I am writing text to a fileusing the streamwriter writeline method.
When creating the streamwriter it can be opened to append text to a file.
Is there a way, not necessarily with streamwriter, that I can open a file
and prepend text, so that the newly added data appears at the head of the
... more >>
How to use same filename DLLs in a Exe?(One is)
Posted by kinghuangz at 11/24/2003 3:02:50 PM
Everyone:
I want to use a DLL(FileName:PubFunction.Dll) built with VS.Net(C#) in a
unmanaged Program .But there was a Dll just has the same filename,it was
built with VC++(6.0).The unmanaged was loaded by LoadLibrary function
firstly,and it would be free until the Program's end.How can I Loa... more >>
Dataset to Excel
Posted by Jason at 11/24/2003 2:55:01 PM
Hi
I would like to export a dataset to xml, but not simply writing the XML
equivalent of the dataset. so perhaps call it the true excel file. by
writing the XML equivalent, excel is able to read the file, but not like
proper excel files
Thanks
Jason
... more >>
Drawing a Border for a textbox
Posted by murali_valluri NO[at]SPAM yahoo.com at 11/24/2003 2:47:15 PM
I have tried the following, which draws the border but clears the Text
when the control does not have focus.
Please help.
----------------------------------------------------------
1. Set the ControlStyle to "UserPaint" in the constructor:
public MyTextBox()
{
// This call is required by t... more >>
Delegates with out parameters not marshalling right
Posted by Jerry Houston at 11/24/2003 2:33:15 PM
In a winform application, I use worker threads to perform asynchronous tasks
(e.g., mail merge with Word). The thread procs need to gather some user
options from controls in the UI, and I know that must be done using a
delegate that's running on the main UI thread. (Can't safely access a
windo... more >>
Corrupt C# source file?
Posted by Ed Crowley at 11/24/2003 2:20:55 PM
I have a problem with one of the classes in my project; when I step through
the code the IDE appears to be stepping through lines that do not "exist"
such as blank lines and random lines within comment blocks!
I fixed the problem by pasting the code into Notepad, deleting the class and
recreat... more >>
Memory leak in interop
Posted by Trokey at 11/24/2003 2:17:27 PM
I am making interop calls to an object in a .NET component from a C++
program and am leaking memory... the following is some sample code:
////////////////////////////////////////
// .NET component (Test)
////////////////////////////////////////
// interface
[InterfaceType(ComInterfaceType.... more >>
custumize serialization & CollectionBase inherited class
Posted by wael radwan at 11/24/2003 2:10:31 PM
how to customize the serialization of a collection that inherited form
CollectionBase i.e making the class implementing ISerializable interface
because when deserializing using the desrializing constructor(the one that
has the parametr list as GetObjectData method) i can't using assiment to
Li... more >>
casting problem
Posted by Francois Malgreve at 11/24/2003 2:08:35 PM
in the following code:
object obj = this.ViewState["currentCreditLimit"];
string s = obj.GetType().ToString();
currentCreditLimit = (double) this.ViewState["currentCreditLimit"];
ViewState is a StateBag object (dictionary type object)
the String s shows me that the type is System.Int32, the... more >>
mshtml
Posted by Tam Inglis at 11/24/2003 2:05:58 PM
using mshtml, when i move the document to another i get an annoying prompt
informing me the document has changed (if it has)
how can i get rid of it?
... more >>
C# Crystal Reports Question
Posted by Ed Crowley at 11/24/2003 1:49:59 PM
How do you use a stored procedure as the datasource for a report in Crystal
Reports .NET for C#?
... more >>
Trying again: Need help with RegEx for SQL
Posted by Chuck Haeberle at 11/24/2003 1:49:47 PM
I have an interesting regular expression challenge for someone more
experienced with them than I for a data layer class...
I need an expression to search a SQL statement (any type, SELECT INSERT
UPDATE OR DELETE) and find all single apostrophes which should be replaced
with a double apostrophe... more >>
Email from a windows form
Posted by michaelmctaggart NO[at]SPAM comcast.net at 11/24/2003 1:47:34 PM
Hi all,
Does anyone know how to send an email from a Windows form?
On an ASP.NET form you can use the System.Web.Mail
namespace and create a MailMessage object. I get an
error message when I try a "Using System.Web.Mail;" in a
Windows form. There must be an easy way to do this.
Any... more >>
Erm...
Posted by Chuck Haeberle at 11/24/2003 1:45:28 PM
I just submitted a request for help with a regex and it appeared and then
vanished with a "Message no longer avialable'...
I don't suppose anyone else can see it?
... more >>
Regular Expression Help
Posted by Chuck Haeberle at 11/24/2003 1:40:10 PM
I have an interesting regular expression challenge for someone more
experienced with them than I for a data layer class...
I need an expression to search a SQL statement (any type, SELECT INSERT
UPDATE OR DELETE) and find all single apostrophes which should be replaced
with a double apostrophe... more >>
Change treeview image
Posted by Anthony Boudouvas at 11/24/2003 1:25:20 PM
Hi to all,
i have a treeview that i put some nodes in it with their repsective images.
If i try to change the image and set it to some other ImageList index,
nothing happens.
The code i use is:
private void ChangeServantStatus(string servant, ServantStatus status)
{
foreach (TreeNod... more >>
Getting all contents from XMLReader into string?
Posted by SamIAm at 11/24/2003 1:21:22 PM
Is there a way to do this without looping through all the nodes using read()
I need to return the contents of the reader as a string
Thanks
S
... more >>
Creating a build like window
Posted by Amendra at 11/24/2003 1:05:05 PM
Hi ,
Does any one know how to create a window similar to the Build window in
..VS.NET using C#.
We have used a text box, but, this does no seem to be scrolling down as in
the Build window in VS.NET.
Thanks
Amendra.
... more >>
Drawing a dotted line
Posted by Rene at 11/24/2003 12:56:05 PM
I tried searching the newsgroups to see how do you draw a dotted line but I
was unable to find an answer, drawing a straight line is very easy but not a
dotted one.
So the question is, how do I draw a dotted line?
Thank you.
... more >>
Call COM object method with optional parameters.
Posted by Yong Jiang at 11/24/2003 12:36:41 PM
I am trying to convert some vb code calling COM oboject
methods to C#. Example shown as follows
Dim Stream As New ADODB.Stream
Call Stream.Open()
Stream.Open has three optional parameters. I am trying to
convert it to C# as shown as follows
ADODB.Stream Stream = null;
... more >>
WebService
Posted by Zürcher See at 11/24/2003 12:30:01 PM
I have to write a program to pass data through a web service, Ill use two
strongly typed dataset enbedded in a library class, a "request" and an
"answer" dataset.
I've wrote the program and the web service and placed in the references the
library class, but when I tried to use the web method, I ... more >>
MenuItem click question
Posted by Norvin Laudon at 11/24/2003 12:26:12 PM
Hi,
I have a context menu, which is used for each of 6 labels on my form. That
is, right-clicking any of the labels will bring up the same context menu.
Once the user clicks the menu, the clicked MenuItem fires an event:
menuItem1_Click(object sender, System.EventArgs e)
How can tell whic... more >>
problem with encoding
Posted by Aurimas Norkevicius at 11/24/2003 11:36:35 AM
I am useing "Visual Studion .NET 2003" and writeing my progrram in C#. the
problem is with Lithuanian characters.
case 1.
as i type in design time the special characters are ok - designer and pocket
pc device displays them well.
some caracters are changed into diferent after i reopen the so... more >>
how to export to txt format from CrystalReportViewer
Posted by Ganesh Bansal at 11/24/2003 11:35:19 AM
hi
In C#, I am using CrystalRportViewer to show reports made using Crystal
Report. Now, I need to export my reports to txt format while
CrystalReportViewer allows only doc, pdf, rtf and some other formats only
but not txt format.
Can anybody tell me how to export to txt format from CrystalRep... more >>
Confusing compile error for UIP StartTask method
Posted by BillyM at 11/24/2003 11:02:14 AM
I have an MDI parent form called "MDIParentView" that inherits from the UIP
Application Block's WinFormView. The method to start a task using this MDI
form is defined as follows:
public static void StartTask(Form parentForm, string navigatonGraphName)
My code for this is:
UIPManag... more >>
Version Date?
Posted by Dave Veeneman at 11/24/2003 10:52:56 AM
I'm looking for a version date property to go allong with the version build
information in the Version class of the Reflection namespace. Does anyone
know where I might find this property? Thanks
--
Dave Veeneman
Chicago
... more >>
BitConverter.ToUInt64 Question
Posted by george r smith at 11/24/2003 10:52:55 AM
Hi,
I created a byte array
--byte[] aByteArray = new byte[64];
and set aByteArray[0] and aByteArray[16] to '1'.
Because I want to create a ulong (UInt64) with these values I do:
UInt64 bb;
bb = BitConverter.ToUInt64(aByteArray,0);
Console.WriteLine(bb);
I get a 1. So I am only getting ... more >>
Setting type of an object member in ArrayList
Posted by Tamir Khason at 11/24/2003 10:46:40 AM
How can I set the type of the object added to ArrayList (type of Array List
Members)
Here is the code:
protected ArrayList tabs = new ArrayList();
public ArrayList Tabs
{
get
{
return tabs;
}
set
{
tabs.Add(value); //The default type is object - how to change it to ... more >>
Bug pattern detector
Posted by Leon Lambert at 11/24/2003 9:45:46 AM
I was wondering if someone could post some links to some bug pattern
detector software for C#. I found this very interesting article about
pattern detectors for Java so wanted to investiage one for C#.
http://www.javaworld.com/javaworld/jw-11-2003/jw-1121-quality.html? I
did a google search ... more >>
Business Object Question
Posted by Tim at 11/24/2003 9:44:02 AM
I am wondering what other developers think about combining business objects
and data access layers components? Here is my design:
UI-UIprocess/controller-BO/DACL-DAhelper-DB
... more >>
The GetInterfaces() method
Posted by Abdessamad Belangour at 11/24/2003 9:22:06 AM
Hi all,
the GetInterfaces() method of the Type class, brings all the interfaces
implemented by a Class. The problem is that the method brings also all the
interfaces implemented by it base type. Is there any flag to block the
inherited interfaces ?
thanks again.
... more >>
Treeviews
Posted by JJ at 11/24/2003 8:49:11 AM
Ok Guys,
I have a dataset and I need to make a treeview out of
it. I want checkboxs and icons to show on the tree. What
is the easiest way to get this dataset setup for a parent-
Child treeview?
Thanks,
JJ... more >>
Opening line for a new class?
Posted by Stephen Russell at 11/24/2003 8:36:03 AM
In the past public void has worked. But I need to return an XMLDocument,
and this class needs a string param for the SP to call.
public void makeXML (string lcStatement) wont allow me to return a doc. I
guess too many beers last night?
XmlDoc = new XmlDataDocument();
XmlDoc.LoadXml(XmlRd... more >>
ToolTip is not working on a form!!!
Posted by ODB at 11/24/2003 8:26:08 AM
Okay i have a small app. and i have added the tooltips to two forms one is
showen as a showdialog, and the other is just show, but when i start the
show form the tooltips on the controls is not working, what is wrong wit my
settings !!!
I have set the tooltip.showalways = true, but i still ... more >>
Modifying inherited menu in inherited form
Posted by BillyM at 11/24/2003 8:07:57 AM
Is it possible to modify the menu bar inherited from an inherited form using
designer? I keep getting a message stating it can't be modified because it
is inherited whenever I try to add menu items. I tried changing the modifer
in the parent form to "protected", but that didn't do the trick.
... more >>
sending email from a console app
Posted by Philip Townsend at 11/24/2003 7:34:04 AM
Is there any way to send email from a console application? We have a
simple console app that runs data updates and we need to be notified
when errors occur. Email is the preferred method, though we can write to
a file.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just... more >>
Embed a .net customControl in XFT
Posted by fooManChoo at 11/24/2003 7:00:51 AM
Has anyone been able to use a C# Component in a VB form? I've created
a .net class (dll) and am able to implement that from a VB script using
the interop. The control does work stand alone.
Any help on this is greatly appreciated.
... more >>
Sources for MS Framework
Posted by Ondrej Sevecek at 11/24/2003 6:43:47 AM
Hello,
are there somewhere sources for the framework class libraries? Or does MS
provide only IL binaries?
Ondra.
... more >>
How to modify/append PrivateBinPath of AppDomain?
Posted by Jon Davis at 11/24/2003 4:00:03 AM
AppDomainSetup has "PrivateBinPath" property. How do I apply something like
this for the current AppDomain, so that I can load the dependencies of an
assembly I am loading which are in the same directory as the assembly that
I'm loading?
Jon
... more >>
How to dynamically load assembly w/ dependencies??
Posted by Jon Davis at 11/24/2003 3:38:29 AM
I'm trying to access my application files for a plug-in I'm building for a
third party application.
I have an assembly with several dependency assemblies. The dependency
assemblies are in the same directory as the assembly.
d:\dev\cs\MyApp\bin\Release\MyApp.dll
d:\dev\cs\MyApp\bin\R... more >>
Clearing arrays
Posted by Liz - Newbie at 11/24/2003 2:45:45 AM
Does anyone know how to clear arrays? My C# books talk
about creating arrays or talk about using Clear or
RemoveAt but these methods don't appear to be available
for my array.
I have an array of client objects called aClients
if I try aClients.RemoveAt I get an error
"System.Array" d... more >>
How to put text into different line in textBox
Posted by Fang at 11/24/2003 1:33:11 AM
I try to use "\n" as line feed to put text into different
lines in textBox of Visual Studio .Net, but it does not
work. The text is still in one line. Does anybody know
how to put text into different lines in textBox? Any help
will be appreciated.
Thanks in advance,
Fang
By the way,... more >>
IDisposable, using(), RAII and structs [Discussion]
Posted by codymanix at 11/24/2003 1:15:04 AM
Last night I had several thought about RAII and want to discuss a bit.
Why doesn't CSharp support destructors in structs? Wouldn't that make RAII
possible like in C++? When the struct goes out of scope, the dtor could be
immediately be called (no GC needed).
For that, you don't have to decla... more >>
parse array
Posted by Rustam Asgarov at 11/24/2003 12:32:32 AM
i have an aray of bites
" private byte[] ByteArray = new byte[4000]; "
How can i parse this array to read integers, in other words
assign first 4 bytes to one integer variable, second 4 bytes to another
itneger variable and so on...
Thanks...
... more >>
|