|
|
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
|
|
|
|
|
Hi
Can anyone help me with this problem.
------------------------------
PDA Transportes.exe
TypeLoadException
FormTransMain::.ctor+0x2c
FormTransMain::Main+0x5
------------------------------
This happens on an application that uses a library that uses Web Services.
And i allready made debugging of the problem, the error comes when calling
the web services.
This occurs in the emulator of VS2003 and in the Pocket Pc.
Both library and application where built on C#.
I reall don't what to do anymore.
Thanks for all the help.
|
|
|
|
|
Usually this comes when the type's static constructor throws an exception.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hye there. I need to hide the column of datagrid. the story is I am fetching the record from one table containinng primary keys and some other information which I need for processing at latter stage but dont want to show it to user. Can any one tell me how to do it. Plus need change the caption of the columns with out changing the names in DataTable
any support would be appreciated.
thanks in advance.
|
|
|
|
|
Hi,
Just make the column visible=false. You can still use the value of that column though it's invisible. You can use the E.Item.Cells[x].Text to get the current value.
Other way is to Grid.Columns[1].Visible = false;
/Dabuskol
|
|
|
|
|
I think you are using any third party data grid. I was talking about the Dot net DataGrid in Visual Studio 2003. there isnt any property like you mentioned.
please have a look and let me know if I am missing any thing.
regards
|
|
|
|
|
There are two ways to do it.
(1) Create custom table style. And dont add DataGridTextBoxColumn for the columns you dont want to display.
http://www.codeproject.com/cs/miscctrl/noogenwinforms.asp
(2) You can use your DataSet's ColumnMapping property to hide a column.
// Creating connection and command sting
string conStr = @"Provider=Microsoft.JET.OLEDB.4.0;data source=C:\northwind.mdb";
string sqlStr = "SELECT * FROM Employees";
// Create connection object
OleDbConnection conn = new OleDbConnection(conStr);
// Create data adapter object
OleDbDataAdapter da = new OleDbDataAdapter(sqlStr,conn);
// Create a dataset object and fill with data using data adapter's Fill method
DataSet ds = new DataSet();
da.Fill(ds, "Employees");
// Hide the column and attach dataset's DefaultView to the datagrid control
ds.Tables["Employees"].Columns["LastName"].ColumnMapping = MappingType.Hidden;
dataGrid1.DataSource = ds.Tables["Employees"];
|
|
|
|