all groups > c# > april 2007 > threads for wednesday april 18
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
Exception handling in C#
Posted by s33k3r at 4/18/2007 10:29:16 PM
hi all,
I'll try and be brief, coz in the mood I'm in now if I start ranting
there's no stopping.
Actually I wanted to know if i can do any thing except, print debug
messages in the final catch handler. From all the samples I've seen
everyone seems to throw and rethrow the exceptions ad inf... more >>
simulating low-bandwith, latency on web service
Posted by Jeff Jarrell at 4/18/2007 10:26:27 PM
I'd like to create a service-locator\proxy type service that I can use to
simulate low bandwith situations and latency issues on the service under
test.
The request comes from the client, is processed through the proxy to the
actual service. The reply is then ADJUSTED as the message is rel... more >>
Re: How to access control properties on other form? (Windows Mobile)
Posted by BLUE at 4/18/2007 10:03:47 PM
Verify that TextBox1 is declared as public in Form2 class or that you have a
public property to set TextBox1.Text.
... more >>
Changing a list while iterating over its elements with a foreach loop
Posted by Andreas Schmitt at 4/18/2007 9:58:22 PM
I am somewhat new to C# and I ran into a problem in a small program I am
writing for teaching myself.
I am handling a list ob objects and I want to delete some of them inside
a loop like in:
foreach (Object object in objList)
{
if (object.status() == deleted)
{
objLi... more >>
enterprise Library Configuration
Posted by Vinki at 4/18/2007 9:46:03 PM
Hello Everyone,
I am trying to add multiple connection strings in my web.config file. I
searched in google to find out how to add multiple connections strings
through enterprise library 2.0 , 2006.
All of them are mentioning that I can go to enterprise Library configuration
and go to f... more >>
databinding buttons verticaly
Posted by DH at 4/18/2007 8:13:16 PM
"web develepor here trying to get to grips with winforms"
I have a list of departments for a restaurant menu i.e Booz, Burgers etc and
want to display a vertical list of buttons (depts pulled from db). This
would be done with a repeater control in asp.net
Regards
ER
... more >>
Application pausing: sleep or timers?
Posted by BLUE at 4/18/2007 7:54:58 PM
I would like to pause an application while the GUI display a Label saying
"Logging in...".
System.Timers
System.Windows.Forms.Timer
System.Threading.Timer
System.Threading ==> Thread.Sleep
Which one?
In the last case Sleep must be applied to what(Application, this or what)?
Thanks,
... more >>
searchable textbox?
Posted by Bhadan at 4/18/2007 7:19:03 PM
This is a beginner question:
I wish to make a textbox searchable for strings. Is this possible with a
property of the textbox, or do I have to wright a method.
TIA.
Bhads.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Application.Exit() vs Environmrnt.Exit(0)
Posted by Taoge at 4/18/2007 7:14:03 PM
Hi All,
When I use applcation.exit() in winForm application, the form closed, but
the process is still going!! ( The debug process is still running if debug in
VS IDE). Environment.Exit(0) works fine. But how to do in such following
scenario: if I need to give 2 option for user,1. Quit 2. Res... more >>
Image chaching and graphics resources...
Posted by rlrcstr NO[at]SPAM newsgroups.nospam at 4/18/2007 6:57:46 PM
I've got a winForm that has a good number of custom controls with custom =
graphics that are stored as resources in the project.
Recently, I updated all of the graphics with a new look. Added all the =
new images into the resource file and deleted all the old images.
But whenever the form is ... more >>
Code Access Security for native Apps
Posted by Vedo at 4/18/2007 6:38:42 PM
Hi,
Is there a way to assign permissions to native applications in Windows? Like
app x can only access this and this directories, app y cannot impersonate
the remote users, etc. Something similar to the .NET Framework code access
security mechanism.
Regards...
... more >>
parallel and distributed build
Posted by schouwla NO[at]SPAM yahoo.com at 4/18/2007 6:32:12 PM
Any chance that Visual Studio 2005 will support parallel or even
discributed build on c# code soon?
Lars
... more >>
Static classes: to use or not to use?
Posted by BLUE at 4/18/2007 5:49:46 PM
I know it's a stupid question but...
I want to use a class that represents the current user of my application,
another one that reads position from a GPS receiver and another one that
reads RFID tags from a reader.
I don't want to create a new user each time a log in appens (only one login
a... more >>
(asynch tcp client) I'm missing something with this example
Posted by David at 4/18/2007 5:29:19 PM
http://msdn2.microsoft.com/en-us/library/bew39x2a(VS.80).aspx
I was looking at above link and I just don't see the advantage of this. The
main thread is just stopping and waiting for each of the
connects/sends/receives to complete anyway so it seems to me using the
synchronous methods would... more >>
failed to import ActiveX
Posted by Sagaert Johan at 4/18/2007 5:03:22 PM
Hi
I tried to import an ActiveX into the toolbox.
There seems te be a problem when the designer generates the wrapper
assembly.
Also tried to use Aximp with same error :
The error is TYPE_E_CANTLOADLIBRARY.
The ActiveX is properly registered and gives no problem when used in a html
do... more >>
Implementing a login window
Posted by chance at 4/18/2007 3:39:09 PM
Hello,
I want to implement a login window that should remain in focus until
the user has entered the correct password. I am coming from the
PowerBuilder world and there this was implemented has a response or
modal window. I looked around in properties but can't seem to find
anything...Can someo... more >>
CloseMainWindow() doesn't appear to work under Vista
Posted by SteveT at 4/18/2007 3:32:01 PM
I have written a very simple application that simply spawns IE then closes
it. The issue I have is that CloseMainWindow() always returns a false
indicating the message was never sent. Does someone know why?
This application is nothing more than a form with a button. The button's
code bel... more >>
Q: DataGridView.
Posted by Martin Arvidsson, Visual Systems AB at 4/18/2007 3:25:34 PM
Hi all you gurus out there ;) I am not sure i am posting this in the correct
NG. But i will give it a go.
I have a as you see from the snippet below, a datagrid, i have a daset that
i fill with data.
the data is not collected from a database but from the GetFiles method.
Now, the column n... more >>
Application Settings - Stupid Me! I don't get it...
Posted by Johnny Jörgensen at 4/18/2007 3:11:33 PM
Can somebody explain hopw to store and restore settings values in .NET 2005?
I read in MSDN that "The Application Settings feature of Windows Forms makes
it easy to create, store, and maintain custom application and user
preferences on the client computer."
And then it goes on to explain th... more >>
Marshaling to c++ DLL vector
Posted by rdh at 4/18/2007 2:46:28 PM
I'm trying to call a C++ DLL with a parameter that is a
vector<string>.
The C# program Marshaling keeps throwing an exception.
any thoughts?
... more >>
Can't get Invocationist of a butons Click Event
Posted by Boaz Ben-Porat at 4/18/2007 2:42:29 PM
I am trying to retrieve the invikation list for aClick event of a button,
and it seems impossible.
The code:
Delegate[] dels = _testButton.Click.GetInvocationList();
I get compiler error:
The event 'System.Windows.Forms.Control.Click' can only appear on the left
hand side of += or -=... more >>
Communicating with a running process
Posted by kirk at 4/18/2007 2:05:32 PM
Can someone tell me the cleanest way to achieve this -->
I have a running C# tray application. It has a tray menu to let the
user turn on and off things, like monitoring the CPU usage for
example.
Now lets say I have maybe a batch/jscript somewhere and it wants to do
some work and then sen... more >>
Q: Casting objects from an ArrayList
Posted by Martin Arvidsson, Visual Systems AB at 4/18/2007 2:01:37 PM
Hi!
I am going crayz, i cant get this to work. and i don't know what the problem
is.
I have this method
public ArrayList ResolveData()
{
ArrayList workingList = new ArrayList();
Loop and stuff
// do stuff
workingList.Add(resolvedString.Split(new char[]{';', '--'}... more >>
ICollection implementation
Posted by Ethan Strauss at 4/18/2007 10:53:44 AM
Hi,
I have a class which inherits from CollectionBase. I set it up long
ago and it works fine. I just ran FxCop on my project and it wants me to
"provide a strongly typed implementation of ICollection.CopyTo" for that
class. OK, I read some documentation and that looks fairly easy. I ... more >>
WebService Security!!
Posted by Vai2000 at 4/18/2007 10:36:10 AM
I need to create a WS, that can be called by users who call it with a SSL
Certificate a userID and password...Can someone tell me or point to resource
how to accomplish it?
Also can I have individual certs for different users?
Thanks
VS2k5/C#/IIS 6.0/Win2k3
... more >>
Emulate HyperTerminal
Posted by C a r l o s A n t o n i o at 4/18/2007 10:29:01 AM
Hello,
I have to submit a file via HyperTerminal using my PC's internal modem on a
daily basis. Does anybodoy know how to accomplish this in VS2005? Any
language is good, VB preferred. Thanks.
Regards,
C a r l o s A n t o n i o
... more >>
excel process not terminating properly
Posted by chuckie_9497 NO[at]SPAM hotmail.com at 4/18/2007 10:28:35 AM
hello all you gurus. I am struggling with releasing com objects. I
have isolated the problem to the code below. Objects are released and
the process ends until I
use "int k = sheet.Count;" Then the process does not end. So I feel
confident the problem occurrs here. It appears another referen... more >>
Waitable Timer in C# ?
Posted by Eric at 4/18/2007 9:38:01 AM
I'm coming from Win32 world. Now, I'm porting the existing code to C#. I
cannot find the equivalent Win32 Waitable Timer in C#. I have a thread to
perform some task periodically like following:
While(...)
{
Do something ...
SetWaitableTimer(hTimer, ...);
WaitForSingleObject(... more >>
Deep copy alternatives
Posted by bg_ie NO[at]SPAM yahoo.com at 4/18/2007 7:11:05 AM
Hi there,
In my application I have a Settings class which has two objects,
userSettings and defaultSettings. When the application starts, I use a
deep copy to set-up userSettings with the values found in
defaultSettings. This was an akward process, as the Settings class
contains many Lists, s... more >>
Unmanaged code and serialization
Posted by CH at 4/18/2007 7:07:52 AM
Hy,
Is custom serialization a must for unmanaged classes? Is there an
easier way?
Thank you.
Dan Ionut Fechete
... more >>
StopWatch issue with Multi-CUP servers
Posted by Raja at 4/18/2007 6:30:04 AM
I am running a sample application that gives me performance time for each
action. I am using Stopwatch class (found in System.Diagnostics namespace in
..Net 2.0)
to get the Elapsed time. If I run my app in our server that has mutiple cups
(4 cpu box) it gives me negative elapsed time and it i... more >>
this.Cursor works but not Cursor.Current not working
Posted by Joachim at 4/18/2007 5:30:01 AM
Am I not supposed to be able to set the current cursor by assigning
Cursor.Current? this.Cursor in the main dialog works, but not Cursor.Current
other components. I am using a third party tool called SandDock to get Visual
Studio 2005 look and feel. Could that library cause it not to work?... more >>
Error with VB6 client and C# COM server
Posted by SD at 4/18/2007 5:22:02 AM
Hi,
I'm using a VB6 client and a C# COM server. On invoking a method from the
server component,
I get an error saying:
"Run-time error '-2147024894 (80070002)':
Automation error
The system cannot find the file specified."
I've actually used the MSDN sample for COM interop:
CSharpSe... more >>
inherited object as ref
Posted by barkmaz NO[at]SPAM gmail.com at 4/18/2007 3:33:47 AM
Hey,
Can we send an inherited object into a function which requires its
base class as REF?
class y
class x : y
func DoSomething(ref y)
DoSomething(ref x);
gives an error. If I send object without Ref, then modifications on
object get lost when DoSomething func ends.
Can someone desc... more >>
confusion regarding hashtable.
Posted by archana at 4/18/2007 3:26:08 AM
Hi all,
I am having one confusion regarding hashtable.
I am having function in which i am passing hashtable as reference. In
function i am creating one hashtable which is local to that function.
Then i am setting this hash table to hashtable which i am passing as
ref.
So my question is h... more >>
App.Config
Posted by RedLars at 4/18/2007 1:53:25 AM
Hi,
Have a question about an AppSetting's file in VS2005.
Under Assembly \ Properties I got a Settings.settings which contains a
table of name, type, value etc. I also got a App.Config file in the
assembly which mirror the values in the table. When building the app
it generates WindowsAppli... more >>
drag and drop from treeview into datatable using windowsapplication in c#
Posted by dotnetnari at 4/18/2007 1:25:24 AM
hi,
How to Drag and drop the nodes from treeview into datatable
columns using windowsapplication in c#
Thanks
... more >>
Difference between Debug and Release compilation?
Posted by Jonas Hallgren at 4/18/2007 1:02:59 AM
Hello,
Is there any general tips on how to solve this problem: my Debug
version runs fine but when I do a Release version I get error
messages!?
I'm hoping it is a simple option somewhere or a flag I can set...
Regards,
Jonas
... more >>
Interface & Derived Return Type
Posted by hufaunder NO[at]SPAM yahoo.com at 4/18/2007 12:49:47 AM
I have a class "TestSuper" that implements the interface "TestBase".
The interface has a property of type "ReturnType". The class
"TestSuper" does not return "ReturnType" but a derivation
"ReturnSuper". This gives the following compile error due to a bad
return type:
TestSuper does not implem... more >>
C# handing over delegates
Posted by schneider NO[at]SPAM rehm.de at 4/18/2007 12:06:58 AM
Hi all,
class A contains a function "test". the delegate instance in class B
is set to a.test. Now, I want to hand over this delegate from class B
to class C. How can I accomplish this? When I try, the compiler says
CS0029: Cannot implicitly convert type 'B.the_del' to 'C.the_del'.
Here's the... more >>
user control
Posted by Hrvoje Voda at 4/18/2007 12:00:00 AM
I'm using this code to check click event on usercontrol.
But I get an error:
User Control:(GridFilter)
public delegate void FilterText(string filterText);
public event FilterText textFilter;
private void buttonTrazi_Click(object sender, EventArgs e)
{
if (textFilter != null)
... more >>
Minimize/Maximize
Posted by EmilH at 4/18/2007 12:00:00 AM
Hi,
Can anybody show me how to minimize/maximize a window dynamically? I placed
buttons for each of these commands and want to place the code which will
minimize and maximize the window.
Thanks in advance.
Emil.
... more >>
XmlException message disappears.
Posted by BLUE at 4/18/2007 12:00:00 AM
In a property i do this:
....
catch(XmlException e)
{
throw new XmlException("Error processing configuration file!",e);
}
Then I catch it in another class:
catch(XmlException e)
{
MessageBox.Show(e.Message + e.InnerException.Message);
}
With the debugger I see that "Error pr... more >>
|