|
I want my add-in to know the breakpoint when user add it.
Dilly
|
|
|
|
|
So far, to my opinion, I can not do this in.net2003 and 2005.
|
|
|
|
|
i was working on images a couple of days ago and found that for pointers we use unsafe blocks....the question is that why do we say that unsafe code is faster than ordinary getpixel method code...
haseeb
|
|
|
|
|
You dont have all the runtime checks in unsafe blocks. Its a lot faster, but also a lot more dangerous to use.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I have a problem using a datagrid.
I have 2 forms. 1 with a data grid and one textbox (for test use)
and the second form has a couple of textboxes.
now i use a CustomRowEventArgs to select the row.
In form 1 this works..
I can even read The first collumn in the Textbox (for test use)
I also let him open the second form.
but there it does nothing.
If needed I can past the code or pieces of the code here.
I really need some help..
|
|
|
|
|
Sorry, but i didn't get what are u trying to do?
can u explain in detail and paste some code
Regards,
Pramod
|
|
|
|
|
The second form should be showing all the info that's clicked on the row of the datagrid on the first form
.
but in checkboxes.
my code:
it's looks kinna messy but i only post the important pieces here.
Form 1
<br />
public delegate void CustomRowHandler(object sender, CustomRowEventArgs e);<br />
<br />
public static event CustomRowHandler CustomRow;<br />
<br />
InitializeComponent();<br />
barryOracleDataAdapter1.Fill(barry11.Barry);<br />
CustomRow += new CustomRowHandler(customHandler_CustomRow);<br />
<br />
<br />
private void customHandler_CustomRow(object sender, WindowsApplication30.CustomRowEventArgs e)<br />
{<br />
Barry1 DSet = e.DSet;<br />
DataGrid grid = e.Grid;<br />
int row = e.Row;<br />
<br />
<br />
textBox2.Text = e.DSet.Tables[0].Rows[e.Row]["lastname"].ToString();<br />
<br />
<br />
public void dataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
<br />
int rowIndex = dataGrid.CurrentRowIndex;<br />
if (CustomRow != null)<br />
{<br />
<br />
<br />
<br />
CustomRow(this, new CustomRowEventArgs(barry11,dataGrid, rowIndex));<br />
DataForm1 frm = new DataForm1 (barry11,dataGrid, dataGrid.CurrentRowIndex);<br />
frm.Show();<br />
<br />
}<br />
}<br />
<br />
public class CustomRowEventArgs : EventArgs<br />
{<br />
<br />
Barry1 barry11;<br />
DataGrid grid;<br />
int row;<br />
<br />
public CustomRowEventArgs(Barry1 DSet,DataGrid Grid,int Row)<br />
{<br />
<br />
barry11 = DSet;<br />
grid = Grid;<br />
row = Row;<br />
<br />
}<br />
public Barry1 DSet<br />
{<br />
get { return barry11; }<br />
}<br />
public DataGrid Grid<br />
{<br />
get { return grid; }<br />
}<br />
public int Row<br />
{<br />
get { return row; }<br />
}<br />
}<br />
---------------------------------------------------------------------------
Form 2
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
InitializeComponent();<br />
Form1.CustomRow += new<br />
WindowsApplication30.CustomRowHandler(customHandler_CustomRow);<br />
<br />
<br />
private void customHandler_CustomRow(object sender, WindowsApplication30.CustomRowEventArgs e)<br />
{<br />
<br />
<br />
Barry1 DSet = e.DSet;<br />
DataGrid grid = e.Grid;<br />
int row = e.Row;<br />
<br />
editLASTNAME.Text = e.DSet.Tables[0].Rows[e.Row]["Firstname"].ToString();<br />
<br />
}<br />
|
|
|
|
|
just change the following statement
DataForm1 frm = new DataForm1 (barry11,dataGrid, dataGrid.CurrentRowIndex);
with
DataForm1 frm = new DataForm1 (barry11,dataGrid, rowIndex);
Hope that solves ur problem
Regards,
Pramod
|
|
|
|
|
Too bad.. I've tried that but the problem remains.
|
|
|
|
|
does anyone else have some solution or information?
|
|
|
|
|
I suggest you skip the event handling i the second form. I really can't see the purpose of it. But, perhaps I get it wrong.
Just assign the values to the textbox in the second form. You've got all the information you need through the constructor.
Like this:
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
InitializeComponent();<br />
PopulateTextBoxes(barry11, dataGrid, rowIndex);<br />
<br />
private void PopulateTextBoxes(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
editLASTNAME.Text = barry11.Tables[0].Rows[rowIndex]["Firstname"].ToString();<br />
}<br />
|
|
|
|
|
Dude you really are great
It works at once.
I would like to thank you 1000 time but hope you agree with one big Thanks.
Thank you so verry much you really are awesome.
|
|
|
|
|
You're welcome!
|
|
|
|
|
Oh just one thing:P
now I have this datagrid and a detail form.
now i adjust my button. i want a previos button on my second form..
code on form1:
this is on my mouse up event of my datagrid
-------------------------------------
<br />
DataForm1 tmpForm = new DataForm1 (barry11,dataGrid, rowIndex);<br />
tmpForm.Location = this.Location;<br />
tmpForm.Show();<br />
this.Hide();<br />
---------------------------------------------
DataForm1:
<br />
private System.Windows.Forms.Form _previousForm;<br />
and then comes this.. thinks this is a really bad way to do it:P
<br />
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
<br />
InitializeComponent();<br />
PopulateTextBoxes(barry11, dataGrid, rowIndex);<br />
}<br />
<br />
public DataForm1(System.Windows.Forms.Form tmpForm)<br />
{<br />
InitializeComponent();<br />
_previousForm = tmpForm;<br />
<br />
}<br />
think this should be done other than this.. but i don't know how
last peace of code
<br />
private void btnbutton1_Click(object sender, System.EventArgs e)<br />
{<br />
_previousForm.Location = this.Location;<br />
_previousForm.Show();<br />
<br />
this.Close();<br />
}<br />
|
|
|
|
|
I really see no need to hide the first form. I would do like this instead...
<br />
DataForm1 tmpForm = new DataForm1 (barry11,dataGrid, rowIndex);<br />
tmpForm.ShowDialog();<br />
...and skip all the code to restore the first form in DataForm1.
|
|
|
|
|
but i really want to hide the first form:P
|
|
|
|
|
Hello All,
I am working on VS.NET 2005 and using datagridview control provided by it.
I need to make a column just like if you see the datagridview property 'Columns' it has some text and a (...) button such that when you click on (...) button it opens a lookup form on which you can define your own columns.
Please help me it is urgent
Regards
Mubashir
|
|
|
|
|
Hi i am having a problem in following code, in this code i am trying
to start a splash screen then do some work (here i m just sleeping the
thread), then close splash and start second form. problem is that when
first form closes, focus drops to anything under it, Visual Studios if
i m debugging or explorer when running exe. how can i get focus to my
second form.
static void Main()
{
frm = new Form2();
Thread splashThread = new Thread(new ThreadStart(startThread));
splashThread.Start();
Thread.Sleep(2000);//For checking
frm.Close();
Application.Run(new Form1());
}
public static void startThread()
{
Application.Run(frm);
}
|
|
|
|
|
the call is not made correct.
call the splash screen in the Form1 in the page load
and call the form1 in the above code.
that should solve your problem
Regards.
Sudhakar D P
|
|
|
|
|
thanx man it solves the problem.
|
|
|
|
|
.
.
.
frm.Close();
Form1.Focus();
Application.Run(new Form1());
.
.
.
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
I downloaded the program BlogWebCam-cs given on this website to have a webcam stream into my GUI. I had to cut and paste of course to work with my code and it compiles without errors. When I first started the program it gave the message can not find WIA camera came up. Now when I run the program I get nothing out of the panel that should display the streaming web cam. Any info on this would be greatly appreciated!
-Jared
|
|
|
|
|
i am using list controll and every thing is right before i shift columns but when i try to shift any column of this list ctrl then hides the scroll bar.
can any body told me what i have to do for showing scroll bar allways not hides any time.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
hi,
Please specify wich List are you referring to a list View or a ListBox...
this.listBox1.ScrollAlwaysVisible = true;
this.listView1.Scrollable = true;
And if you can give more details...
|
|
|
|
|
i am using list view but there is no such method or variable .
Bankey Khandelwal
Software Engineer
|
|
|
|