|
hi
what's AED buttons .
and please explaine more .
My goal is to delete a newly row added , when pressing ESC .like a DataGridView when the property AllowUserToAddRows is set to True and ,I Add items to the DGV manually, so if focous on the last row and press ESC the row will be deleted but If the focous on another row the row will not deleted
.But the difference is that I want to add items to DGV not manually but programmatically
thanks
|
|
|
|
|
AED = Add Edit Delete
I think your goal is wrong, I think your entire strategy for handling AED is wrong. I do not allow editing in a list control and gave you the strategy I use to avoid that.
|
|
|
|
|
Hi, I'm wondering how to compile entire solution in one exe without any other dll files. There are a few possibilities:
1. Copy all files from dll projects into exe project (yah).
2. Compile all normally with dlls and use ILMerge (doesn't support NET frameworks higher than 2.0) or some shareware software to make it one exe (also you can use Thinstall) quite expensive...
3. Use resources, but managing is very annoying.
but... Is there any possibility to add an external existing dll project (my project) and compile it with other windows forms application (exe) and get only one exe file without dll files? Copying files from dll project is not desirable, because I want to have a possibility to modify dll and get those files synchronized...
Any suggestions?
|
|
|
|
|
No, if you want the code from the dlls, you need to copy it into your project.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Actually we create multiple projects and compile as dlls because if we need to change in any Business Logic we dont have to modify the presentation layer or any other layer.
If you want everything inside a single exe, then why do you need to create project. You can easily manage source using Hierarchy of folders, each of which will belong to a namespace.
I dont find any reason why you have to create a new project only to manage source codes....
AFAIK, only ILMerge is the process that can merge 2 dlls into single one. You cant have one exe output when you have more than one project using Visual Studio.
|
|
|
|
|
I think he may be having an issue with 3rd party DLLs, I know of no way to include these in an exe.
|
|
|
|
|
Yeah, I would guess you are right.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hello,
please help me,
actually I have 3 questions:
1. how can I know programatically when a click has occured on the desktop? (or another application, other than mine).
2. how can I perform a click or move the mouse programatically or perform keyboard clicks etc.
3. how do programs like team viewer send the image of the desktop so efficiently?
I know they somehow capture only the changes in the client's screen. do they read the changes made in every pixel and send only those?
or is there something else?
if this is the case, how can I read the information in each pixel on the screen?
Thanks alot in advanced!
-Ben
|
|
|
|
|
asizo wrote: how can I know programatically when a click has occured on the desktop? (or another application, other than mine).
This might help in Getting mouse click outside your application:
Processing Global Mouse and Keyboard Hooks in C#[^]
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Hiii,
I have a form which contains two dynamic rows in which 1st row contains 2 lebels , 2 text boxes and 2 Buttons namely ADD & REMOVE . now i want to add and delete the dynamicaly created rows Onclicking the perticular ADD and DELETE button that dynamic row shuld b created or deleted .
|
|
|
|
|
Sounds easy enough. What have you tried ? This is not a web project, right ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have tried the following code....
private void GenerateTable1()
{
Table table = new Table();
table.ID = "Table1";
Page.Form.Controls.Add(table);
const int colsCount = 6;
TableRow row = new TableRow();
for (int j = 0; j < colsCount; j++)
{
TableCell cell = new TableCell();
if (j == 0 || j == 2)
{
Label lbl = new Label();
//lbl.ID = "LabelRow_" + 0 + "Col_" + j;
if (j == 0)
{
lbl.Text = "Acc No";
}
else
{
lbl.Text = "Vol";
}
cell.Controls.Add(lbl);
row.Cells.Add(cell);
}
else if (j == 1 || j == 3)
{
TextBox tb = new TextBox();
//tb.ID = "TextBoxRow_" + i + "Col_" + j;
cell.Controls.Add(tb);
row.Cells.Add(cell);
}
else if (j == 4)
{
Button btn = new Button();
btn.Text = "Add";
//btn.Attributes.Add("onclick", "MyFunction()");
cell.Controls.Add(btn);
row.Cells.Add(cell);
//btn.Attributes.Add("onclick", "this.visible = 'false'");
//btn.Click += new EventHandler(this.Button1_Click1);
}
else
{
Button btn = new Button();
//btn.ID = "ButtonRow_" + i + "Col_" + j;
btn.Text = "Remov";
cell.Controls.Add(btn);
row.Cells.Add(cell);
}
}
table.Rows.Add(row);
}
=====================================================================
now I want that the dynamicaly created button ADD should add next row of same kind and dynamicaly created button REMOV should delete perticular row..
plz help me...
|
|
|
|
|
Hi,
I am unfortunately not familiar with single bits and have now the problem that I have to write single bit values in an integer value.
The bit masks look like:
Value# Bit Mask
1 2-0 00000007H
2 5-3 00000038H
3 8-6 000001C0H
4 15-9 0000FE00H
5 22-16 007F0000H
6 29-23 3F800000H
Bit 30-32 are unused.
Does anyone know how can I set these six values - maybe as short example?
Many thanks! Daniel.
|
|
|
|
|
You mean like this?
int x = 0;
x |= 7;
x |= 0x3F800000;
x ^= 0x38;
x &= ~7;
|
|
|
|
|
thank u harold!
but sorry, i can not understand your solution because you use always 'x' as variable and overwrites therefore all previous values.
can you give me more details?
so far, i can read the values i.e.:
int[] fieldvalue = new int[6];
fieldvalue(0) = (67637321 & 0x7) >> 0;
fieldvalue(1) = (67637321 & 0x38) >> 3;
fieldvalue(2) = (67637321 & 0x1c0) >> 6;
fieldvalue(3) = (67637321 & 0xfe00) >> 9;
fieldvalue(4) = (67637321 & 0x7f0000) >> 16;
fieldvalue(5) = (67637321 & 0x3f800000) >> 23;
so the first three values are set to 1 and the last three to 8.
how can i now set the second value i.e. to 2? or in other words: how do i get the int value 67637321 if i have as first three value 1 and as last three 8?
many thanks!
|
|
|
|
|
int value = fieldvalue[0] | (fieldvalue[1] << 3) | (fieldvalue[2] << 6) etc
Just shift the bits back to their original position, and OR them together.
|
|
|
|
|
thanks a lot! thats exactly what i need!
i looked for it so long and its great to get so quick an answer here.
modified on Sunday, September 6, 2009 6:34 PM
|
|
|
|
|
Hi,
here are some elementary operations:
1.
bitnumber to bitmask: mask=1<<number;
inverse mask:="" inversemask="~mask;
2.
bitnumbers" to="" bitsmask:="" mask="(1<<(numberHi+1))-(1<<numberLo);" example:="" 2="" and="" 0="" yield="" 7
3.
hex="" output:="" string="" s="number.ToString("X8");
4.
extract" bit="" from="" number:
bool="" bitisset="(value" &="" mask)!="0;
5.
extract" bitfield="" number:
int="" fieldvalue="(value" mask)="">>bitnumLo;
6.
replace bit in number:
mask=1<<bitnum;
notmask=~mask;
value=value¬mask;
if (newbitset)="" value|="mask;
7.
replace" bit="" field="" in="" number:
mask="(1<<(bitnumHi+1))-(1<<bitnumLo);
notmask=~mask;
value=(value¬mask)" |="" (newfieldvalue<<bitnumlo);
btw:="" using="" more="" parentheses="" than="" strictly="" necessary="" to="" keep="" expressions="" unambiguous="" for="" human="" reading.
=""
<div="" class="ForumSig">Luc Pattyn
|
|
|
|
|
i have create rdlc report in c#
---------
For example
my report contains textbox like and it's value is
=First(Fields!FirstName.Value)
data source have more then 100 student's(First Name) records.......but reportviewer display only one student's "FirstName"
modified on Sunday, September 6, 2009 12:38 PM
|
|
|
|
|
You paste the control into RDLC and hope it will replicate automatically.
Place the textbox inside a List or Table . And also make its value as Field!FirstName.Value(just leavethe First() out of the value)
You are done.,. .
|
|
|
|
|
Hi Abhishek Sur
Thankz
now it is working
|
|
|
|
|
Hi All,
I have a c# winforms application.
I want to give the relogin feature with a full logout and
relogin again.
so I need to start a process after I close the current process.
Today I implement this code:
<br />
Process process = Process.GetCurrentProcess();<br />
<br />
process.Close();<br />
<br />
Process reloginProcess = new Process();<br />
<br />
reloginProcess.StartInfo.Arguments = string.Format("{0} {1}", _userName, _password);<br />
<br />
reloginProcess.StartInfo.FileName = AppDomain.CurrentDomain.BaseDirectory + @"g2gg2.exe";<br />
<br />
reloginProcess.Start();<br />
<br />
In some stations(all win xp) I get exception, I think its because the first process fail to close.
Do you have a better way to start the second process (File + Arguments )
Thanks!!!
Ronen
|
|
|
|
|
I think it would be a good idea if you read up on what a process is. And then changed your plan somewhat.
Member 3722261 wrote: Process process = Process.GetCurrentProcess();
process.Close();
Process reloginProcess = new Process();
Doesn't this strike you as at all unlikely to work?
What happens when you stop the current process?
What should execute any further instruction when the process which is executing the instructions is no longer running?
Please, do not go near any buttons marked "Do not, under any circumstances, and I mean any circumstances, press this button. I mean it. The world will end if this button is pressed. So don't press this button." - you strike me as the kind of person who views that as a challenge...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Thanks! or something...
So what is the best implementation to start a new process at the
end of the current one?
Thanks again.
Ronen
|
|
|
|
|
Member 3722261 wrote: what is the best implementation to start a new process at the end of the current one?
Did you find out what a process is?
What happens when you stop the current process?
I'll give you a hint: In the previous question, replace "stop" with "saw off" and "current process" with "branch you are sitting on".
Re-think what you are trying to do. Stopping a process (particularly the current one) is not a solution to your problem, it is a whole new world of pain all of it's own. Think about what you are trying to achieve, and how you would do it in the real world - ignore computers. If you want to read a different book, you don't start by burning down the library to get rid of the previous one, do you?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|