-
- Interesting C# Pointer problem
by gudguy
- 8 Replies
- Last post
by gudguy
- Am using OCX in my C# application. It's triggering an event of this signature: private void GetData(int size, byte pData) the orignal signature in C++ is: HRESULT GetData(int size, BYTE* pData); The documentation says that the pData is a pointer to allocated memory holding the data packet (most probably a raw data packet for video). I have tried this to get the data: IntPtr ptrAlloc = Marshal.Allo
-
- Best storage practices
by R. Alex
- 6 Replies
- Last post
by O.Miller aka phoboss
- I have a few ideas for several software packages that I'd like to take a stab at creating with C# but I'm stuck with how and where I'd like to store the data generated. I don't expect there would be a tremendous amount of records involved but there are things like schedules, tasks, logs, etc... I'd like to start out creating a shareware or maybe attach a small fee so that means keeping my tools re
-
- Please help me,in Text Files
by Swapna55
- 9 Replies
- Last post
by omgtifbs
- i have to read a text file and delete the first line and last line.
Text file can be variable length.
text file can 2.5 gb size.
How can I do this in c#.,Please Respond ASAP
-
- using an Observer Design Pattern with a reference property
by Sweeps78
- 6 Replies
- Last post
by Sweeps78
- Hi, I was wondering if anyone who has used the Observer Design Pattern with a container of observers knows how to notify when there was a change to a Reference type Property's property. I have searched all over online, but all I can find is when the Property is of a Value Type. For example, check out my "TODO's" in the following code below: class Wheel { private double _diameter; &nb
-
- How to communicate to a parent panel from controls in another panel deep down in hierarchy
by newbieToVJS --Now C&#3
- 2 Replies
- Last post
by newbieToVJS --Now C#
- I have controls in several panels, each panel being at varying depths form the MAIN PANEL - some controls are in the MAIN PANELS, some are in a panel which is 1 level down, some are 2 levels down from the MAIN PANEL, and some further deeper. The Form is not nearby either - it is many level above the MAIN PANEL. How can the MAIN PANEL be informed if text changes in one of these controls.
Exa
-
- case irrelavant in switch statement
by Colin Gemmell
- 5 Replies
- Last post
by James Curran
- How can you make a string comparison in a switch statement ignore case. I know In an if statement you can use the stringcomparison, is there an equivelant from switch statements. Cheers Colin
-
- Use function from DLL file
by YMaod
- 12 Replies
- Last post
by Michael_Grumbach
- Hi,
I'm a beginning C# programmer and I'm writing an earlier written program(c++) in C#.
I have a DLL file called K8062D.dll which has following functions:
StartDevice Opens the communication link to the K8062 device
StopDevice Closes the link to the K8062 device
SetChannelCount(Count) Sets the maximum DMX channel in use
SetData(Channel, Data)
How can I call these
-
- VB6 To C# Translator
by Wiltek Ghozali
- 3 Replies
- Last post
by Peter Ritchie
- Hi friends... i found some problem converting my VB6's codes into C#. If you have any references about tools or utility about this, please inform me...
i've tried some tools but, it's not work well, some code was missing or broken.
-
- How do I determine the size of a 2D string array in c#?
by knji
- 7 Replies
- Last post
by Peter Ritchie
- A 2D array of type 'string' is being passed to a method.
How does the method determine the dimension of this array
Thanks in advance.
-
- Hi, I need help in C#
by Titus2go
- 5 Replies
- Last post
by Titus2go
- Hi, everyone I am Titus Cheng. I am currently facing a problem that I still can't solve. I want to wrap tags around SelectedText in Rich Text Box Control. I am not trying to use html tags, but whehter contextual tags. For example if I select the word "glass" and change the font of the text to red, it will appear like "[red]glass[/red]" and if I change the text to bold, it will
-
- Parsing registry Run keys, separating program paths, from start parameters
by Predator14567
- 6 Replies
- Last post
by rickracer
- Hello, I am making a program that needs to be able to parse those HKCU\software\microsoft\windows\currentversion\Run\ keys, and I need it to be able to seperate the value of the values in there, separating the Program .exe paths, from the actual start parameters, and I am having some trouble with this, I have been using a few methods in the Path class, and would use .Replace("\"",&q
-
- use of out keyword
by Hojjy
- 6 Replies
- Last post
by Digitake
- In the code below, oData is an out parameter to ReadData function. oData is assigned to in this function. Still I get following error - "The out parameter oData must be assigned to before controlleaves the current method."
public void ReadData( out CPushVariableData [] oData)
{
try
{
CPushVariableData [] oDataLocal;
oResponseManager.ReadData( out oDataLocal);
-
- Installing a System Wide CBT hook
by bitem2k
- 5 Replies
- Last post
by bitem2k
- Hi im trying to install a CBT system wide hook.
In the hook callback method i just simply write the code parameter to the debug window.
My code works fine when i specify a specific thread to monitor,
however when i try and install a system wide hook using SetWindowsHookEx
it prints to the debug window until i move the mouse out of the
programs window, at which point it stops, and the
-
- A case for generic classes?
by submicron
- 2 Replies
- Last post
by submicron
- Hi All
I have a dervived adapter class which derives from an auto generated typed dataset class. The problem is i'm going to need to implement this same code (update method) over a number of tables and hence adapters (which is a lot of typing) and i wondered if generic classes could help me out here
For example I have to write update for LevelTableAdapter which uses LevelDataTable and also
-
- Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
by agdurga
- 4 Replies
- Last post
by agdurga
- Hi,
I migrated a windows application which was written in c# (.net 2003) to .net 2005. But when i run my application it shows the following error Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I am using AxInterop.MSChart20Lib.dll and Interop.MSChart20Lib.dll for the chart control. I am not able to register these 2 dlls.
Please help.
Regards,
Du
-
- Cut String in two parts
by guilhermecvm94558
- 5 Replies
- Last post
by ReneeC
- Well, i have the some strings like "msiexec /l xxxxxx", "C:\Arquivos de programas\xx.exe -blablabla" I need to get the everything before the space as "string1", and everything beforce the space as "string2", how could i do that thanks
-
- implicit conversion operator question
by Brian Kramer
- 14 Replies
- Last post
by Peter Ritchie
- I don't understand why I would get CS0553 on this code. The docs imply that the error should exist when you are trying to convert from Foo to object, not the other way around as this code is doing. Can anyone enlighten me Thanks, Brian public class Foo { public Foo( object x ) { this .x
-
- IDE shuts down immediately
by Rhuno
- 4 Replies
- Last post
by Figo Fei - MSFT
- Hi all, I'm having an issue with the C# express IDE in that it shuts itself down shortly after I open it. It was coming up and showing the start page which would have a message saying "There is no content available yet. Content will be downloaded once a connection to the internet is established." Which is weird, because I do have a connection established. But after showing that message b
-
- Logging Class - Instance or Static
by JammingJ
- 2 Replies
- Last post
by Lowendahl
- I have a logging component that I will access in other assemblies. So it was brought up to my attention that I should pass an instance around to these components instead of just making the logging class static. If I make it static I wouldn't need to pass an instance around. What is your take on this
-
- Internal Calls
by F&#225
- 5 Replies
- Last post
by Fábio
- Hi, I'm using a .NET Reflector to try to learn the how the core of .NET works. So I ran into something like this:
Code Block
[ MethodImpl ( MethodImplOptions . InternalCall )] private static extern void SleepInternal ( int millisecondsTimeout);
How do I browse (if it is possible) the contents of SleepInternal function. Where is it import
-
- What's the most efficient way of doing this?
by NikTuk
- 4 Replies
- Last post
by ChunSheng Tang - MSFT
- ok, I need to store a list of key/value pairs of type string, and I need to be able to sort by either key or value, ascending and/or descending.
SortedList works ok by key, but when working by values, it's not that helpfull unless I revert key<->value values (not too efficient).
Is there a better way
-
- Help with basic property implmentation homework
by dj37
- 1 Replies
- Last post
by Burak SARICA
- Supercoders. Hey. I am supposed to alter this code but cannot seem to get it to build without a bunch of errors. I am supposed to take this code and make Score and Pointsperquestion public data members, and also set the score property to read-only. any help Thanks! namespace Assignment2 { public class Quiz { public double PointsPerQuestion = 0.0; // Implement properties--Score should be read only
-
- DLLImport - using dynamic file path
by lufa
- 6 Replies
- Last post
by Anil15
- hello
I want to use unmanaged dll in my c# project, but I don't know were user will put the unmanaged dll file during instalation, so I can't hard coded file path in DLLImport attribute. During Instalation user will choose common file folder then I want to put this path to registry or to some xml file. But what then - of course i can read this path on application start up but i can't set path i
-
- Where are C# 2.0 Webcasts?
by Sunil M
- 1 Replies
- Last post
by IsshouFuuraibou
- I remember seeing a series of webcasts from fritz onion et all on c# 2.0. But I tried all possible searches and cannot locate those webcast series. Can anyone point me to them, if they still exist!
Thanks
Sunil
-
- Dll Import
by Sniper167
- 13 Replies
- Last post
by Evan Mulawski
- How do I import a dll into my project and then use it for the project's layout