|
Hi,
I am working on compiling java code from C#. But I am not getting the exact way, how can I compile it. Here I should not use J# compiler for compiling java code and I should not use any classes and methods in System.diagnostic namespace.
Here I am developing C# winforms application which contains text area and compile button. The user is going to write, compile and execute code for C# or VB.Net or Java. For C# and VB.Net, we have CSharpCodeProvider and VBCodeProvider. But for java we do not have any compiler for compiling java code from c#.Here i should not use any file concept. Simply I am writing java code in text area and whenever I click compile button, it need compile and if any errors it need to show.
Please give me a solution ASAP.
Thanks & Regards,
Hanumanth Reddy.K
|
|
|
|
|
I have an application in VS2005 .Net but i don't have VS2005
Can i open an run the application in VS2003.
If "yes" then how to do that.
Thanks in advance.
Rahul Kulkarni
|
|
|
|
|
You could create an empty solution/project and add all the files.
But it probably won't compile, because VS2005 creates C# 2.0 code and VS2003 only knows C# 1.x.
Why don't you install SharpDevelop?
_____________________________________________________________________________
I don't expect too much, all I want is your vote for Halbsichtigkeit.
|
|
|
|
|
|
|
|
I wrote this simple (VS.NET2005 ? C#) performance test program
http://www.galador.net/stuff/PerfTest.zip[^]
which could draw with either:
- "Default Method"
- "Method 1"
Now if I select "Method 1" nothing at all is drawn
I can't get it.....
Is it a weird GDI+ bug? or am missing some obvious error?
|
|
|
|
|
My bug
0xFFDEAD is tranpsarent
instead 0xFFFFDEAD should be used!
|
|
|
|
|
There is any way to make a control invisible at design time when "Visible" property changed to false?
|
|
|
|
|
No, because you need to be able to see it in order to work with it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi!
I'm using the colorDialog to let the user select a color, then I save it to the registry. Everything is fine except with the user doesn't select a named color. What I am getting save to the registry is something like:
ffff8000
I tried the following:
ColorConverter colConvert = new ColorConverter();
treeview1.ForeColor = (Color)colConvert.ConvertFromString(regkey.GetValue("ColorName").ToString());
But it's not working when the color is not named, e.g. Yellow.
I'm getting:
ffff8000 is not a valid value for Int32.
Please help. Thanks.
|
|
|
|
|
LOL - just answered you on MSDN.
int decAgain = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
There's nothing wrong with the code that you have posted. Just only a misunderstanding of what ColorConverter does. ColorConverter, as you probably have guessed, is only meant to convert a named color, as defined by a constant of Color, to it's Color instance equalivalent.
To convert the hex representation you can use Color.FromArgb()
Post back if there's anything you don't understand.
Graham.
|
|
|
|
|
Just adding on to what Christian has answered:
This should work. (I hope!)
Color c=Color.FromArgb(int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber));
[Edit] Yay! It works!
-- modified at 18:57 Sunday 18th June, 2006
|
|
|
|
|
Thanks guys. It worked.
|
|
|
|
|
The title says it.
Please help. Thanks.
|
|
|
|
|
How about this. Will check to see if registry key exists.
using Microsoft.Win32;
...
string keyName=...;
string valueName=...;
object defaultValue=...;
object o=Registry.GetValue(keyName,valueName,defaultValue);
if (o!=null) {
}
else {
}
|
|
|
|
|
Hello
I am trying to rename a Direcotry/folder in windows
My way to do it goes like this:
private void RenameFolder(DirectoryInfo dir, string NewName)
{
FileInfo fl = new FileInfo(dir.FullName);
fl.MoveTo(string.Concat(dir.Parent + "\\" + NewName));
}
My question is if this is the best way to rename a directory/folder?
Thanks
QzRz
|
|
|
|
|
Hi.
You can also use Directory.Move(string src,string dest)
Or even DirectoryInfo.MoveTo()
So to use your existing code, this can be simplified to:
private void RenameFolder(DirectoryInfo dir, string NewName)
{
dir.MoveTo(Path.Combine(dir.Parent.FullName,NewName));
}
Graham
-- modified at 17:12 Sunday 18th June, 2006
|
|
|
|
|
Hi
Thanks for the reply
Didnt think of you way to do it, thanks
|
|
|
|
|
Hi guys!
Please I need help. I have an MDI form which has click events for ADD, MODIFY and DELETE all these go to the same form which is the "ADD FORM".
For MODIFY AND DELETE click; I need to run a SQL query that will load the data from SQL tables into the textboxes. My question when I open the ADD FORM; how do I process it according to which click made the entry.
i.e.
If (ADD button was clicked from Mdi form)
InitializeComponent()
else if (MODIFY or DELETE were clicked)
connect to SQL table and load data into textboxes
else
I hope this makes sense, all I need help with is how to process the form based on the click.
Please help! thanks in advance.
sasa
|
|
|
|
|
You test the sender object to determine what action to tak:
private void ButtonHandler(object sender, System.EventArgs e)
{
if(sender == this.buttonAdd)
{
}
else if(sender == this.buttonModify)
{
}
else if(sender == this.buttonDelete)
{
}
}
- It's easier to make than to correct a mistake.
|
|
|
|
|
I am assuming I create this function in the ADD form, I did that and then I guess I just have to call it in the beginning initialization after InitializeComponent(). Please don't mind my ignorance but how do I call this Button Hander function. I am calling it using this.ButtonHandler() and it gives me an error saying no overload for method ButtonHandler takes 0 arguments.
Please help! I want to verify which button was clicked in the ADD form and not the MDI form where the buttons are. I.e. Once I am in the ADD FORM I want to check which button was clicked, Add, Modify or Delete. If mdiform.add was clicked then do something else do something else.
sasa
-- modified at 19:37 Sunday 18th June, 2006
|
|
|
|
|
There seems to be some confusions in your code.
SASA_1 wrote: I am assuming I create this function in the ADD form,...
Not exactly. What I created in the previous post is an event handler(delegate). When a button on the MDI form is clicked, the event will be handled in the MDI form, not the ADD form. Thus, the event handler has to be defined by the MDI form class.
That being said, from within the event handler, the MDI form still can call into the ADD form any proper way you want. For example, in the event handler, you may define a button type parameter and pass it to the callback function of the ADD form. Then, the ADD form may take different action based on which button is clicked.
Hope this helps.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Thanks Jun Du for your help. I just decided to recreate another form for modify and delete. That was an easier approach on my side.
sasa
|
|
|
|