|
There are no mouse messages for that. They are normal, non-input based, window messages. See WM_PASTE[^], WM_CUT[^], and WM_COPY[^].
You'll have to use either the WM_CALLWNDPROC hook or the WH_GETMESSAGE hook to capture these messages. I don't know which because I've never used them myself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello All,
Iwant to add pushbutton on in column of data grid in c#. how can i add that. Can anyone help me reagarding this.
Thanks in advance
Santosh.
|
|
|
|
|
Hi there!
Right click on your datagrid on your designer then click property builder. Click on the columns tab you'l see there what buttons to add and whether its a link button or push button.
Hope that helps! Gudluck!
Kampai!!!
|
|
|
|
|
I want the "enter" key to function with my getcode() instead.When i type the code in the code column.pressing enter will display the whole row.
private void GetCode()
{
//MessageBox.Show(this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber,0].ToString());
if(this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber,0].ToString()!="")
{
this.m_iesd = IESDFAC.GetDataByCode(this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber,0].ToString());
this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber, 1] = m_iesd.desc.ToString();
this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber, 2] = m_iesd.remark.ToString();
this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber, 3] = m_iesd.tmu.ToString();
this.gDataGrid1[gDataGrid1.CurrentCell.RowNumber, 4] = m_iesd.position.ToString();
}
}
|
|
|
|
|
Hi Guys and Gals!!!
I need to show data in a column style, of which two columns are CheckBox-es.
Since ListView doesn't support more than one CheckBox, I've decided to use
a DataGrid for this task.
My problem is that I also need to disable some of the CheckBox-es. Sometimes,
even one of the two on the same row. I could not find a way to get access to
the CheckBox itself in the DataGridBoolColumn.
I did use one of the examples on this site in order to paint my own CheckBox,
so that when the cell is selected, a real CheckBox appears insted. But I do
have some difficulties with that like bad refresh when the DataSet is changed
of bad response to mouse event and so on and forth...
CAN ANYONE HELP ME WITH A WORKING CHECKBOX COLUNM ?!?!?!?!??!?!
Thank you all in advance,
Adam Crowe
|
|
|
|
|
|
I apologize for not mentioning this before, but my question regards to WinForms and not ASP.NET.
Thank you.
|
|
|
|
|
Is there a way to adjust the height of the rows in a listview? It seems that the function GetItemRect gets called when painting the control but it's not virtual so I can't override it. Will I have to do all the painting myself?
Thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Hi Folks,
I just was experimenting with customizing the MenuItem class to suit my needs. I have introduced an accessor method which handles an additional string variable in my inherited class called PJMenuItem.
PJMenuItem pjmi = new PJMenuItem();
pjmi.ExtraInfo = "c:\\temp\\";
pjmi.Text = "HelloWorld";
cm.MenuItems.Add(pjmi.Text,new System.EventHandler(LaunchAction));
Now the problem becomes that each time the menuitem gets invoked via the LaunchAction event handler an exception message gets thrown. Stating that the specified cast is invalid. The event handler is defined as
private void LaunchAction(object sender, System.EventArgs e)
{
try
{
PJMenuItem pjmi = (PJMenuItem) sender;
MessageBox.Show(pjmi.ExtraInfo.ToString());
}
catch(System.Exception ee)
{
MessageBox.Show(ee.ToString());
}
}
Can anyone please tell me how I can overcome this exception error ???
thanks
|
|
|
|
|
You're using the wrong overload of the Add method. Passing a string as the frst parameter causes a new MenuItem to be created for you, with the supplied text as the caption and the specified handler. You need to specify the handler in your PJMenuItem constructor (and pass it to the base class constructor) then used the version of the Add method that takes a reference to the menuitem.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
g'day Rob
Would it be possible for you to give me another example of your explanation as I am unable to follow through. The point I am having difficulty is with the part where you said i need to specify the event handler in the constructor and then passing it to the base class constructor.
I am refering to the following article on msdn about base class constructors:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfbasepg.asp
But I cant seem to draw a correlation between the msdn article and your explanation.
I would really appreciate it if you could give me another example.
thanks.
|
|
|
|
|
G'day again Rob,
I read your post again and again inconjunction with Uncle gate's article, I finally understood it. Thanks for helping me out.
|
|
|
|
|
How can I capture output from cmd? From executing some command in cmd like "tracert" or "ping"...
Thankss....
|
|
|
|
|
What do you use to execute the command?
---
b { font-weight: normal; }
|
|
|
|
|
Have a look at System.Diagnostics.Process.StartInfo.RedirectStandardOutput .
Matt Gerrans
|
|
|
|
|
thx a lot it's working very well
|
|
|
|
|
okay, here it is. i have this
as my opengl window, on load, and this image i need to draw fullscreen. basically the code looks like this:
this.ClientSize = new System.Drawing.Size(640, 480);,
GL.glVertex3f(0f,0f,0f);
GL.glVertex3f(640f,0f,0f);
GL.glVertex3f(640f,480f,0f);
GL.glVertex3f(0f,480f,0f);, and
GL.glOrtho(0,640,0,480,0,1);. as previously stated, i want the image to be drawn in the exact amount of pixels that it came with. in case pointers arent enough and a whole source fix is needed, the source for tyhe entire program can be found here. thanks for your time
|
|
|
|
|
//Label x axis. Trying to label graph axes on a WinForm
Font graphFont = new Font("Arial",8);
Brush graphBrush = new SolidBrush(Color.BlueViolet);
float x = 0.0f;
String xString = x.ToString();
for(float gx = xIndent; gx <= graphRect.Width; gx += gx)
{
g.DrawString(xString, graphFont, graphBrush, this.ClientRectangle.Left + xIndent, yOrigin + 4);
}
//THANKS FOR ANY HELP.....
|
|
|
|
|
see reply below. No need to repost...
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Rob,
EXACTLY what my App needed.Didn't even know there was such a thing as
"current culture". Many thanks.....
|
|
|
|
|
If you ever intend to write applications that might be used outside your country, you should read up on the CultureInfo[^]and System.Globalization [^] Name space. Most of the string formatting and comparison functions in .NET have overloads that expect culture specific parameters, and it is generally recommended that you use these to get predicatable results in all languages.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
how do i make my file system watcher watch my dir and all it subdir to i have to create a file system watcher for each sub dir too.
Thanks
chad
|
|
|
|
|
if i understand what you want correctly
what about IncludeSubdirectories Property
indicating whether subdirectories within the specified path should be monitored
fileSystemWatcher.IncludeSubdirectories=true
MCAD
|
|
|
|
|
thank you so much i forgot about that property
chad
|
|
|
|
|
Hi!
Im using an arraylist bound to a datagrid to show some info. I also let the user delete rows from the datagrid using a contextmenu. IE rightclick on the row, choose "delete item", and the row disappears.
Everything works fine except when I delete the last row, then when I choose another row I get a "Index out of range exception".
this is my deletemethod:
private void DeleteItem(object sender, System.EventArgs e)
{
//get the index of the selected Item, same index in the ArrayList
int index = commentGrid.CurrentCell.RowNumber;
try
{
comments.Comments.RemoveAt(index);
if (comments.Comments.Count < 1)
{
menuItemExport.Enabled = false;
toolBar.Buttons[2].Enabled = false;
}
dataChanged = true;
commentGrid.DataSource = null;
commentGrid.Refresh();
commentGrid.DataSource = comments.Comments;
commentGrid.Refresh();
}
catch(ArgumentOutOfRangeException)
{
return;
}
}
I heard this was some kind of bug in .NET, but I dont know how to work around the problem! Any help is much appreciated.
thanks!
/Rickard
|
|
|
|