all groups > c# > july 2005 > threads for thursday july 21
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
Validating Combo boxes in WinForms
Posted by Ken Loomis at 7/21/2005 11:26:51 PM
Hello:
Using WinForms, certain users may change the value in a combobox,
others may not.
Some of these boxes open with a default value.
I need to check the user's rights before committing his or her
changes in the box and restore the previous value if he or she is not
allowed (or not l... more >>
get base com type name
Posted by Ingo Beyer at 7/21/2005 11:07:45 PM
hi,
in a c# app i dynamically loaded a com type library:
AssemblyBuilder ab = tlc.ConvertTypeLibToAssembly(typeLib, "temp.dll", 0,
ceh, null, null, null, null);
while loading .net raises an event becauce it found a external reference.
this is my event handler: (it's in a class derived fr... more >>
copy string array elements to strings in C#
Posted by Eranga at 7/21/2005 10:50:26 PM
I have the following code;
string test1 = words[2];//"Exclud"
string test2 ="Exclud";
string test3 = String.Copy(words[2]);//"Exclud"
bool booTest1 = test1.Equals(test2);//false
bool booTest2 = test2.Equals("Exclud");//true
bool booTest3 = test1.Equals("Exclud");//false
bool booTest4 = ... more >>
removing decimal portion of a real number
Posted by Homer Simpson at 7/21/2005 10:36:45 PM
I'm using VS2005 Beta 2 (C#) and would like to know how I can remove the
decimal portion (to the right of the decimal) of a real number. I want the
whole number portion but do not wish to discard the decimal portion; that
will be used for additional calcs.
Does C# have any methods for doing... more >>
Data Layer architecture
Posted by laimis at 7/21/2005 9:33:25 PM
Hey guys,
I just recently got introduced to data mappers (DTO mapper). So now I
have a SqlHelper being used by DTOMapper and then business layer is
using DTOMapper when it needs to persist object to database or load them
back. Everything is working nicely so far. My question is, is it OK
... more >>
GetVersionEx Implementation Problem
Posted by Sabin Finateanu at 7/21/2005 8:52:31 PM
Hi! I have this method that gets the OS suite and product type, but it
is always returning null. Can anyone help me, please? Here is the method
and other necessary code:
[StructLayout(LayoutKind.Sequential)]
private struct OSVERSIONINFOEX
{
public int dwOSVersionInfoSize;
public... more >>
class properties
Posted by TS at 7/21/2005 5:41:06 PM
i have a question about this situation:
i have a class that i use that i need to know 1 piece of data that exists in
a different class. Im wondering is it wrong to add the property that i need
onto the first class instead of having to instantiate the whole other class
for a single property?
... more >>
PAR NUMBERS
Posted by Jose Fernandez at 7/21/2005 3:42:09 PM
Hello friends.
I have trying to figure out how to identify a Par number (divisible by 2)
but I couldn't find any method.
Does anyone knows how to "know" if an integer is a Par number??
thanks in advance
Jose
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
BITS Downloader, IIS, retrieve a file named *.DLL
Posted by Gregory Hassett at 7/21/2005 2:56:17 PM
Hello,
I am using the BITS downloader to retrieve a file as part of a self-updating
application.
The file is called xyz.dll -- and when BITS tries to get it from its
location (where it's hosted on a MS IIS Server), IIS sees the request for
http://myserver/xyz.dll and attempts to execute the... more >>
Visual Studio bookmarks
Posted by keithv at 7/21/2005 2:11:19 PM
Is there anyway to have cross-file bookmarks?
I'd want to be able to quickly jump to a specific spot in a specific
file. The toolbar bookmark command only seems to work within the
current document.
Thanks,
Keith
... more >>
Get a TreeNode reference to the root node in a TreeView
Posted by Ryan at 7/21/2005 1:55:05 PM
I'm doing a recursive function that receives a TreeNode object. It's
traversing an XMLDocument and putting the data in a TreeView. The problem is
that to start out, I only have a TreeView object. So to add nodes in the
beginning, I have to call
TreeView.Nodes.Add()
But for everything but... more >>
All Users Application Data Permissions
Posted by Dennis C. Drumm at 7/21/2005 1:17:16 PM
I use the Documents and Settings\All Users\Application Data\AppName folder
to store xml settings that are applicable to all user who log onto a
machine. (The uers personal settings associated with my application are
stored in the system registry's HKEY_CURRENT_USER section)
When the xml fil... more >>
Right click on a TreeView
Posted by humble.apprentice at 7/21/2005 1:15:03 PM
Hi everybody,
I've got a TreeView and when ever I right-click on it, the ContextMenuStrip
should comes up. The problem is the following, if the user didn't left-click
an then right click the node he or she desired, the ContextMenuStrip will
show the options for the node that was left-clicke... more >>
CreateDelegate for and type of EventArg
Posted by redhotsly NO[at]SPAM hotmail.com at 7/21/2005 12:38:21 PM
Hi,
Is is possible to create an event handler method that can handle any
type of event no matter what the delegate signature is.
Here is the code I have so far:
public class class1
{
public Delegate Hook(Type eventHandlerType)
{
Delegate eh = Delegate.CreateDelegate(
eve... more >>
CollectionBase Item Member Access
Posted by DelGator at 7/21/2005 12:06:56 PM
Foundation...Accessing derived class members through a variable of
their base class is just a matter of casting the variable to the
derived class.
How would you access the derived class members in a collection of type
base class where the collection is derived from CollectionBase?
I know th... more >>
Performing a Transaction in 2 systems
Posted by Chris Fink at 7/21/2005 11:20:03 AM
I have the need to perform an atomic operation in two systems, a database and
an ftp site. The process is two step; 1. insert a row into oracle, 2. delete
a file from a remote ftp site. I need to make these steps atomic...either
they both succeed or both fail. Any suggestions on how I creat... more >>
Hiding values in a datagrid
Posted by Wayne at 7/21/2005 11:17:43 AM
I have a datagrid that will display data, and based on the security level of
our user's they may not be able to see the data. However, I still want the
column to appear in the grid and just mask the data with asterisks, one for
each char in the value or a fixed number, but none if the value is... more >>
form inheritance
Posted by Wayne at 7/21/2005 11:12:31 AM
I have two forms, frmBase and frmInherited. frmInherited inherits from
frmBase. On frmBase I have 8 controls, these 8 controls show up on
frmInherited but not always in the same position as they are on frmBase. I
have the following questions:
1) how do I fix this?
2) how do I prevent the f... more >>
FullTrust for calling Process members
Posted by Jeffrey at 7/21/2005 11:04:09 AM
hello,
I have to call the Handle from a process and FullTrust is needed
otherwise it happens an exception.
currently i am using only this code and the exception occurs.
[PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")]
how is PermissionState.Unrestricted to implement?
... more >>
C# and vbscript
Posted by Jozsef Bekes at 7/21/2005 10:47:31 AM
Hello Everyone,
I am trying to access a C# class from vbscript. All is file, except for the
case when I want to use optional parameters or function overloading. As I
found out, optional parameters are not supported by C#, function overloading
is not supported by COM. There is an attribute:
... more >>
NetworkStream tcp error
Posted by kmacintyre at 7/21/2005 9:56:17 AM
I am trying to us a simple NetworkStream to transfer a file over tcp. This
works most of the time, but one specific file never downloads(.mdb file). It
seems to close the socket and I get an "unable to write data to transport
connection" error. I have tried multiple ways to transfer this
... more >>
Whet to Use set{}
Posted by aaj at 7/21/2005 9:54:43 AM
Hi all
I'm wrestling my way through OOPs concepts and have a question on set{}. Can
anyone help
From the stuff I've been reading, set and get are accessors to class
properties (i.e. local class variables) which inturn are used to reflect the
state of a particular object.
I can underst... more >>
C# Service Terminating Itself
Posted by Adam Clauss at 7/21/2005 9:48:49 AM
I have a C# Windows Service running as the NetworkService account because it
needs to access a network share.
As part of the service's initialization, I want the service to terminate, if
an unrecoverable error occurs. When that case occurs, I create a
ServiceController object and call the ... more >>
Visual Studio 2005 stable?
Posted by Carlos at 7/21/2005 9:43:57 AM
I have to implement a application that use Serial COM ports and I was
thinking to use VS2005, but I wan to know is that is true that is stable ?
I heard that the release date is November 7 2005 and I have to release the
app in August 2005, I want to move to 2005 so I can use ths IO Serial COMM... more >>
Thread abort doesn't work
Posted by Thomas Richter at 7/21/2005 9:28:54 AM
Hi,
a thread I start with:
threadQuoteRunner = new Thread(new ThreadStart(_quoteHandler.QuoteRunner));
threadQuoteRunner.Start();
but if I try to stop him, it doesn't work:
threadQuoteRunner.Abort();
In the constructor of QuoteRunner is an while (true) loop.
In the debugger I can stop the... more >>
C# sharp ability to append information to a file saved in any wind
Posted by rip_tide at 7/21/2005 9:13:04 AM
I am trying to find out if C# has the ability to tie into windows so that
when a user tries to save a file from any windows application a save as
dialog box opens that is written in c# with other save properties such as
owner, person saving, notes etc.. that are not normally part of the save ... more >>
How to get sorted data from .resx file using ResXResourceReader?
Posted by Hiten at 7/21/2005 8:55:37 AM
Hi
i have created one .resx file for adding 38 Images...............
after creating it when i open it and reads it through
IDictionaryEnumerator or by using DictionaryEntry structure i am not
getting images in order i have added in resource it means following
resx file is created with A B C... more >>
Localhost IP Addresses Other Than 127.0.0.1
Posted by Jeff S. at 7/21/2005 8:35:03 AM
We are developing an application in C# that runs on a PC and communicates
with a piece of equipment via the ethernet. For testing we have developed a
simulation of the equipment that we want to run on the same PC as the
application. We assigned the address 127.168.8.225 to the application an... more >>
C# Server/Client
Posted by agold79 NO[at]SPAM optonline.net at 7/21/2005 8:18:35 AM
I am about to take my first crack at C# and would like some
suggestions/best practices for approaching the app I am looking to
build. Here's a simplified description of the problem :
The client application will handle displaying a countdown timer that
will be controlled by a remote administrati... more >>
FILES WITH C# (VS 2003)
Posted by Macisu at 7/21/2005 7:42:01 AM
Hi
I need to open flat files using C#.
I need to work very fast, but when I used StreamReader, This is very slow.
Anybody knows how to work FILES very fast using C#.
I need to read 3 millions of records at least a minute.
How can i access FILES very fast (flat files)?
Thanks for your h... more >>
BeginInvoke async callback
Posted by nick_tucker NO[at]SPAM hotmail.com at 7/21/2005 7:37:17 AM
Is The following Code valid it is like a mini thread pool(a friend at
work wrote it)?
I have cut down the code a bit but kept the essential parts.
The main part that I am would like explainedis when the async callback
gets called and the the line
m_WaitCallback.EndInvoke(AsyncResult);
Ho... more >>
No line number at top level of Stack trace
Posted by Phil Jollans at 7/21/2005 7:34:10 AM
Hi,
I have an error dialog which shows the stack trace, usually without line
numbers in the release version. To try to diagnose a particular problem, I
have provided a user with a debug version of my program, and now line
numbers do appear.
However, there is no line number at the top lev... more >>
RegEx problem - literal exclusion should not match
Posted by howard dierking at 7/21/2005 6:45:01 AM
Hi all,
I'm having a problem with a reg ex. Essentiall, I'm trying to isolate
variable declarations from old vbscript where there was no explicit
declaration requirement. This should seem easy enough - just identify by the
assignment statement; except for the fact that vb uses a single '=... more >>
Double Click in titlebar
Posted by satankidneypie at 7/21/2005 4:17:03 AM
Hi,
does anyone have any idea how to trap a double click event in the title
bar of a form?
I'm wanting to use help icons on titlebars, but this means that I can't
have minimize or maximize buttons, and as a compromise I wish to enable
a double click on the title bar to either minimize or ma... more >>
Interoping h files
Posted by Udi at 7/21/2005 2:31:24 AM
Has anyone heard or know of a tool that takes an h file and builds an
interop .cs wrapper to it dynamically?
Thanks,
Udi.
... more >>
Problem: Consuming an Apache Web Service
Posted by Jose at 7/21/2005 2:19:03 AM
Hello all
I've a problem, I need to develop a component to connect a web
service for
sending SMS. The web service it's not implemented in .NET.I need to use basic
authentication (at least that is what I've been told). The most strange thing
is that when I add the web reference in Vi... more >>
how can i convert C# code to vb.net code
Posted by MAHESH MANDHARE at 7/21/2005 1:58:13 AM
hi ,
Is there any way to reverse enggineer the vb.net code from dll file(Portable
Executable) i know the tools reflector but it doesn,t give me complete vb.net
/c# code.
Is there any other way to do that
--
Have A Good Day,
Mahesh,
Maheshmandhare@yahoo.co.in... more >>
C# interview questions
Posted by suraj at 7/21/2005 12:01:34 AM
Hi
I have interview tomm i was searching for interview questions i have
just got these two sites any more links
http://www.geocities.com/dotnetinterviews/
http://www.techinterviews.com/
will be appreciated
... more >>
does c# allow to create Activex component?
Posted by DB at 7/21/2005 12:00:00 AM
Hi Folks,
I want to create Activex component. Can we create it using c#.net or do I
need to create it using vc++?
Thanks in Advanced,
Deepak
... more >>
Declaring Inteface
Posted by NG at 7/21/2005 12:00:00 AM
Hi All,
I want to declare an interface in C#. I have the equivalent code for VB.NET
but when I try to write the corresponding code in C#, it does not work. Can
anyone please help me by providing the correct code.
I am pasting below both VB.NET code (working) and C# code (not working)
<V... more >>
How to translate C++ typedefs into C# ?
Posted by Oleg Subachev at 7/21/2005 12:00:00 AM
How to translate the following C++ typedefs into C# ?
typedef struct {
BYTE *data;
size_t length;
} VizBlob;
typedef struct VizUserInfoActions {
HANDLE (IMPORTED *createFullInfo) (
HANDLE logger,
const VizBlob *blob
);
const VizBlob *(IMPORTED *fullInfoBlob) (
HA... more >>
simple ArrayList question
Posted by MM at 7/21/2005 12:00:00 AM
How do you reference a Hashtable in an ArrayList?
ArrayList al = new Arraylist();
al.Add(new Hashtable());
now howto add/access hashtable entries?
thanks, matthew.... more >>
How to make a specific row in a datagrid to become read only?
Posted by ywchan at 7/21/2005 12:00:00 AM
I would like to make some of the rows in the datagrid read only according to
certain condition.
How can I make some of the rows editable while others read only in a
datagrid? Thanks!
... more >>
|