|
Thanks for your reply. This should work.
|
|
|
|
|
I've the same issue, did you implemented the Algo to search a specific item on keys down, if so kindly guide me!!
Abdullah
|
|
|
|
|
Hi,
I am drawing a three sided polygon. I declared a ArrayList variable. On mousedown i am capturing points and adding the same to Arraylist variable.
After that i am drawing lines by reading points from the Arraylist variable.
while drawing the lines i am setting the lastline lastpoint to the nextline firstpoint.
My lastpoint and firstpoint will be same meaning when i am closing the polygon i am drawing line from the thirdpoint to fourthpoint(which is same as firstpoint).
I am trying to drag the secondpoint and thirdpoint. that works fine. but if i position the mouse on the firstpoint and if i tried to drag it is not stretching by combiningthe firstline and lastlines together instead only the firstline is getting dragged.
Can anyone help me.
Thanks in advance, Beginner
Beginner
-- modified at 9:53 Tuesday 20th September, 2005
|
|
|
|
|
What classes are you using exactly? CsGL?
|
|
|
|
|
I am using system.Drawing and System.Drawing.Drawing2D libraries.
Regards
|
|
|
|
|
Take a look at the System.Drawing.Drawing2D.GraphicsPath class. You can do something like this:
System.Drawing.Point pts[] = new Point[3];<br />
System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();<br />
<br />
gp.AddPolygon( pts );<br />
gp.CloseFigure();<br />
According to which points you select and drag, you would need to recompute the points in the pts[] array then regenerate the GraphicsPath.
I hope this helps.
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
|
I tried to to test code example to add control to a worksheet but when i try to run it i receive the message "Old format or Invalid Library". Where is the problem ???
I upgrade office from XP office and i install "Visual Studio tools fr office. The version of VS is 2003.
Giannis
|
|
|
|
|
Kalispera file Gianni,
when you said that you upgrade Office, what version, i had the same problem a wile ago and when i upgrade to Office 2003 the problem was solved.
hope that helps
Nassos
GanDad
|
|
|
|
|
Is this possible?
The default is a visible, but grayed out scrollbar.
There doesn't appear to be a way to define this behavior using properties, and the textbox.Lines.Length property returns the number of logical lines, not the number that are/would be displayed due to word wrapping.
|
|
|
|
|
Hello, I have this simple Paint method for my datagrid:
protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, CurrencyManager source, int rowNum, System.Drawing.Brush backBrush, System.Drawing.Brush foreBrush, bool alignToRight) <br />
{ <br />
DataRowView view = (DataRowView) source.Current;<br />
System.Drawing.Color myColour = Color.White;<br />
numberFormatInfo = new NumberFormatInfo();<br />
numberFormatInfo.CurrencySymbol = "$";<br />
numberFormatInfo.NumberDecimalDigits = 0;<br />
numberFormatInfo.CurrencyDecimalDigits = 0;<br />
numberFormatInfo.CurrencyNegativePattern = 1;<br />
<br />
string[] str = view.DataView.Table.Rows[rowNum]["IndentLevel"].ToString().Split('~');<br />
<br />
<br />
<br />
<br />
<br />
if (str.Length == 1) {<br />
myColour = Color.Coral;<br />
} else if (str.Length == 2) {<br />
if (str[1] == "1" || str[1] == "4") {<br />
myColour = Color.PaleGoldenrod;<br />
} else if (str[1] == "7") {<br />
myColour = Color.Lavender;<br />
} else {<br />
myColour = Color.Wheat;<br />
}<br />
} else if (str.Length == 3) {<br />
myColour = Color.SeaShell;<br />
} else {<br />
myColour = Color.Thistle;<br />
}<br />
<br />
try{ <br />
backBrush = new SolidBrush(myColour); <br />
} <br />
catch(Exception) {} <br />
finally {<br />
base.Paint(g, bounds, source, rowNum, backBrush, foreBrush, alignToRight); <br />
} <br />
}
So, the commented out portion couses the datagrid to flicker, if it is inserted in the code, and other controls like buttons, etc.. don't show up on the form, unless you move the form. If it's commented out, everything is working smooth and fine. Any ideas?
Thank you
|
|
|
|
|
I have a modal dialog box with AcceptButton & CancelButton
Is there a way to test if the dialog was closed with the user pressing 'Enter' as apposed to using the mouse to click either of the buttons or the control box?
MyDialog dlg = new MyDialog();
DialogResult rc = dlg.ShowDialog();
if(dlg.wasEnterPressed()) ...
The 'Click' event on the AcceptButton fires for both mouse & keypress.
I tried to look at the KeyDown event but that doesn't fire when 'Enter' is pressed.
|
|
|
|
|
As you have an AcceptButton, it appears that the Click event of the OK button precedes the KeyDown event for the Enter key and kills the dialog box before the KeyDown event fires. Try NOT declaring the AcceptButton and then see whether the KeyDown event fires for the Enter key.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|
|
Thanks.
The solution I went with was to add:
protected override bool ProcessCmdKey(ref System.Windows.Forms.Message m, Keys k)
{
if(k == Keys.Enter)
bEnterPressed = true;
return false;
}
|
|
|
|
|
Hi,
my team is trying to develope an capture tool in c#.Net. It should have follwing fuctionalities......
1) can capture From dv-avi (camcoder) to MPEG2 directly
2)while capturing the date and time information (which was in raw format ) is lost. We want that information to persist in MPEG2 format
can u pls help or guide me to do this..coz i m very new to C#.Net programing...
|
|
|
|
|
I need a Cyclic Visual for a form I am developing. A cyclic is the control in a helicopter that the pilot usings to steer the aircraft. What I need is an overhead view of the position of the cylic. I.e. a circle with maybe a dot or something indicating its position. Any help would be much appreciated. Thanks
D
D
|
|
|
|
|
I don't you'll find one for this specialized of a purpose. You'll have to write your own control to do this.
|
|
|
|
|
I don't think you'll find one for this specialized of a purpose. You'll have to write your own control to do this.
|
|
|
|
|
Hi,
I have a project in which i have to load a avi file and capture x number of frames (viedo only) from it and save in a web compatible format (JPEG , GIF) , also this needs to be done as a back-end process with the front end being ASP.Net . Can any one help ?
I have browsed through the samples here but they deal with capturing from a video source(web cam, tv etc) and not from a avi file. This means they are also very difficult to comprehend as i am not a experienced programmer. So I am hoping for a simpler solution to this , a simpler problem !
Thanks
balien
|
|
|
|
|
Hello
You should search more deeply. Look at my article "Motion Detection Algorithms" [^]. You can find there a small interop library for AVI reading using Video for Windows .
You can try to interop DirechShow also, or to use managed extension of DirectX 9 .
With best regards,
Andrew
|
|
|
|
|
By the way, here is another article[^], which is fully dedicated to AVI's using C#.
With best regards,
Andrew
|
|
|
|
|
Hi,
I created a web application in c# to create a record with attachment. While creating a new record I have an option to create an attachment on a separate window? What I am doing is once the user click the attachment button I automatically create a header record then from the new window upon saving the attachment I created the detail information using a temporary primary key. When its time to save and press the SUBMIT button, I update the primary key to a standard primary key that is readable to the users.
Please tell me if what I am doing is correct, or if you have any suggestion on how implement in a correct way.
DRAWBACK: After pressing the attachment button (It means I create a header record) the user will change his mind an abort everything that he is doing and just close the window. I will have 1 record from the database (garbage).
/Dabuskol
|
|
|
|
|
Is it possible to identify which control is on a form. For example can i return a string which saya that there is a textbox control on a form, etc.
|
|
|
|
|
Use FindControl method
HVP
|
|
|
|
|
You can also use the Controls property of the Form class for this purpose. It returns an object of the Control.ControlCollection class whose members can be used for the purpose desired by you.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|