-
- GUI Update Problem
by rutlean
- 2 Replies
- Last post
by Steve Py
- I have a c# GUI that displays motor postion and torque with a progress bar and a label. While the motor is running, the progress bar and label look like they are missing updates and jump in position. I've put in a console.writeline where I am updating the progress bar and label to make sure they are being updated as intended and they are. Does anyone know why the GUI isn't updating all time even t
-
- Start windows service as a usual application
by Artem Kliatchkine
- 2 Replies
- Last post
by Artem Kliatchkine
- Hi All,
I would like to create a service which could also start as an usual application, simply by double clicking it.
This seems to be not that complicated - just adapting Main() method where, depending on the way the application was started, execute whether a service or, let's say, a form.
The question is how to detect application's startup type in Main. Does anyone know how to do this
-
- implement Generic IEnumerable<T>
by brother14th
- 7 Replies
- Last post
by Figo Fei - MSFT
- How shall we implement the IEnumerator IEnumerable .GetEnumerator() since the foreach loop is calling the public IEnumerator < T > GetEnumerator() Can someone enlighten me Thanks.
-
- c#->XML file(s)
by IMBack
- 11 Replies
- Last post
by IMBack
- Hi,
I have to store about 300,000 user data.
I checked database, and It is expensive. So I deicide to store the data in XML file.
Now with Database, you can add rows, update multiple rows at the same time. so if multiple users decided to update its data, with database it can be done, and no data will be lost.
Now, I am not sure about XML file. If I have one xml file
-
- P/Invoke Question
by zenox
- 2 Replies
- Last post
by zenox
- Ive use P/Invoke before with simple function calls, however now I am trying to use it with a double pointer and I cannot seem to get it working. This is my C function I am trying to call: void train(double ** data, int cols, int rows); From what I have read you cannot marshar a double pointer by default Does anyone have any suggestions on how this can be done Thanks!
-
- Using Enum as Index
by LiamD
- 8 Replies
- Last post
by OmegaMan
- If I have an enum such as
public enum Test
{
One = 1,
Two,
Three
}
I want to be able to add a value based on the enumerated type such as:
MyValue[Test.One] = 17;
I would also like to keep ot strongly typesd so
MyValue[1] = 17;
is invalid.
Is this possible within C#
-
- How to write typedef structs and unions in C#
by Axe22
- 10 Replies
- Last post
by jo0ls
- I have this code from a C++ project I want to migrate to C#. How would I write this in C#
typedef struct _hdr_struct { char fileType[ 4]; union { char fileVersion[ 4]; struct { char v; char major; char dot; char minor; } versi
-
- Unhandled exception only when running in release without debugger attached.
by utterlyconfused
- 14 Replies
- Last post
by utterlyconfused
- I am beyond baffled by this. My application throws a System.AccessViolationException only when it is run in Release mode without the debugger attached (as in, I run the exe directly, outside of Visual Studio or I do "Start Without Debugging" in the Debug menu). Debug mode - everything works great; Release mode with debugger attached - everything works great. The very nature of how this e
-
- Unmanaged code
by Azurewrath
- 4 Replies
- Last post
by Azurewrath
- Hi,
I know that for some stuff you have to use unmanaged code in c#, to open the cd tray or lock computer. I was just wondering if these will have corresponding implementations in .net as managed code, so we don't have to lean towards unmanaged code
Thanks,
aw
-
- Quick question on - Retreiving data from object's objects
by RRRouter
- 6 Replies
- Last post
by Martin Platt
- Is this the best way to retrieve data from object's objects Just asking so I know, since I think I'll be using this alot in the future. public class Compound {
Part partObj = new Part(); public Compound() { } public double Duration {
get { return partObj.duration; }
set { partObj.duration= value; } } } Does it look good
-
- Source code parsing.
by Seimur
- 3 Replies
- Last post
by Mujdat Dinc
- I'm very weak in regular expressions, but there are needs to parse source code and build project graph in memory. I know that Visual Studio uses some mechanism to parse sources and after that displays project tree in Class View panel or uses same mechanism to create class diagram from a source. Which library does it, where I can find it and how I can use it
-
- Cannot convert from null to T
by d1sReGard
- 3 Replies
- Last post
by d1sReGard
- Hello everybody!
I have a (maybe kind of easy) question that I can't find an answer for anywhere, even if I think it can't be that hard...
I wrote a generic ContainerWithLink-class implementing the following idea: A container holds an object and has
a link to another container. This is useful to implement a handful of abstract data types like stacks or queues.
To make the class mor
-
- debugging - step into another project from web project ?
by BitShift
- 1 Replies
- Last post
by TaylorMichaelL
- I have two projects:
a) a large class library which is a solution with many projects and built as a single assembly
b) a web project, again with a solution and several projects
While debugging (b) I want to step into (a). I have two instances of visual studio 2005 open, one with each solution.
How do i get a break point to hit in (a)
-
- How to convert an infopath file pdf
by akjal
- 12 Replies
- Last post
by Moss_Sharepoint
- Hi,
I have a requirement to convert an infopath file to pdf.It's very urgent, friends.
I have no idea about. Is there any way of doing so through code ..
Thanks in advance...
-
- How do you remove the escape char \ from a string?
by Guido1
- 4 Replies
- Last post
by Guido1
- In my code I collect a few strings that I put together to run from the command line:
string softDemoArgs = string .Format( "\"{0}\" \"{1}\" > \"{2}\"" , softDemoPath, wav8KFileName, wav8KText);
This causes the softDemoArgs string to look like:
"\"C:\\Program Files\\AudioSoft\\AudioWord\\SOFTDEMO.EXE\" \"C:\\Program Files\\Au
-
- Where in C# is the "My" object that is in VB 2005?
by russr
- 6 Replies
- Last post
by David Anton
- I have two questions: 1) It appears that the "My" object that was added to VB 2005 does not exist in VC# 2005. Why was it left out 2)Is there a way to use it in C# I apologize if this has been asked before, but it is really hard to search for something like this to the generic nature of the keywords 'my object'.
-
- Win32 and window message queues
by Javawag
- 5 Replies
- Last post
by Javawag
- How do you tell a c# program to minimize I use this code to minimize Windows Media Player (Win32 is a namespace I defined which contains all the necessary calls to user32.dll)
Code Snippet
Int32 iHandle = Win32.FindWindow("WMPlayerApp", "Windows Media Player"); Win32.SendMessage(iHandle, Win32.WM_SYSCOMMAND, Win32.SC_MINIMIZE, 0); How can I use this code to minim
-
- Copy Local of COM Interop DLLs and child project references
by ebell
- 1 Replies
- Last post
by nobugz
- Hello, all ...
I am working in VS2005 in C# on a solution consisting of multiple DLLs and one EXE assembly. We are not using the GAC, only local folder access for loading DLLs.
I have Project A (EXE) which references Project B (DLL Class library), both .Net assemblies. In Project A the reference to Project B is set to Copy Local so I get Project B in the output bin folder. Project B co
-
- Finding matching key values between two Hashtables
by wannabe_coder
- 2 Replies
- Last post
by Kea
- What's the most efficient way of accomplishing this Would I need to do some kind of "sort"
-
- Properties.Settings reviewing settings in Windows explorer
by Korsten
- 3 Replies
- Last post
by Korsten
- Hello Everyone,
First of all I hope I'm posting on the right place.
I'm working on a program in VS2005 C#.
I have created a program which has its settings put in a Settings.settings file.
Now I want to know where I can see the CHANGED settings. When I go to the project folder and open the Settings.settings file I only see the default settings.
But I have changed a couple of
-
- Casting parent class to child
by viperjason
- 12 Replies
- Last post
by viperjason
- I expected this code to go more simply but it doesnt. I want to cast the parent to the child class as the following: class parent { public void doStuff(){} } class child : parent { public void domorestuff() {} } parent p = new parent(); child c = (child)p; How can I make that work
-
- Question about variables
by Ahmad Kharbat
- 3 Replies
- Last post
by nielsvanvliet
- is there any way to check whether the variable is declared or available in the context before using it
in some case specially in asp.net with c# .. i need to use some Request variables.
like page.aspx variable=value
in this case with the page loads a variable called Request("variable") will be declared.
but if page.aspx has loaded normally without the variable=value t
-
- Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
by TomPearson
- 6 Replies
- Last post
by Anonymous280z
- Hi
I have an exception being thrown for which I cannot seem to trace the cause. The exception is caught in a try catch block in the Main Appliation loop and contains the information below.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageA(MSG& msg) at System.Wind
-
- How to use static class in Class Library (C#)
by Guostong
- 5 Replies
- Last post
by Indian Ocean
- I wrote a IE extension with c#, function is working, but I want to share a global flag in different IE , I used static class, it works in different tab in same IE window, but don't work in different IE window. SO What can I do [Guid("xxxx--...")] [BandObject("QToolBar", BandObjectStyle.Horizontal | BandObjectStyle.ExplorerToolbar | BandObjectStyle.TaskbarToolBar, HelpText
-
- IDE Navigator Problem
by JimRogersIV
- 3 Replies
- Last post
by nigek
- My IDE Navigator opens normally when I press ctrl+tab, but it doesn't go away when I release the buttons. I have to ESC to cancel or press enter (or click) to choose an option and dismiss the navigator.
I understand that this is normal behavior if sticky keys are turned on - but they aren't.
This had always worked normally until yesterday, and I don't know what might have changed. The cat sa