|
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
|
|
|
|
|
Hi all, having a little problem.
I started a new solution, where I've created 2 projects. I've set the solution to use single project startup and set the entry point within that project.
My second project only consists of classes, and therefore has no enty point.
The error I get is that there is no entry point for the second project.
I know it is just something small that I'm missing but just can't seem to figure it out.
Thanks in advance
|
|
|
|
|
Ensure that the output type of your second project is "Class Library". This setting can be found in the properties of the project.
www.troschuetz.de
|
|
|
|
|
Thanx a mil.
It was set to console output.
Knew it had to be something stupid.
|
|
|
|
|
Hi,
How To change a user's group or account type in c# (or command line)?
|
|
|
|
|
hi all,
I need to hide Windows console Application.
How Can I do it?
Main Method is Like this:-
[STAThread]
static void Main(string[] args)
{
CTService lobjFareReference=new CTService();
try
{
lobjFareReference.ExecuteProcess();
}
catch(Exception exception)
{
System.Diagnostics.Debug.Write(exception);
throw;
}
}
When I execute Main, A Black DOS Screen PopUp .Now I need to hide that screen..
How can I do it?
thanks in Advance..
|
|
|
|
|
Change your console app's Output Type (in the Application tab in Project Properties) to "Windows Application". Since you used the Console Application template when you created your project, it will still be a non-GUI app, but since you set the Output Type to Windows Application, no console window will be shown.
|
|
|
|