|
Isn't there an event that gets fired to delete and edit ? Is this a web or windows form ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is it a windows or a web form ?
also please could you tell if the buttons are within the datagrid, or u want something to be deleted from the datagrid, when the delete and the edit buttons are clicked on the form
Keshav Kamat
India
|
|
|
|
|
i am designing a 3-d choreographer for which i need to hav songs in my music libraray....i want to get the c#code on importing a music file.
parth
|
|
|
|
|
Importing to where ? Do you mean having the file in resources ? Do you mean playing it in your program ? Do you mean adding it to your WMP library ?
You can import WMP as a control and use it to play files.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi guys
i have a custom type object named Person, in my data access layer i fill this object from data adapter and send this object to my presentation layer where there is a datagrid view to display the contents of this object, but i want to make updations based on delete, update and add new actions performed on this object from data grid view , if i am using dataset so i can do that from data adapters update method passig it the changed rows of the data set, but i am not using any data set , so what is most appropriate approach to do that ?
thanks in advance
hello
|
|
|
|
|
You should be calling methods on your Person class, which then call methods in your data layer to insert, update or delete your data.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
but the problem is that how i will get the updated rows from datagrid view ,,
than to send these new updated rows to my business layer to perform action ,
hello
|
|
|
|
|
hello
am using C#.NET 2005
I want to save word document to Html file
I used :-
using Word = Microsoft.Office.Interop.Word;
using System.Reflection;
...
bject oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */
//Start Word and create a new document.
Word._Application oWord;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
ref oMissing, ref oMissing);
object fileName = "d:\\Try.doc";
object falseValue = false;
object trueValue = true;
object missing = Type.Missing;
oWord.Activate();
oDoc = oWord.Documents.Open(ref fileName, ref missing, ref trueValue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
but it dosent work ???
anyboday know how to do that
AMR-CIS
|
|
|
|
|
|
hi all,
please tell me how to restrict the ButtonClick event for the second time..
here my requirement is FOR THE FIRST TIME I SHOULD ALLOW THE BUTTON_CLICK EVENT FUNCTIONALITY and from the SecondTIme onwords i neeed to restrict the the functionality by poping a message.
hope u got my question,
bye byes thnx in advance,
Prashanth
|
|
|
|
|
Have a global integer available to all events set as 0.
In Class:
int x = 0;
In Button Click Event:
if (x == 0)<br />
{<br />
x += 1;<br />
}<br />
else<br />
{<br />
return;<br />
}
Posted by The ANZAC
|
|
|
|
|
Use a flag (as member variable of your form). On Form initialization set the flag (say alreadyClicked ) to false . Then in the button click event handler, first check the flag, if it is false set it to true and, finally, do whatever is needed in the handler (on the other hand, if it is true simply return).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
well if u want to restrict the functionality then why dont u disable the button rather than popping a message and then restricting its function
you can do it by adding this to the click event
button1.Enabled = false;
but you'll need to have some mechanism to enable it again once its disabled. if this is in your req. offcourse
Rocky
|
|
|
|
|
Hello!
Can anyone tell me how to get the number of objects that are located in serialized file (Soap method).
I need it, because i cant create array before i know the number of elements.
One nation - underground
|
|
|
|
|
When I use date picker for page which having Master page reference, it is giving javascript error that "'window.opener.document.From1.txtEventDate' is not an object".
But same code is working fine when using without Master page reference.
Please help me.
Dipak
|
|
|
|
|
if you have a popup window, your code must work successfully
We Can Do Anything, If We Want It
|
|
|
|
|
I'm working on a TextBox control that allows fields (like MS Office's mail merge feature). I want the editor to treat the field as though it was a single character. The user shouldn't be able to delete part of the field or select only part of the field.
For example, a line might look like: «Image» shot on «Date» at «Resolution»
where «Image» «Date» «Resolution» are all fields.
(above ? in a diamond are actually the same double angle brackets MS uses in Word).
My control inherits from TextBox. I've overloaded OnKeyDown & OnKeyPress so that if the user backspaces it deletes the whole field. If they move left or right, it skips past the entire field. I've also overloaded OnMouseUp so if they select part of the field with the mouse, it increases the selection to select all of the field. This all seems to work.
My problem is if the user holds shift and left, I can't get the field selected and put the cursor to the left of the selection. Similarly if they select by dragging the mouse right to left, the cursor is on the right side.
A snippet of the OnMouseUp code follows:
int SelectionEnd = SelectionLength + SelectionStart;
for (int i = SelectionStart; i >= 0; i--)
{
if (Text[i] == FieldEnd)
break;
if (Text[i] == FieldStart)
{
Select(i, SelectionEnd - i);
}
}
I assume I can't do what I want with just Select(start,len) or SelectionStart and SelectionLength. Any help will be much appreciated!
|
|
|
|
|
If you're trying to select right to left the following should work:
textBox.Select(selectionStart + selectionLength, -selectionLegnth);
You'll need to determine whether the user was going right to left using combinations of KeyDown, KeyUp (examine selectionLength) and MouseDown, MouseUp (examine cursor position).
Good Luck.
|
|
|
|
|
Thanks for the suggestion, but it still leaves the cursor at the right of the selection.
|
|
|
|
|
Sorry, What's the base class your TextBox control inherits from?
|
|
|
|
|
You're right. The suggestion works for a class derived from RichTextBox not from System.Windows.Forms.TextBox.
|
|
|
|
|
Greetings ...
Can anybody please tell me about any tutorial etc on video.ocx?
Trying to make sense of it all !!!
|
|
|
|
|
What is video.ocx ? If you want to play videos in your app, import the windows media player control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I experimented with windows media player control. For playing videos from files its really easy to use. but my problem is that i want to play a live video coming from a remote machine on the LAN. I'm using UDP for the streaming of video from the remote machine.
So duing my search I reached the conclusion that DirectShow is the thing for me. So if you have used Directshow, can u tell me how i can pick a live stream and use it to show video?
|
|
|
|
|
Hello
i have some byte array and want to remove from it one first byte...
Is any simpler way than for loop?
Greetings
|
|
|
|