|
datagrid1.Select(50);<br />
datagrid1.CurrentRowIndex=50;
Here i used 50 to denote the grid row number or index.
Insted of that 50 , use your variable or value to fix the location of the datarow in your datagrid.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I've a picturebox i want to drag, but if i do it i would make the effect of moved icon that is my picturebox became transparent since to i release (drop) it, how can i do?
Thanks.
|
|
|
|
|
Hi all,
Can I add a checkbox control in a Datagrid control in .NET compact framework for pocket pc ?
Thanks
|
|
|
|
|
Hello,
Now I develop a tool using Datagrid.
When I mouse down a cell, I'd like to select a line included it.
For example, There is a header of row on Datagrid. If we mouse down it,
the line is selected. I'd like to do it without a header of row.
If you have some ideas, please tell me.
regards,
yu-yu
|
|
|
|
|
I have developed a sink using microsoft sample code for exchange store events but nothing happens when i try to debug my C++ code for the com object. I attach my visual C++ debuger to the processes inetinfo.exe and then to store.exe but appearenlty the com object is not being created when i send a message to admistrator through outlook web access. I my running Exchange 2003.
Anything special needs to be done?
Thanks
In Advance
|
|
|
|
|
i have a couple of questions, i hope you can help me with this:
1.is it possible to convert a visual c++ application into a vb.net application?
2.is it possible to convert a visual c++ application into a c# application, then convert the c# application into a vb.net application?
or just to be able to use the c# or visual c++ application in vb. net?
thank you for your replies
|
|
|
|
|
jedskie_a wrote:
or just to be able to use the c# or visual c++ application in vb. net?
answer to 1 and 2 is no. C+ simply has too rich a library to convert to simpler langauges like VB.NET, or even C#.
The answer at the end is yes. VB has always stood on the shoulders of C++. You can call any C# dll from VB.NET, and any C++ COM dll from C# and VB.NET. You can also compiled managed C++ ( pretend C++ ), which you can call directly.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
ah... ok.. thanks.. but will it run just the same as just it was in visual c++ when it is already in a vb.net environment?
|
|
|
|
|
Of course. Why would where it was called from change the code ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
How to delete or Remove Item with image from ListView in C#?
I am creating a ListView and setting a LargeImageItem. I am adding each item of string and index of the image. I also adding image to LargeImageList. Here is the code snippet in C#.NET
ListView lstView = null;
String fileName;
int index = 0;
private void addImage(filename, index){
lstView.Items.Add(fileName, index);
lstView.LargeImageList.Images.Add(Image.FromFile(fileName));
...
}
Now I want to remove item from the ListView. Here is sample code.
private void removeImage(index){
lstView.LargeImageList.Images[index].Dispose(); -----line 1
lstView.LargeImageList.Images.RemoveAt(index); -----line 2
lstView.Items[index].Remove(); --line 3
//lstView.Items.RemoveAt(index); --line 4
lstView.Invalidate();
...
}
If I use line 1,2,3 then if I try to delete 3rd image out of 5 image item in the list then it deletes 3rd image also deletes last image. If I use only line 3 or 4 then while deleting it works fine but if I add another image then it keeps the old image list pattern no matter which image I add.
Does anyone come across this problem? If anyone knows better idea, How to delete ListView item with image associated? And also able to add item after wards.
Hope it is interesting problem.
Thanks in advance
- Sudhakar
|
|
|
|
|
i've created a class having as private member a picturebox and a label.
I use this new object created in my application:
public class myObj
{
public Label mLabel = new Label();
public PictureBox mPictureBox = new PictureBox();
public myObj(Points myPoint)
{
....
myObj mObj = new myObj(lPoints); // set x, y of this new object
now i want add this to my form ( by this.controls.add(...) ) but i can't because it is not a control, how can i do?
|
|
|
|
|
You can't add it to the controls collection because your class doesn't inherit from Control. Since your just encapsulating normal Windows Forms controls, rewrite your class inheriting from UserControl. THen you'll be able to add it to the Controls collection.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am used to VB.NET so this might be something stupid, but I can't seem to find a way to add System.Collection in C#.net after right clicking the references folder and selecting "add reference". I am trying to use a hash table but need the reference.
Thanks for the help
|
|
|
|
|
I believe it's there already, have you tried to just use it ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hmm, maybe I should try Ya I did try silly. For some reason on my home machine it is readily available. On the other machine it threw an error saying that it had to be referenced, but it was no where in the reference library.
|
|
|
|
|
According to MSDN, it's in Assembly: Mscorlib (in Mscorlib.dll).
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Does anybody have sample code for using SSH/Telnet with the Sockets class (without purchasing a control)?
|
|
|
|
|
ok ... i am trying to create Custom Control (which later can be added to VS.NET tool box and added to any windows form). This custom control contains a data-grid. I want to implement the following functionality :
when user resizes this custom control he/she should be able to see control (i.e., data grid) resizing, like in the case of typical/intrinsic controls (text box). when we resize them ... we can see them their size changes.
second thing i want to do is that : as soon as this control is added to a windows form, a wizard is launched which allows customization.
i don't know how to implement this behavior... and where should i start?
any suggestions
|
|
|
|
|
How can i detect if a user has double-clicked the caption bar of a form (which normally causes the window to maximize)?
And is there a way to add icons in the upper left corner (left from the quit, maximize and minimize boxes)?
|
|
|
|
|
Okay I found the answer for my first question.
|
|
|
|
|
|
|
I used the WM_NCLBUTTONDBLCLK Event
|
|
|
|
|
In this way i create a class inherited from PictureBox, but if i want that it inherit also from Label class what i have to write?
public class MyClass : PictureBox
{
...
|
|
|
|
|