|
|
Huh? That seems like the opposite of what I want to do. Update() forces a synchronous repaint, and I would want to do that less often than Invalidate().
|
|
|
|
|
Any one knows how to make the datagrid select the whole row when the mouse click on it? just like a list box.
Thanks.
eric feng
www.infospec.com
|
|
|
|
|
Override mouse events and select row AFTER calling base method.
public ... override ... OnMouse...(...)
{
base.OnMouse...(...);
this.Select(...)
}
Hi,
AW
|
|
|
|
|
this works, but when scroll the grid, the cell goes into edit mode.
eric feng
www.infospec.com
|
|
|
|
|
I have no this trouble - I use overridden column style. Try to override next events ... may be OnScroll() (save selected row numbers, call base method and restore selection I think). Next trouble is with sorting. Previous algorithm doesn't work .
Hi,
AW
|
|
|
|
|
Hi,
I experienced a strange problem - I am currently building an application that has a user control in it and for this control I want to trap the pressing of the ARROWS keys. BUT...
The problem is that only the OnKeyUp event occurs for THOSE KEYS - this is not what I
need
I tried overriding the ProcessKeyMessage method and found out that the control actually is not RECEIVING the WM_KEYDOWN message for the ARROW keys!
Any idea how to solve this problem?
Thanks,
Georgi
|
|
|
|
|
I dont understand, on my machine both the keyup and keydown
events are fired.
Bo Hunter
|
|
|
|
|
I had thesame trouble, try to check another methods containing "key" in their names. I override ProcessKeyPreview and ProcessDialogKey in similar case. Or use KeyUp() ...
Hi,
AW
|
|
|
|
|
All that you have to do is to override IsInputKey and then you'll be able to process key in OnKeyDown method
"...hasn't really been well accepted ... as the ratings tell us so far " - Nishant S
|
|
|
|
|
All that you have to do is to override IsInputKey and then you'll be able to process key in OnKeyDown method
"...hasn't really been well accepted ... as the ratings tell us so far " - Nishant S
|
|
|
|
|
I have this...
private void buttonOut_Click(object sender, System.EventArgs e)
{
int nOutNum;
int b=1;
int b2=1;
string baseBytes;
string basebyte1;
string baseCell;
string baseFULL;
string byteFile=this.textBoxFileName.Text;
try
{
for (b=1; b<=8; b++)
{
baseBytes="//Bytes";
basebyte1="/byte"+b2;
baseCell="/b"+b.ToString();
baseFULL=baseBytes+basebyte1+baseCell;
XmlDocument xmlDoc=new XmlDataDocument();
XmlNode bit;
string NUM;
xmlDoc.Load(byteFile);
bit=xmlDoc.SelectSingleNode(baseFULL);
NUM=bit.InnerText;
nOutNum=short.Parse(NUM, NumberStyles.AllowHexSpecifier);
NTPort.Outport(nAddress, (short)nOutNum);
this.listPorts.Items.Add((short)nOutNum);
if(b==8)
b2++;
if(b==8)
b=0;
}
MessageBox.Show("LOOP ENDED");
}
catch (System.NullReferenceException caught)
{
MessageBox.Show("End of "+byteFile);
this.listPorts.Items.Add("End of File");
}
catch (System.IO.FileNotFoundException caught)
{
MessageBox.Show("This file does not exist");
}
}
How can I make the timer wait 1 second before doing the loop over again?
/\ |_ E X E GG
|
|
|
|
|
If you want to put the process to sleep, use:
Thread.Sleep(Milliseconds);
Remember to inlude:
using System.Threading;
Rocky Moore <><
|
|
|
|
|
THAT'S IT!
thanks.
/\ |_ E X E GG
|
|
|
|
|
Hello Gurus,
How can I display a thin and long popup tooltip whenever the users move the mouse over any cell of a DataGrid? Also the popup tooltip displays the contents of the cell that the mouse is being on top of it.
Thanks a lot in advance
Khang;)
|
|
|
|
|
I was wondering if anyone knows how to play a video with windows media player in C#. i got the player loaded onto my form but i cann't figure out how to tell it what video to play. any ideals ? thanks kevin
|
|
|
|
|
SetURL to your video file name.
eric feng
www.infospec.com
|
|
|
|
|
What url? where at?
|
|
|
|
|
Player.AutoStart = true;
Player.URL = "c:\movie.avi";
eric feng
www.infospec.com
|
|
|
|
|
Do a bit search on www.microsoft.com, you will find a good tutorial about how to use it in VB.Net, you can use the same code in c#.
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
thanks that helped so much. what do you think i did before i posted this message? i searched for a good hour with out any luck on finding anything that made sense to me.
|
|
|
|
|
|
You need to check what version you are using becauce the commands changed completely between the two? If you have installed media player 9 it will over write the exiting componet the came with VS. Here is a sample of the older version which I think is the one that you have got!
private AxMediaPlayer.AxMediaPlayer VideoScreen;
VideoScreen = new AxMediaPlayer.AxMediaPlayer();
string FullPathAndFileName = @"C:\MyVideo.avi";
VideoScreen.FileName = FullPathAndFileName;
VideoScreen.Play();
Hope this helped
Leon v Wyk
|
|
|
|
|
just a quick question. With the StringBuilder class the individual chars are 'accessible through the Chars property'.
In C# are the two following equal then:
char c = myStringBuilder[x];
char c = myStringBuilder.Chars[x];
sorry if it's a stupid question, I'm just curious
|
|
|
|
|
Yes, the StringBuilder's indexers access the same array as the Chars property does.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|