|
I use Visual basic alot, but on my home PC I only have Visual C# and Is there a way to convert a form from Visual Basic 2003 to Visual C# 2003...
In the end we're all just the same
|
|
|
|
|
There are a number of converters which will do this.
Here's a short list, including ours:
www.tangiblesoftwaresolutions.com (ours - has a free demo)
www.vbconversions.com
www.elegancetech.com
www.carlosag.net (the best on-line converter)
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
Hello,
I dynamically create the largeicon immagelist. When I do a drag & drop, I lost the image, the listview only shows the text, but when I save the imagelist in files (.jpg), I have the rigth bitmap. So, the images of imagelist are rigth but the listview do not display them. I use the DragNDrop project : http://www.codeproject.com/cs/miscctrl/DragAndDropListView.asp
Freg
|
|
|
|
|
I have a splash screen... I WANT users to see it first. But the program loads so fast you cannot see it. Here is what I want
I want to add a progress bar to it and using a timer, make it go up 10 every 2 seconds until it hits 100 and then close splash screen and load form.. How would you do that?
Second how would you get a timer to work so after a preset time an action happens?
Eg: Click a button and after 10 seconds it shutdowns the application...
In the end we're all just the same
|
|
|
|
|
Here you have a form that does what you do, you just have to implement your progressbar
<br />
public partial class Form2 : Form<br />
{<br />
Timer t = new Timer();<br />
int timePassed;<br />
<br />
public Form2()<br />
{<br />
InitializeComponent();<br />
t.Tick += new EventHandler(t_Tick);
<br />
}<br />
<br />
void t_Tick(object sender, EventArgs e)<br />
{<br />
timePassed += t.Interval;
<br />
<br />
<br />
<br />
if (timePassed >= 10000)
{<br />
t.Stop();<br />
this.Close();
}<br />
}<br />
<br />
private void Form2_Load(object sender, EventArgs e)<br />
{<br />
t.Interval = 2000;
timePassed = 0;<br />
t.Start();<br />
}<br />
}<br />
-- modified at 4:45 Monday 20th February, 2006
|
|
|
|
|
Thanks. I will see how that goes...
In the end we're all just the same
|
|
|
|
|
I've insert in my form a button flat with 1px of border.
the problem is if i click over it the border become 3px width.
why?
|
|
|
|
|
Iam using Asp.net and c# for backend coding. i have to disable a textbox when a comboboxes value is not set at all, i mean ("--select--). when we happen to change that combbox value to some other values other than --select-i want the textbox to be enabled.
|
|
|
|
|
You can either write an procedure on onchange event of combobox or make autopostback attribute to true for combobox. And in the code behind file check the combobox value if its other then --select-- set textbox enabled
if (Convert.ToInt32(cmbModLev.SelectedItem.Value) != 0)
txtBox.Enabled =true;
else
txtBox.Enabled =false;
Share knowledge to enhance your learning
|
|
|
|
|
I have reqirements of defining prototypes for C++ dll function in C# so that I can use p/invoke method to access the dll's functions.
Can anyone please suggest how to write prototypes in C# for C++ functions like the ones given below:
1. __declspec(dllexport) char * __stdcall GetString(int maxChars, int waitTime, int delay = 50);
2. __declspec(dllexport) BOOL __stdcall GetControlData(DWORD commandType, BYTE* pInBuf, DWORD inSize, BYTE *pOutBuf, DWORD outSize, LPDWORD bytesReturned, LPOVERLAPPED pOverlapped);
3. __declspec(dllexport) DWORD * __stdcall GetStats(BOOL clear);
4. __declspec(dllexport) UNIT_TYPES* __stdcall GetUnitsInfo(void);
where UNIT_TYPES is a structure:
typedef struct
{
char *name;
int num_units;
int unit_list[10];
}UNIT_TYPES;
5. __declspec(dllexport) int __stdcall HandleCommand(CHANDLE han, int Id, const BYTE cmd, DWORD const responseType, const int txCount=0, BYTE const * pTxData=NULL, BYTE *pRxData=NULL, BYTE *pRxCount=NULL, DWORD retries=4, DWORD wait_ms=0);
6. __declspec(dllexport) void __stdcall HandleGetTimeouts(CHANDLE han, DWORD *normal, DWORD *download, DWORD *retries);
7. __declspec(dllexport) int __stdcall SendCommand(int Id, const BYTE cmd, DWORD const responseType, const int txCount=0, BYTE const * pTxData=NULL, BYTE *pRxData=NULL, BYTE *pRxCount=NULL, DWORD retries=4, DWORD wait_ms=0);
Regards,
Nataraj.
-- modified at 3:56 Monday 20th February, 2006
|
|
|
|
|
You are looking for DllImportAttribute.
I am not gonna implement this for you, but if you run into problems, someone will surely check your code.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
I am aware that I need to use DLLImportAttribute but when I need to write prototypes that need default parameters, return structure pointers etc, I am not aware of implementing those... can anyone please provide some inputs.
|
|
|
|
|
I want to control the system interrupts . How can I using c# ? Any links ?.
Thanks in advance
|
|
|
|
|
|
|
Only if you rewrite the Windows NT Kernel....
It's not going to happen in C# though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I take your advice as a chalenge. But i got it. You can do by directly coding to kernal. Give a pointer in the kernal32.dll to our code
|
|
|
|
|
No. You'll have to REPLACE the kernel with your own implementation.
Get out your C++ compiler. It's impossible to do in C#, or any other .NET Framework Managed language.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The further I look the more I see that is should use the property builder.
They say right click on the datagrid and select property builder.
I don't have this property builder or I don't see it.
I use studio.net 2003.
Have I a other version then them or is there another way to enter this property builder?
|
|
|
|
|
I have a problem
I'm busy writing a C#.NET project but walked into a problem.
I've got a Form With 3 Textboxes a Button and a DataGrid.
If i typ a value into the textboxes and i press the button. The datagrid Shows me the correct data.
the Selectcommand:
Select colom1, colum2, colom3, colom4, colom5
From Tabel1
Where (Colom1 = :param2)
and (Colom2 = :param3)
and (Colom3 = :param4)
But now i want it like This:
If i Typ a value for the first and last colom and nog the second one.
I still want him te show me the data he found.
If i do this now he says that he haven't got enough info to fill op my dataAdaptor.
Wich is logic.
But i realy don't have a clue how to do this.. can you help me?
|
|
|
|
|
Start using if statements to check which parameters to use in your SELECT query.
something like:
StringBuilder sb = new StringBuilder();
sb.Append ("SELECT colom1, colum2, colom3, colom4, colom5 FROM Tabel1 ");
sb.Append ("WHERE ");
if (param2 != string.Empty)
sb.Append("(Colom1 = :param2)");
if (param3 != string.Empty)
sb.Append("(Colom2 = :param3)");
if (param4 != string.Empty)
sb.Append("(Colom3 = :param4)");
or if this is in a stored procedure, make IF statements in your stored procedure.
|
|
|
|
|
how t create server.exe.config file while creating simple chat application using remoting in c#.net
Karunas
|
|
|
|
|
Hi everyone,
can we load an external exe into a .net windows form.Say for example can we load adobe photoshop into a panel designated for it in a form.Please give your suggestions in this problem.Thanks in advance.
|
|
|
|
|
yes you can so far I know in ASP.net application quite not sure about windows form. In ASP.Net you can add reference to adobe from project reference tab and in .NET tab select adobe and add it to the project. This is way we can use external application in our .net application.
Share knowledge to enhance your learning
|
|
|
|
|
Hi Neel,
As far as i know we can add reference of only COM components or dlls.I wish, iam wrong.I have not tried with ASP.net.But are u quite sure about it.I dont mind the language .I am even ready to try java or any other language for this purpose.Please make me more clear...
Thanks
|
|
|
|