|
I used sharpdevelop and it works.
|
|
|
|
|
There are C# to VB converters (not online) that convert entire projects. Just google on "C# to VB converter".
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to C++/CLI Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Hi,
Thankyou both of you for help.
When I tried SharpDevelop and converted the project but when I open it in VB.NET it showed me 210 errors !! & the forms can't be loaded in designer mode !
And the http://www.tangiblesoftwaresolutions.com
convertor converts only first 1000 lines . As In my project there are over 2000 lines of code so it everytimes shows that "No Line Of Code Converted !"
What to do now ??
Thanks,
Dan
|
|
|
|
|
I'm trying to figure out why you would want to do convert the library into another language. Except for the syntax, CSharp and VB.Net have access to the same libraries. And are compiled down to the same thing.
As a C# developer the convertors have only been useful in letting me understand the VB language. In the end it was easier to leave things they way they were and create a new namespace.
|
|
|
|
|
Hi,
Yes , now I am understanding the real matter..
WhoisUrBuddy wrote: I'm trying to figure out why you would want to do convert the library into another language
It's working programme not a library & I want to run it in VB.NET so I was looking for such things..
WhoisUrBuddy wrote: In the end it was easier to leave things they way they were and create a new namespace.
Yes, Now I am planning to rewite the code so that I can learn VB and my work will be completed ...
Anyway , Thanks for help,
Dan
|
|
|
|
|
How does one change the color of a listview's header? Code please. Thanks
|
|
|
|
|
You need to draw the header yourself. This article[^] should get you started.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I have too many functions in one class, therefore, I want to know is it possible to seperate the functions into seperate files? So far, I only know one class is saved as one file ".cs".
|
|
|
|
|
|
You can have the same class split over multiple files (from .NET 2 on), by using the partial keyword. It doesn't matter what the filenames are (before the .cs that is), because the compiler will combine them together.
However, if you have too many functions then this would tend to indicate that there may be a problem with your design. You may be linking too many things together that really should be separated.
Anyway here's a quick example:
FirstFile.cs
public partial class MyClass
{
}
SecondFile.cs
public partial class MyClass
{
} Interestingly enough, you could create a member in FirstFile.cs and it would be available in SecondFile.cs. This behaviour is visible in the way that Visual Studio.Net breaks up form files.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
As a best practice it is advised to refractor functions that do similar things in different classes. That way you avoid having problem with too much code in the same .cs file. In my case I choose to have at most 400 lines of code in a class.
I am fighting against the Universe...
Reference-Rick Cook
|
|
|
|
|
I program for web application and just wanted to explore other side of the programming on win forms.
I am building a account/calculation program for practice. There I got to things which I would like to know.
1) I am using Lable Control to print the values of the ArrayList. What is the best place to print?
2) How I can provide the printing capability to the end program. Or on which control the print commond
to work.
3) In Web programming I could use the Validation control. What could be similar control in win form.
4) How to provide the "Save" capability to certain data. ???
This is my first post here on the code project if these are too many questions plz let me know.
Thanks
Learning aammi@yahoo.com
|
|
|
|
|
I wrote some Form and i show this Form by calling the method ShowDialog - with no parameter.
My problem is when i show this Form - i could not set Focus to him.
What to do ?
Thanks for the help.
|
|
|
|
|
Yanshof wrote: I wrote some Form and i show this Form by calling the method ShowDialog
You created a new form in a console application? Be more specific about your problem. If you created a windows application project with a form, displaying another form by calling the ShowDialog is enough to make it display because is it modal and the focus is by default set to the second form. If you have a console application displaying a modal form won't be enough to make it run until you close it, you have to call Application.Run(myform)
Do your best to be the best
|
|
|
|
|
Ok,
What i do is create the Form in some other C# file - and the other C# file is call by using Com from some C++ application.
|
|
|
|
|
I'm trying to create a schema.ini file to impport data from a csv file and have hit a snag.
According to this article - http://msdn2.microsoft.com/en-us/library/ms709353.aspx - the first line in the schema needs to be the file name.
My problem is that I get uniquely named files and have no idea what they will be untill I get them.
Is there a way to omit the first line in the schema or just specify the filename as *.csv ?
Thanks,
Nathan
|
|
|
|
|
digsy_ wrote: Is there a way to omit the first line in the schema or just specify the filename as *.csv ?
I've never used the Text driver, so....
As far as I can tell, no you can't remove this. You are probably going to have to write this file out with the name of the file you're importing for each and every file you import using this method.
The alternative is to write your own import implentation from scratch or try to find a third party CSV parser class. Search the articles here for "CSV" and you should find at least one.
|
|
|
|
|
hi it may b a newbi question but i hvnt got d answer
here is somethings i did
in form1 class
1 I have a statusbar in form1 class and statuslabel1 ,
2 i have made it public control .
3 I have created a public property StatusPanelText which sets the text of statuslabel1.Text= value
Now in IOFunctions class (this is another class where i hv IO related functions)
i have a function which searches the files in given DIR (dirinfo,fileinfo etc) and i want to display file names in the statuslabel1.text
in class i create a instalce of form1
form1 objForm1= new form1();
objForm1.StatusPanelText =filepath;
now this text shows in new form up if i say objform1.show();
but i want the existing form statusbar to change .....
any help ????
-- modified at 9:29 Tuesday 2nd October, 2007
Hej again ...
there is some stuff i need to mention i guess (after d responses)
1) my problem (according to me ) is as i create a new instance of form1 the changes happen in d object form1..so i want to get hold of existing Form1 object and controls...
2) I want this (update statusbartext) in other classess as well (DBrelatedclass,regutl etc) most of the classes are static as they contain only methods/functions.
after some search i think (?) singleton pattern is near to solution but i am not able to impliment it
hope new explanation adds value....
-- modified at 4:25 Thursday 11th October, 2007
|
|
|
|
|
pramarathe wrote: Now in IOFunctions class (this is another class where i hv IO related functions)
i have a function which searches the files in given DIR (dirinfo,fileinfo etc) and i want to display file names in the statuslabel1.text
in class i create a instalce of form1
form1 objForm1= new form1();
objForm1.StatusPanelText =filepath;
now this text shows in new form up if i say objform1.show();
but i want the existing form statusbar to change .....
Create a function in your form's class, call it UpdateStatusLabel(string filepath) or something.
When searching for the file in IOFunctions, send the filepath as an argument your Update function in your form's class. when the form calls the function it can update that control.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Well, you could store a reference to form1 in your IOFunctions class. Suppose that you have an implementation like this:
public class IOFunctions
{
private Form1 _form;
public IOFunctions(Form1 parent)
{
_form = parent;
}
public void DoSomething()
{
_form.StatusPanelText = "Hello";
}
} Alternatively, you could create an event in your IOFunctions class which you would respond to in the form class to display the message. This is all covered in Colin's excellent article[^] here. Well worth reading.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Another way of getting acces to the already opened form is to send to the second class, in the constructor (for example) the handle for the form that is opened. I'll give you just a small example:
<br />
public partial class Form1 : System.Windows.Forms.Form<br />
{<br />
...<br />
...<br />
IOFunctions io = new IOFunctions(this.Handle);<br />
...<br />
<br />
}<br />
<br />
public class IOFunctions<br />
{<br />
private Form mainForm = null;<br />
<br />
public IOFunctions(IntPtr handle)<br />
{<br />
mainForm = (Form)Control.FromHandle(handle);<br />
}<br />
<br />
}<br />
Do your best to be the best
|
|
|
|
|
guess solved the problem ... d singleton thing ...
let me know my approch is right or wrong ...
things i did ..
0.1 ) private static form1 oForm = null; //global variable 0.1 is coz i m lazy enf to change 1 to 2 n etc etc :P
1 ) created a instance method
public static form1 instance()
{
if (oForm1 == null)
{ oForm1=new form1();
}
return oForm1;
}
2 ) in form1 consturctor assigned oForm1 = this; // so i have the instance of current form
3 ) a exposed property which gets sets statusbarpaneltext
4) in my staic class created private variable f
FORM f= form1.instance() // its FORM and form1 resp .. no typo here ..
5) where ever i want to update statusbar now i write
f.statusbarpaneltext= dirInfo.fullpath.tostring(); //for eg ..
thats abt it ... if m missing some systax i can update it ... its working for me .. now only(?) thing is impliment a thread to see this
now m wating for comments on how m wrong n where ...plz ....
i talk to myself.....
|
|
|
|
|
Hy
I want to know how can I send a space with SendKey.Send?
thx
|
|
|
|
|
SendKeys.Send(Keys.Space);
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Doesn't work. The SendKey.Send receive a string parameter not a Keys
|
|
|
|