-
- Using C# code from C - Possible?
by aemami
- 2 Replies
- Last post
by O.Miller aka phoboss
- Hi, I don't know how many other people might have run into this situation before ... I am hoping there is an elegant solution to my problem:
At the company I work for, we have a HUGE existing code base that is written and C and C++ (but mostly C). Our code is compiled with VS2005. However, it is not a .NET project, and makes absolutely no use of any .NET libraries.
A lot of the c
-
- Class accessibility?
by AlexTurp
- 8 Replies
- Last post
by Patrice1974
- Ok, lets say I make a new project in VS05. I create a button named button1 on a form named form1. Now I create another file and another class (Right Click, Add, Item... C# class). Now I am in another class in another file, but if I do "form1.BackColor" it doesnt work. I cant access the button either. I can also make a variable public int test = 34; Cant access it outside the form1 class either. I
-
- Newbie Question: creating GIF images from c#
by kroyce
- 3 Replies
- Last post
by nCognito
- all,
I am new to graphics programming in c# and am looking for a tutorial that will take me from creation of a graphic through exporting it as a gif (or jpeg). I have kind of figured out the creation of the graphic using System.Drawing but am not sure where to go from here.
Anyone solved this problem before
Many thanks in advance.
Kevin
-
- which is the best way to desgin a bussiness model, class or struct?
by sharpMoon
- 10 Replies
- Last post
by sharpMoon
- i develop a B/S project which include below: WEB - web project - UI BLL - class library - Business Logic DAL - class libaray - Data Access Model - class library - Business Model when i design the business model, for example BookInfo, i am confused for create it with class BookInfo or struct BookInfo. who can give me a guide thx in adv
-
- A design pattern for retrying operations
by Yazan Diranieh
- 2 Replies
- Last post
by Yazan D
- Is there a well-known design pattern for retrying methods that are likely to fail
I am thinking of a delegate-based implementation where the delegate wraps the method to be invoked. The delegate would then be fed to a RetryMethod method that implements the actual logic behind retrying an operation.
And what if each method that supports 'retrying' takes different parameters Would 'anonymous d
-
- How to use Visual C# Disable Mouse and KeyBoard
by Kangol
- 4 Replies
- Last post
by OmegaMan
- Dear All:
How to use Visual C# Disable Mouse and KeyBoard Use DLL or .....
Please Help me... Thank You
-
- Need help with enum and color assignment
by Rick Shaw
- 6 Replies
- Last post
by akaRickShaw
- Hi, I need help with some enum and color assignment. This is what I need to do. I have an enum like: public enum statusFlag { Unknown = 0, Easy = 1, Medium = 2, Hard = 4, ExtremlyHard = 8 } From xml: (not sure how this is repesented) Unknown = Black
Easy = Green
Medium = Yellow
Hard = Orange
ExtremelyHard = Red
Now, I have a set of color for each of the different status flags.
-
- Stop Thread and exit program
by danni123
- 11 Replies
- Last post
by OmegaMan
- My program has a form and another worker class. Worker class has a thread that receiving data, in loop: socket.ReceiveFrom(....) When I close the form the program (thread) is still running. How to stop everything and exit
-
- Redim in C#
by danych
- 5 Replies
- Last post
by Matthew Watson
- Hello everyone, is there a way to simulate VBs redim function in C#
Thanks
-
- How to convert an exponential number to non exponential number?
by Srikanth kannan
- 5 Replies
- Last post
by Matthew Watson
- Is there a way to convert an exponential number (held in string format) to non-exponential format without losing any precision in the number For example, I have a string variable containing "7.7583877127496407E-6" and I want to convert it to a string in decimal format. It seems that converting it using a double or decimal variable as an intermediate step to do the reformatting only prese
-
- Thread to Thread communicatoin - delegate?
by snivek
- 1 Replies
- Last post
by ScubaSteve20001
- I have a "worker" thread that runs and I need it to update its parent thread with its status.
Code Block
//Worker Class - runs as sep thread
public class Installer { string computer; string server; string printer; ContainerControl _parent; string _status;
public Installer(string[] args, ContainerControl parent, Delegate UpdateStatus)
-
- Using C++ SDK in C#?
by TMar
- 1 Replies
- Last post
by Irfan Kiyani
- I have a set of cameras that I need to write a program to operate and the manufacturer provides an SDK in C++. However, the system I need to interface with is all being written in C# and I need to know if there will be a problem running those function (I assume there will be)
-
- rename a directory
by Konstantinos Polychronis
- 6 Replies
- Last post
by Matthew Watson
- How can I rename a directory
-
- Initializing fields (refrence types) to null
by BatmanBeyond
- 8 Replies
- Last post
by OmegaMan
- We have an on going debate with no clear winners so far on this subject.
We agree that initializing fields of reference types to null is unnecessary code but does this really incur a performance hit
thnx
-
- map xml to crystal report using c#
by IMBack
- 6 Replies
- Last post
by IMBack
- Hi,
I am new to C# Crystal reports, and I am having problems finding away to "map xml data to Crystal Report" using C#"
I spend lot of time, and can't find a useful artical...
Please post anyway that can help me...
Thank you.
-
- Indexing Arrays
by GMan_ETC
- 12 Replies
- Last post
by boban.s
- Is it possible to index a string array four strings at a time
I have a list of (100) URLs that I want to display (4) of the URLs per pass through a button click. Subsequent clicks should display the next (4) URLs, all the way through the list. Is this possible or just wishful thinking
Thanks in advance for your attention to this.
-
- a design question
by shachar8
- 5 Replies
- Last post
by Derek Smyth
- hi all.
my team leader ask me to develope a small winform application.
this app should let the user select some files(from whereever he wants), set few other fields, and click "send files".
the file types are limited and some validation must be done before continuing.
my app should copy these files to the network, where a manager will look at them, and then it will copy them
-
- questions about ClickOnce
by Ori'
- 1 Replies
- Last post
by LORDTEK
- Hello,
Since I'm not familiar with this technology I decided to ask few questions, to see if I should use it or not.
1. My Application is combined of few exe files, dll files, and more configuration (text) files and directories
2. I want to deploy all of them, by just copy all of them to a chosen installation dir
3. An update means an update to one or more files, and sometimes file add
-
- Partiol class wount let me do it simple...
by Gyða
- 3 Replies
- Last post
by Gyea
- Bit of a help basically m_currentColor wount take the value of clr which is sent from MainWindow and yes I have checked if clr in fact holds information, which it dos. It just wont pass it on... What am I doing wrong namespace Draw_Me { public partial class MainView : UserControl { int m_currentColor public MainView(int clr) { m_currentColor = clr; } //Much more code h
-
- Console.ReadLine() not working
by Artichoker
- 5 Replies
- Last post
by Artichoker
- Hello. I am programming a simple text game on a console application. I have a method called "Input" that creates a prompt to enter your command, however the line of code
Code Snippet
string input = Console.ReadLine(); seems to get skipped so there is no time to enter a command, and it instead goes to the error checker, for which there is always an error. Can someone please t
-
- "string" inside the bracket.
by tsc
- 3 Replies
- Last post
by nikov
- Can anyone tell me what does this statement means
Code Snippet ( string )List[index];
Is it related to conversion to string type
Thanks!
-
- while loop error--need help
by rookie_rockie
- 11 Replies
- Last post
by Jeremy Filburn
- hi, i've created the following codes in the console application and it compiled just fine
Code Snippet
{ byte[] byteData = null; byte[] byteTemp = new byte[512];/ int length = 0; int lengthImageData = 0; FileInfo finfo = new FileInfo("a.jpg"); FileStream fStream = File.OpenRead("a.jpg"); byteData = new byte[ finfo.Length]; while (
-
- Tip: Prevent Outlook from auto-formatting emails ("This message has extra line breaks")
by Steven_M
- 0 Replies
- Last post
by Steven_M
- Run the message body through this function before before sending it out in the email(s).
private static String FormatEmailBody( String body) {
StringBuilder newText = new StringBuilder ();
//two spaces at start of line makes Outlook not remove extra line breaks
newText.Append( " " );
newText.Append(body.Replace( Environment .NewLine, Environment .New
-
- Writing Simulation Program
by Project Storm
- 1 Replies
- Last post
by OmegaMan
- Ok here is my problem, I'm new to programing, very new. My only experience comes from a college JAVA class that I failed. I was hoping what I wanted to do would be simple enough. I wanted to write a program that would be able to generate a story (a wrestling match to be exact) using a string of random sentences. Here is basically what I am trying to do. Match Type: (Single, Submission, Tag Team, T
-
- Can I use C# to write script without re-complie?
by Wood-MSDN
- 5 Replies
- Last post
by Ryan Lamansky / Kardax
- Since C# is JIT, is it possible to use C# like scripting to write script and rerun without recomplie Or do I have to use .Net scripting Other than JScript.Net, what other .Net scripting choices are available
Thanks.