all groups > c# > june 2005
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
Windows service won't start
Posted by Chuck Bowling at 6/30/2005 11:32:00 PM
Ok, I'm not sure this is a C# question but here goes anyhow...
I used this walkthru to create a windows service:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vbcon/html/vbwlkwalkthroughcreatingwindowsserviceapplication.htm
It appears to install ok but when I try to start it I get this mes... more >>
split view help in VS 2005
Posted by John Salerno at 6/30/2005 9:30:53 PM
I followed some simple steps in a magazine to create a Form with a split
view, but it doesn't look right. First I added a ListView control and
docked it to the left, then I added the Splitter control, then I added a
TreeView and docked it with fill.
When I run the window, it shows a big gre... more >>
COM+ object not being released back to the pool
Posted by VinDotNet at 6/30/2005 8:30:00 PM
Here's the Scenario I am facing:
I've got a winform managed c++ client which connects to my managed
COM+ server application (by making createinstance, then typecasting
the object to an interface, then calling methods over it). This COM+
server application is from a C# dll that has references to ... more >>
Abstract interfaces and classes - Urgent Help
Posted by Carlos Lozano at 6/30/2005 8:07:01 PM
Hi,
I have an OCX I need to use in an implementation and always gets a
protection level error saying:
I get an error message saying:
OCXReference.InterfaceClass is inaccessible due to its protection level
The OCX module has basically the following structure:
Namespace OCXmodule
{
... more >>
Specific Font Size question
Posted by Paul Gorodyansky at 6/30/2005 6:42:48 PM
Hi,
I've read most of the discussions about
"calculation of string width in pixels or points" - they mostly talk
about MeasureString (and that it's not exact width) or more presize
but requiring much more code MeasureCharacterRanges -
and no one answered this guy's question (I had the same) ... more >>
Invoque .lib from c# project?
Posted by Marty at 6/30/2005 6:16:26 PM
Hi,
Can we invoque a .lib file that is made in c++ from a c# project?
Thanks
Marty... more >>
Best practice keeping business object collection synced to DB
Posted by Alfred Taylor at 6/30/2005 5:25:42 PM
I'm testing the waters of n-tier development and I ran into a scenario that
I'm not sure what the best solution would be. I have a Company object which
contains a collection of contacts retrieved from a database.
In the presentation layer, the user will be able to add/delete/modify this
co... more >>
ArrrayList collection property indexer - please help.
Posted by almurph NO[at]SPAM altavista.com at 6/30/2005 5:25:16 PM
Hi,
Hope I have the right forum here - apologies if I don't. I'm trying to
access a ArrayList collection via an indexer inside a class called
"collExample"
What I want to be able to do is to store and retrieve *any* type of
object to the ArrayList. However I am getting conversion errors -... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Alternative to Enum string values as return types and parameters
Posted by Sanjay Pais at 6/30/2005 2:59:19 PM
I know that string/char enum is not possible in c# (.NET2.0)
I need to create the equivalent of this:
public enum HOW_GOOD
{
AWESOME = "A",
GREAT= "G",
NOT_TOO_BAD = "N",
TERRIBLE="T"
}
i wanted to use this enum as a parameter/ return type for methods
Eg
public HOW_GOOD HowAreYouFee... more >>
domain user list
Posted by Tim Wallace at 6/30/2005 2:43:37 PM
I have an application in which I need to obtain a list of valid domain users
like one can obtain when adding a new login in Enterprise Manager. My
application is written in C# (.NET 2.0 Beta). I looked through the help,
but could not find the .NET way to do it. Can anyone give me any pointe... more >>
Architecture question
Posted by Michael Rodriguez at 6/30/2005 2:40:09 PM
If you're using a standard 3-tiered architecture, i.e. Data Layer-> Business
Layer->Presentation Layer, where is the recommended place to put data
validations? Specifically, data validations such as "Please enter a name."
It seems like the best place to put them, from the programmer's point ... more >>
TextBox Backspace problem in a IE Toolbar using Band Objects
Posted by Tom Gerstner at 6/30/2005 2:31:06 PM
Dear all,
I'm trying to program a IE Toolbar similar to the Google Bar in C# using
Band Objects. Everything works fine but my TextBox (which I use to search the
Internet) is not responding the accelerated keys like "backspace".
I do not even get the KeyDown/KeyPress event for this keys for... more >>
ODBC Connection
Posted by Lam at 6/30/2005 2:26:18 PM
hi
I create a System DSN which connect to the Pervasive database located on
a computer in the network. How can I write the code to connect to the
database
by using that system DSN?
Thanks a lot
... more >>
How to read data from a video capture card in C#?
Posted by Arash at 6/30/2005 1:56:07 PM
Dear all,
I've got a video capture device. Device manager shows "nVidia WDM Video
Capture (universal)" driver in "Sound, video and game controllers"
category. Also, Windows Movie Maker, and other standard video capture
tools can record video from the device.
But, I've got no idea how to rea... more >>
Rectange Size
Posted by Fred West at 6/30/2005 1:53:42 PM
I create a user control with width = 200 pixels and height = 200 pixels. I
create a paint event handler to draw a rectangle around its edges. I define
a Rectangle as follows:
Rectangle r = new Rectangle(0,0,200,200);
I then draw it in my event handler as follows:
dc = e.Graphics;
dc.D... more >>
checking to see if user is authenticated
Posted by Chris at 6/30/2005 1:29:02 PM
Hi,
I am learning C# and basically using a .asp net app I wrote in VB and
converting to C#.
in VB code :
If Context.User.Identity.IsAuthenticated Then
obj = Session.Item(SESSION_NAVIGATION_DATA)
Else
obj = Page.Cache.Get(CACHE_NAVIGATION_DATA)
... more >>
Rows.Add and DataSet Constraints
Posted by Christopher Weaver at 6/30/2005 11:46:41 AM
I'm trying to insert a new Row within an existing Table within an existing
DataSet using the following:
DataRow NewTaskRow = dsTaskActivities.Tables["Tasks"].NewRow();
dsTaskActivities.Tables["Tasks"].Rows.Add(NewTaskRow);
I'm using the code from the help text to remove the constraints with... more >>
Passing Value Back (forms)
Posted by Stephen Costanzo at 6/30/2005 11:28:23 AM
My goal is to open Form2 from Form1 and have Form2 pass back an integer to
Form 1.
In VB, this is rather simple:
Form 1 (vanilla form with a button):
Dim WithEvents x As Form2
Dim i As Integer
Sub form2Event(ByVal num As Integer) Handles x.RouteNumber
i = num
En... more >>
string comparison with ==
Posted by Peter Kirk at 6/30/2005 11:11:18 AM
Hi
I am looking at some code which in many places performs string comparison
using == instead of Equals.
Am I right in assuming that this will in fact work "as expected" when it is
strings involved? By "as expected" I mean that as long as the strings are
instantiated using string literal... more >>
How do I execute an external command (exec like use)
Posted by NathanBlack at 6/30/2005 9:43:07 AM
Basically, how can I execute a command line executable from within C#. I'm
looking for something similar to C++'s exec command.
Say for example I wanted to execute foo.exe with some command line
paramaters and capture it's output.
Any hints?
Thanks,
Nathan... more >>
Can an event state be serialized
Posted by jabailo NO[at]SPAM texeme.com at 6/30/2005 8:56:01 AM
Suppose I have a windows service, with a FileWatcher class.
A file appears, and an event is raised -- but then the server is
rebooted or crashes.
When the server is rebooted, I want that event state to be where it was.
So, can an event be serialized?
And can it then be 're-raised' on... more >>
install component in GAC ??
Posted by (cmrchs NO[at]SPAM yahoo.com) at 6/30/2005 8:55:44 AM
Hi,
using a setup-project : I add an exe that uses a component so I add the component to the setup-project as well
but how can I specify that the component must be installed in GAC when the client runs the setup for the application ?
(so far is it only installed in the directory of the client... more >>
C# Service - authenticating to a network fileshare?
Posted by Adam Clauss at 6/30/2005 8:34:12 AM
I have a C# service (running as Network Service account) that needs to
access a fileshare:
\\machinename\some\path
This file share requires me to login with certain credentials. How can I
specify these from the context of my application?
Thanks!
--
Adam Clauss
... more >>
WebBrowser and HTML capture (ignore previous)
Posted by Don Tucker at 6/30/2005 8:26:25 AM
Sorry, I attempted to tab in the previous post and accidentally posted
prematurely.
I am trying to use the WebBrowser control from Visual Studio 2005 to load a
web page and display its HTML content in a text box on a Form of a Windows
Application. I have a button on the Form that invokes t... more >>
Force Upper in C#
Posted by Richard MSL at 6/30/2005 7:29:02 AM
How do you make a ComboBox force casing to uppercase? With a TextBox, I do
this:
TextBox txtName;
this.txtName.CharacterCasing = CharacterCasing.Upper;
And it makes whatever the user types appear in upper case, which is what I
want. But with a ComboBox, if I do this:
... more >>
invalid arguments
Posted by melanieab at 6/30/2005 6:59:07 AM
Hi,
I kind of got thrown into C# without any real programming experience, so I
know this is probably an easy question, but it's driving me crazy. In my
Tabs class, as I'm leaving a tabpage, I'm trying to capture the screen as a
bitmap. I'm trying to tell it to call the CaptureTab method fro... more >>
COM+ object not being released back to the pool
Posted by VinDotNet at 6/30/2005 6:10:04 AM
Here's the Scenario I am facing:
I've got a winform managed c++ client which connects to my managed
COM+ server application (by making createinstance, then typecasting
the object to an interface, then calling methods over it). This COM+
server application is from a C# dll that has references to ... more >>
Return Strongly Typed Data Set from Web Service
Posted by HardBap at 6/30/2005 5:45:25 AM
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe
tool. I want to be able to access fields using
ds.Customer[0].CompanyName.
The problem is when I return this DataSet from a Web Service it adds
another Table to the DataSet that contains the data. I have to access
the dat... more >>
interop: calling foo(void **) from C#
Posted by cees NO[at]SPAM pcraster.nl at 6/30/2005 5:26:48 AM
Hi,
I need to call an external C-function that accept an array of void
pointers (void **). Each item can either be a single float,int,char or
a C-array of these types. Is that possible and if so how to do it most
elegantly?
I found a lot of samples and stuff in MSDN that got me some ideas but... more >>
Can I turn off the display of IE toolbar?
Posted by trint at 6/30/2005 5:05:37 AM
I want my c# webforms to be all that is in the ie window and not show
the toolbars and menus. Is that possible?
Thanks,
Trint
... more >>
Events between threads?
Posted by Waleed AlRashoud at 6/30/2005 4:09:01 AM
Hi All,
I hvae worker class to manage the application
inside worker : worker creates (n) number of threads to do IO operations.
The Problem Is:
to handle all threads : [create new] , [process finished] , [clean all]
I have to keep worker process inside while statement:
while (true)
...
... more >>
Data grid row after sort
Posted by Das at 6/30/2005 3:06:03 AM
Hi,
With the data grid I have set the allow sort to true. I aslo know with
hittest which column was last sorted.
Even thought I sort the dataview with that field but. But then How can I
get the currently selected row. there is one column in datagird "id". I want
to get that Id to sho... more >>
TreeView_AfterCheck
Posted by [Yosi] at 6/30/2005 2:21:02 AM
Hi,
I have a tree view, when I check/uncheck the node checkbox the
TreeView_AfterCheck event (function) occure and I go inside this function.
In this function I trying to fegure which node has been checked , using the
(System.Windows.Forms.TreeView)sender).SelectedNode don't return the... more >>
How to draw a scrollable form with a bottom-left origin using GDI+ ??
Posted by johannblake NO[at]SPAM yahoo.com at 6/30/2005 2:11:20 AM
I want to create a scrollable window using GDI+ where the origin is
located in the bottom-left corner rather than the default top-left
corner.
Currently I have found several examples on how to scroll the window and
even how to set the drawing origin at the bottom-left corner. What I
have not ... more >>
How can I reset a Property to it's default value?
Posted by steve bull at 6/30/2005 12:44:03 AM
if I have a property something like :
[DefaultValue(0)]
public int Width
{
get {return m_width}
set {m_width = value}
}
As a calling program/routine how can I set m_width back to it's default value 0 without knowing that it is 0
i.e. something like this.Width = Widt... more >>
Saving form position.
Posted by Marty at 6/30/2005 12:00:00 AM
Hi,
I want to save the form position when the user close it. I tried to
place the coordinate saving code in my destructor, but it is not
triggered when I assign the form to null.
Where should I place my code to save the coord. when the form close?
Thanks
Marty... more >>
commit changes earlier
Posted by Gav at 6/30/2005 12:00:00 AM
Hi all,
I have a datagrid which is populated by a dataset, I have some code to
update the database etc... If I enter a value into the datagrid and hit the
save button it saves the old value not the one just entered, I have to make
sure I take the focus from the cell and wait a few seconds b... more >>
update db
Posted by Hrvoje Voda at 6/30/2005 12:00:00 AM
I'm adding a field with no value into table. In table I'm allowing null
value.
Then, I'm doing an update and I put a value into that field, but I get an
error:
System.Data Concurency Violation : the Update Command affected 0 records.
Why?
Then, when I close a program and call it again... more >>
not equal
Posted by Hrvoje Voda at 6/30/2005 12:00:00 AM
DataRow[] UGrows = db.dataSetUsers.UsersGroups.Select("UserID ='" +
UserID.ToString() + "'" );
foreach ( DataSetUsers.UsersGroupsRow row in UGrows )
{
DataSetUsers.GroupsRow group =
db.dataSetUsers.Groups.FindByGroupID( row.GroupID );
if ( group != null )
{
*** sF... more >>
MediaDet and StreamWriter (C#)
Posted by RicercatoreSbadato at 6/30/2005 12:00:00 AM
RicercatoreSbadatoI have some big problems with the StreamWriter and
MediaDet. I have read
that StreamWriter isn't threadsafe from the MSDN.. I have used a lock()
but nothing...... more >>
set focus bug problem
Posted by Jason Huang at 6/30/2005 12:00:00 AM
Hi,
private void SetFocus(Control ctrl) // SetFocus to a particular control
{
string focusScript = "<script language='javascript' id='FocusScript'> "
+
"document.getElementById('" + ctrl.ClientID +
"').focus();</script>";
Page.RegisterStartupScript("FocusScript", focusS... more >>
MediaDet and StreamWriter (C#)
Posted by RicercatoreSbadato at 6/30/2005 12:00:00 AM
I have some big problems with the StreamWriter and MediaDet. I have read
that StreamWriter isn't threadsafe from the MSDN.. I have used a lock()
but nothing...
--
RicercatoreSbadato... more >>
How to read a file from a different drive on the same machine C# windows based application
Posted by TaeHo Yoo at 6/29/2005 11:56:36 PM
The file I would like to access in located in C drive and the
application which reads the file is located in E drive. When it trys to
read the file, it generates an error
Error: Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,
Version=1.0.5000.0, Cu
... more >>
const Vs static
Posted by Ant at 6/29/2005 9:42:02 PM
Hi,
I'm having trouble trying to define the difference between declaring a field
in a class const or static. i've noted that when referencing them from the
class that a const is symbolized with a field symbol & a static has a blue
box. What is the difference? What is the blue box? Has it go... more >>
Why would you not use "checked"?
Posted by Brett at 6/29/2005 9:12:59 PM
Why would you not want to use checked on any type of mathematical operation?
Or use unchecked for that matter?
Thanks,
Brett
... more >>
open a c# project in older version of VS .NET
Posted by Claudia Fong at 6/29/2005 8:14:43 PM
Hello,
I'm having problems to open a project that I made in VS 2005 in my
laptop. I have an older version installed in my laptop (VS 2000 or 2002,
I'm not sure right now).
Is there a way so I could open and run it in an older version of VS
..NET?
Cheers!
Claudi
*** Sent via D... more >>
Pleas help - collection property indexer worries...
Posted by almurph NO[at]SPAM altavista.com at 6/29/2005 8:02:09 PM
Hi,
Hope that you can help me please. I'm trying to implement a simple
collection property using ArrayList as an indexer. i want this to be
pretty generic
However I'm having difficulty with the conversions. I know that
System.Collection.ArrayList accepts and returns most of it's members a... more >>
continue to run application after logging off
Posted by medhanush NO[at]SPAM yahoo.com at 6/29/2005 6:15:22 PM
Hi,
Can somebody please tell me how to keep application running even though
user logs out ?
scenario is, user logs in, starts an exe and logs out, exe need to run
for couple of hours.
One solution is to use service instead of exe. Any other ideas ...?
and also user logs-in using Remote Deskt... more >>
rules engine ideas? Trying to prevent tons of conditional branches in a logic filter.
Posted by hazz at 6/29/2005 5:02:06 PM
before I start filling up the first page of perhaps many pages of code with
if/then or switch:case buckets, I wanted to step back and see if there is a
better way...
I will have a table with up to 300 rules in it. Maybe more... In each Score
table there is a column which will refer to a domai... more >>
Newbie report woes
Posted by LC at 6/29/2005 4:16:38 PM
I have Visual C# .net at home and am starting to develop a project in
order to learn this .net stuff. I just came to realize that Crystal
Reports does not come with the standard edition of Visual C# .net.
So... I can't seem to find out, even in my Murach manual how to setup
and print reports.... more >>
|