|
No, because I need to edit the first two columns (product code and quantity). I also thought about it, and I could create an edit control on top of the item, but off the top of my mind, I can't think about a property to get the rectangle of a column and row.
But it could work... any ideas?
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
|
No, that won't make it.
It does not return the rectangle of one of the columns... but wait, I have the column widht... maybe I can calculate it on my own.
Let me think about it, it could be a possible solution. But looking at the Xceed Grid control, it looks awesome!
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
I've been beta testing Xceed's new grid control; so far I haven't had any major problems with it.
Here is the site for the grid[^] and Xceed has a good deal on their Ultimate Suite[^], $350 nets you all of Xceed's products plus anything that comes out for a year.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
James T. Johnson wrote:
I've been beta testing Xceed's new grid control;
I just downloaded it... from the web page, it looks cool!
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
Ever thought about the .Net datagrid component? In .Net samples, the datagrid is always attached to an IDataSet, but heck you have a method allowing you to do : cell(x,y) = value.
And even turn a given cell in edit mode.
So what else do you need ?
Here is the link to the MSDN doc,
And I swallow a small raisin.
|
|
|
|
|
Yeah, I once took a look into it but it seemed to complicated for me, mainly because it has to be attached to an IDataSet as you said. But I will look into it again. Maybe I can build an in-memory dataset and get its data when the sale is about to be registered.
I'll take a look...
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
Read my post again Luis. I have never said a datagrid must be attached to a IDataSet,
And I swallow a small raisin.
|
|
|
|
|
I had that idea from the docs... I briefly tried using it the other day and it caused exceptions when I modified the data (I think, I don't quite well remember)
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
i was looking through the new file dialog on vs.net, and noticed a userconol class, so i onpened one, and found the base class was userControl, so i was wondering what the difference was, and if it was best to derive from Control or userControl.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
I think usercontrol provides extra designer support and acts like a form really (without borders), but i could be wrong...
From MSDN:
By extending ContainerControl, UserControl inherits all the standard positioning and mnemonic-handling code that is necessary in a user control.
AND...I was meant to say Form also extends ContainerControl. Thus the similarity
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Typically you use Control for controls made from scratch and you use UserControl to create composite controls (a control that contains other controls).
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Hi NG,
I've got a Class derived from component.
[Browsable(true)]
public Form Parent
{
get
set
{
this.parent = value;
this.parent.Load += new EventHandler(......
}
}
the desinger generates now this code if i drag my component on a form
void InitalizeComponents()
{<br />
mYCom = new MyComp();<br />
mYCom.Parent = this;<br />
}
Now the designer does not show any form derived from this form, the error is "Object is ....", there's only a white blank page.
Now if i remove the add eventhandler code in my set property, everything works fine.
How do i have to code this, i would like to set the parent of the component, attach a event.
.:Greets from Jerry Maguire:.
|
|
|
|
|
Try wrapping the addition of the event handler with a check to see if you are in design mode.
if( !DesignMode )<br />
this.parent.Load += new EventHandler(......);
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
The Problem is that this property is set while the Form is in InitializeComponent Method, now the Flag DesignMode is always false. It seems to be to early for this flag, i guess this flag is set after this Method is passed, in Form.Load Event we can use this flag.
.:Greets from Jerry Maguire:.
|
|
|
|
|
if i have hwndle (Intptr)of parent window and hwndle of child window then how to get the point and rectangle of child window with respect to its parent window ?
how to convert HWND into intptr?
r00d0034@yahoo.com
|
|
|
|
|
Question 1 :
In C++, that was,
POINT pt;
::ClientToScreen(hwndchild,pt);
::ScreenToClient(hwndparent,pt);
In C# it is,
Point pt;
Control.FromHandle(hWndchild).PointToScreen(pt);
Control.FromHandle(hWndparent).ScreenToClient(pt);
Question 2 : IntPtr hWnd = (IntPtr) h; // where h is a HWND
And I swallow a small raisin.
|
|
|
|
|
thanks for your help
i have one more problem and that is
please read that code and solve mine problem
tmpProcess = new Process();
tmpProcess.WaitForInputIdle();
tmpProcess.StartInfo.FileName="f:\\mirc59t";
try{
tmpProcess.Start();
while(! tmpProcess.Responding)System.Windows.Forms.Application.DoEvents();
}catch{}
tmpProcess.WaitForInputIdle();
IntPtr hWnd=tmpProcess.MainWindowHandle;
///////////////////////////////////////////////////////////
Control parent = Control.FromHandle(hWnd);
//////////////////////////////////////////////////////////
//Control parent = Control.FromChildHandle(hWnd);
if(parent!=null)
MessageBox.Show("parant not null");
/*foreach(Control child in parent.Controls)
{
IntPtr childHandle = child.Handle;
}*/
///////////////////////////////////////////////////////////
parent variable recive null that's why remaining code could not run.
it should not recive null because the process main window
contain two button and four Static members.
can any body tell why it recive null?
and what i have to do that it should not recive null?
i will be very thank full to u.
r00d0034@yahoo.com
|
|
|
|
|
Looks obvious to me, you are starting a process and assume that you get the handle of the main window of the attached process, first error, and then you assume you can get your hands on the main Form instance of a process, second error.
First error : do not assume a process has a window attached it. A process is anything like a .exe, and does not necessarily have a window attached. You must do something like if (!hWnd.Equals(IntPtr.zero)) { ... }
Second error : window handles can be manipulated by any process running on the OS, there is no security problem here because a window handle is nothing. But the instance of the control attached to it is something which lives in the address space of the process, something you don't have your hands on. You have to do some form of messaging (such like the typical WIN32 ::SendMessage, or the more .Net-like Windows.Messaging) to get it between your process, and the one you have started.
And I swallow a small raisin.
|
|
|
|
|
hi there,
subject says it all. i have a listview with LabelEdit set to True - so clicking a label when it is already selected lets the user edit the label's text within the listview.
now i want to start the labeledit-thing by a key (F2) - so i wrote a KeyUp-handler, made the usual switch (e.KeyCode) and now i'm stuck. how should i tell the listview that the user wants to edit the currently selected label? maybe i raise a BeginLabelEdit-event by hand, but how is that done? other ideas?
thx in advance.
:wq
|
|
|
|
|
i have a form app and i put a background image on my form. then set the TransparencyKey to white and select 'None' for FormBorderStyle in order to see a transparent view when app starts.
Everything seems Ok, But my problem is that i can't move my transparent form anywhere. What should i do to move my form without a border?
Any help will be appreciated...
Thanks,
Atilla Selem
just listening to you...
|
|
|
|
|
I am afraid you have to provide the same feature than the one from a standard full-fledged windows app : in the system menu in the caption, there is a "move" command for this purpose,
And I swallow a small raisin.
|
|
|
|
|
Alternatively, capture the MouseDown event when clicked on the whole surface of the form (a picture in your case), then capture the MouseMove event to relocate and finally the MouseUp event to set the new position.
Hope this helps
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
|
You know what, just as I finish my nice Winamp 2.xx Control class, they go and release Winamp 3 which works totally different other than that and the still uncompleted Download class, its still pretty much the same....
BUT, to solve the Winamp (sound really) , I have started working on a managed sound library wrapper for an existing multipurpose soundlib dll. It supports various sound formats including mp3, wav, mod, xm, s3m and CD and more! The existing soundlib is actually more orientated for game development (and includes 3D sound positioning as well as 3D listener positioning) than just a player, so it has many possibilities. In fact it is the same sound library used in EA's F1 2002 . It is based on the DirectSound interface.
At the moment it is about 80% complete and all the C++ is driving me nuts .
I will up it as soon as I'm done as it shows (well, according to me anyways) how to wrap an unmanaged dll in a managed assembly. My goal is though to implement it fully and not just what I need.
BTW, did u sort out your problem?
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|