Answer Questions
MsVicky ASP usercontrol with C#
I have an ASP webpage with a usercontrol. In the usercontrol is a number (int) that I would like to send to a nother class outside the usercontrol. Well just wondering how in *beeb* dos one do that. Some code would be helpfull Well hoping for all the help in da world :D P.S. using visual studios 2005 You can use a delegate. A delegate is like an event, except that you can define t he function signature delegate void MyFunc(int i); ...Show All
Héctor Detect compiler version?
Is there a way to detect the version of the compiler in code like you could with VC++ with preprocessor directives I can't find a predefined one for C# that indicates if running VS .NET, VS2003 or VS2005 We would like code to be potentially buildable under each compiler for a transition period. Manually adding these defines to projects would be a pain and would require maintaining seperate projects or build configurations, so was ho ...Show All
C26000 typedef in C#: Visible in separate projects
I saw that you could get around the absens of the C++ typedef feature by using: namespace NameSpaceCS { using Handle = System. Int64 ; or using Handle = System. Int64 ; namespace NameSpace CS { But this is only visible in one file. How do you make it visible in other projects. I have added the reference and the using NameSpace CS ; in my other project but it still seems to ...Show All
JimBeanz get the next value of identity
Hi how can i now in sql.. what will it be the next value of identity try: SELECT MAX(ID_COLUMN) FROM TABLE_NAME This gives the current max, so add 1 for the next value. yes its autoincrement so.. can you give example By using name of the table as an argument to IDENT_CURRENT and IDENT_INCR functions you can figure out what will be next value of identity. Following sample shows next value of i ...Show All
fenris timer problem
I've a timer (interval = 1000) in my app. When the timer is working parallelly a big loop is also working. but I found out untile this loop not finished the timer won't work. How can I force the timer to alwasy work every second In your big other loop, try calling Application.DoEvents() for every iteration. Timers are based on (I think) windows messages - and so, they need a message loop to be running ...Show All
Alexandre M Outlook 2000 crashes on exit with WDS installed
I ran into 2 problems with WDS version 2.06.0000.2083. I have just installed WDS for the first time on XP SP2. I don't have MSN Search Toolbar installed. My Outlook setup doesn't use Exchange and just connects to my ISP to retrieve email. The problem I have is that Outlook crashes on exit. I can post memory dump if necessary. Additionally, if I let WDS finish indexing while Outlook is up, WDS doesn't ever find anything in the email message ...Show All
John E Katich AccessViolationException when calling an already made dll file
Hi, I have an already made .dll file that I have referenced in my C# program ,i.e., I don't know the details inside its code. when I use it in loop it works well many times , but thereafter it produces the 'AccessViolationException', it says: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' Please Help me ,how can I handle that exception Thanks, Aya. ...Show All
Chris Woods C# 2.0: sizeof(MyStruct) ?
I'm trying C# 2.0 beta 2. The online help says sizeof operator accept a value type parameter, but the struct is a value type, too. Why compiler complains the code: int i = sizeof(MyStruct); I know I can use unsafe code and Marshal.SizeOf() to get the size of a structure. I'm just wondering how I can use sizeof operator to do the same thing. Thanks! Some additional info from the C# reference documentation: For all other [non bui ...Show All
xhead How to restart from Standby or Hibernation
I am trying to implement both a startup and shutdown function via USB commands. I have been able to send my PC into either Standby or Hibernate power states using (.NET 2.0) Application. ShuttingDown = Application .SetSuspendState( PowerState .Suspend, true , false ); Is there a similar method for waking the PC from Standby or Hibernation I was under the impression that while in Hibernation mode the processor was stopped (ie the applicati ...Show All
RudolfT Properties Collection
Hi all, I wonder if one of you kind people would be able to point me in the right direction. I have a class with quite a few properties and I thought it would be quite useful to be able to iterate through the classes collections with a foreach loop and return information about each property (such as name, type etc) and its value . However, this is where I come unstuck as I can't find an out-of -box way to do this. I guess I need a collection of ...Show All
valef Question about making object instance visible to other objects
I have 3 classes: MainClass SettingsClass FormClass Now, Mainclass handles most operations and does it's job well, upon being instantiated it creates an instance of SettingsClass, we'll call this instance _settings. SettingsClass holds global settings for the application... like the user name, state of various things, that sort of stuff. During the lifetime of MainClass, a FormClass may or may not be instantiated as well. FormC ...Show All
Jignasha C# adding a record to an access Database
DataRow dr = _dsComment.Tables[ "Comment" ].NewRow(); dr[ "OrdNo" ] = _Order; dr[ "Name" ] = UserName; dr[ "Date" ] = System. DateTime .Now.ToShortDateString(); dr[ "Comment" ] = frm.Comment; _dsComment.Tables[ "Comment" ].Rows.Add(dr); OleDbCommandBuilder cb; cb = new OleDbCommandBuilder (_DaComment); _DaComment.Update(_dsComment, "Comment" ); I already filled the dataset on the form load event. I am getting an error saying Syn ...Show All
MrT25 Applying System.Diagnostics.DebuggerHidden() to all Property's
Hi all, I have a load of Properties (read and writable) and as my debugger is slow I have used the following code above each Property declaration... [System.Diagnostics.DebuggerHidden()] ...Is there anyway I can, instead of having this line above every Property, can I have it once to say that I want to hide all my properties from the Debugger Thanks Tryst No it can only be applied to class members. However I don't think that is real ...Show All
ludmila Getting rid of excel.exe from memory
I use excel interop to load in data from excel file. After the loading is done, I call myExcelInstance.Quit(). But in task manager I can still see an EXCEL.EXE for each file I opened, eating up a fair bit of memory. These instances don't go away until I close my application. What am I doing wrong ~S snowsquirrel wrote: Did you explicity use <code></code> Thanks. The synta ...Show All
Confuzed VB Guy.... C# COM question
I have a dll that I use in VB 6. I create a variable called DB, I access the records in the DB like this DB(index).PutStringField("data") when I try that in c# I get an error is a 'property' but is used like a 'method' I have no idea what to do because I have not done any COM interfacing in C#. Is it a simple syntax problem or do I need a different version of the dll that I have always used ANY help is grea ...Show All
