| Excel/PowerPoint Quit event |
|
 |
Index ‹ DotNet ‹ Visual C#.Net
|
- Previous
- 1
- Microsoft Project >> Update Task ProgressI am a beginner in using Microsoft project and project server (2007).
My questions are as below:
1. I did create 2 user in PWA(Project Manager(PM) and Team member (Mr. A)).
PM publish a project schedule to PWA which all tasks in the project asssigned
to Mr. A. How Mr. A check his task and update the % of work complete?
-I tried login as Mr. A and I only found those tasks can add into "My Time
Sheet" but not in "My Task". The button in "My Task" to import time sheet was
disabled.
2. How PM track the project status?
-I tried use local MS Project 2007 connect to server then goto Collaborate>
Request Progress Information but seem no different from the baseline plan
compare with the actual progress.
- 2
- Visual C#.Net >> Help with windows servicesI need direction on how to create a program that will start multiple windows
services. Each service will monitor a specific directory using
FileSystemWatcher. I have the file system watcher part working...but how
does one create multiple windows services??
Thanks
Jack David
- 3
- Visual C#.Net >> Hiding TabPagesHi,
Does anyone know how to hide certain TabPages inside a TabControl in VS.NET
2003?
I've seen code to remove the tabpage but I want to show/hide based on the
user's access rights each time, rather than removing the tabpage.
There doesn't seem to be an Enabled or Visible property and setting Locked =
True doesn't seem to do anything either.
Microsoft: this is basic functionality!!!
Thanks in advance,
Paul
- 4
- Microsoft Project >> HARD QUESTIONMy company and I wish to create an archive for storing all data from
previous projects. However, when I create a Consolidated Project it only
utilizes a shortcut to the projects. I'm wondering if there is any way to
load Project A into Project B such that Project A can then be deleted
(without deleting it from Project B). The way consolidating projects is set
up makes this impossible. If there is a way to load all information from
one project to another please let me know!! Even if it's long and
involved!! (I can make a macro) Thank you for your time and energy reading
this. please if you can help post a reply here or e-mail me at
Brian_Stebbins@yahoo.com
- 5
- Winforms >> Getting Caret Position from another processDoes anyone know how I can get the caret position in terms of screen position
from the currently active window? By currently active window I don't mean
just mine, rather any window.
Basically the end result I want is to position a floating tooltip style
window next to wherever the user is typing (their caret) regardless of what
app they are using.
I've tried calling GetCaretPos, however this only seems to work when my app
currently has the focus. At all other times the POINT returned by
GetCaretPos is 0,0. I think this is due to other windows destroying their
Carets when they lose the focus.
Does any smart cookies out there have any ideas?
- 6
- ADO >> Importing from a text file to a DatasetI have a large(1.25M), fixed field delimited, text file which I want to read into a DataSet. So, I opened a StreamReader, read a line, assigned the values to a new DataRow, and finally added the DataRow to a DataTable in the DataSet. Seemed to be a staight forward task but boy did it progress at a snail's pace!
So I tried to speed things up by first importing the data from the text file into SQL Server. To my amazement, the text import went like lightning! How can I get lightning fast text import?
Michael
- 7
- 8
- 9
- ADO >> Connection StringsHi
Trying to sort out how to implement the use of connection strings with our new .Net Data Acces Layer(DAL).
2 solutions have been propoesed. Both suggest storing the connecion string in the machine.config file. The DAL uses SQLCleint namespace. At this stage there is only one SQL data store(with multiple data bases), but that might change in the future. Also, we are not using COM+ / Enterprise services, only manual transactions.
The 2 solutions differ, in that the first requires each part of the application to get the connection string, and pass it through every tier/layer (presentation, business, dalcs) to the DAL ...
The second solution makes it possible for the DAL to retrieve a named datasrouce from machine.config, and only DAL Components(DALCS which inherit the DAL) can specify a datasource.
If this makes any sense, can anyone suggest best of the two options, and why they think that? And if anyone has an even better solution to post that up would be great !
Cheers
Mike
---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
- 10
- Net Framework >> TypeConverter and Generic ListsHi I am having a bit of difficulty with TypeConverters and Generic Lists and
I was hoping that I could get a bit of advice.
I have a type converter that is used to create the constructor code for my
component. (It is an XNA a Game Component, but I don't think that that has
anything to do with the problem because it appears on a Winform) inside
another component.
For instance I have the following:
public class A{
private string s;
public string SProp
{
get{ s = value;}
set {return s;}
}
public A()
{
s = "";
}
public A(string inS)
{
s = inS;
}
}
By itself, when class A is an object on a form (or in my XNA Component) the
TypeConverter code works fine, the property grid on the desinger is fine, if
I debug the ConvertTo on the type converter I see that the variable s is all
set up okay on the object.
However if on my form, I have a List<A>, the type converter works to an
extent, as in it will add code to the perform the List.Add(new A("")),
however the constructor with the parameter is not being called, instead the
parameterless constructor is being called.
Obviously, if the input to ConvertTo on the type converter is not set up,
then my type converter won't work or display the values the user has put in.
This only occurs when my object is in a Generic List.
Any Ideas,
Paul Kinlan
My environment is VS2005 C# and also VS2005 C# express.
- 11
- Net Framework >> CLR Shared Memory, C# DLL loadCLR Shared Memory, C# DLL load
How to share memory between CLR calls to the same C# dll? Is there some way
to know in the C# dll when the dll is loaded? Is the dll reloaded each tiem
a method is called from SQL Server or is the DLL loaded once when the C# dll
is added to sql server with CREATE ASSEMBLY?
I wold like to be able to share memory accross calls to methods on the same
C# dll is why. e.g. a Shared ArrayList or a shared Hashtable.
- 12
- Winforms >> Save lines drawn in the picturebox as an lmageHave used DrawLine() method to draw some lines in the picturebox (sort
of a barcode) in the picturebox paint event.
This diagram has to be saved as an image in bmp or tiff format.
But the problem is that these lines are not recognized as the image o
the picturebox.
It shows picturebox.image = nothing.
How do we convert these lines drawn as the image of the picturebox so
that it can be saved.
Thanks for any help
--
Yas
-----------------------------------------------------------------------
Yash's Profile: http://www.highdots.com/forums/m177
View this thread: http://www.highdots.com/forums/t321621
- 13
- ADO >> Bug with DataColumn.AutoIncrementSeedHi! I think I found a bug with DataColumn.AutoIncrementSeed. I tried to
communicate it via the Microsoft Feedback center, but after about half an
hour of trying to get through the feedback process without webforms breaking
down, I gave up.
The bug is: Under certain circumstances, the number to be automatically
incremented has a false value.
This is how to reproduce the bug (complete code below):
1) Call TestCode1(): an XML file TEST.xml is created in C:\
2) Call TestCode2() with a breakpoint in line
dr["Text"] = "Text2";
(= third to last line)
3) The new line created should have an ID of 1 (ID of existing line, which
is 0, plus 1); but it has an ID of 0.
With an AutoIncrementSeed of 1 (instead of 0), the problem disappears (the
two IDs are correctly numbered 1 and 2).
--Complete code:
private void TestCode1()
{
System.Data.DataSet ds = new DataSet("TestDS");
System.Data.DataTable dt = new DataTable("Test");
ds.Tables.Add(dt);
System.Data.DataColumn dc1 = new DataColumn("ID", typeof(int));
dt.Columns.Add(dc1);
dt.Columns[0].AutoIncrement = true;
dt.Columns[0].AutoIncrementSeed = 1;
dt.Columns[0].AutoIncrementStep = 1;
System.Data.DataColumn dc2 = new DataColumn("Text",
typeof(string));
dt.Columns.Add(dc2);
System.Xml.XmlDataDocument xmlTest = new XmlDataDocument(ds);
System.Data.DataRow dr = dt.NewRow();
dr["Text"] = "Text1";
dt.Rows.Add(dr);
dt.AcceptChanges();
xmlTest.Save("C:\Test.xml");
dr = dt.NewRow();
dr["Text"] = "Text2";
dt.Rows.Add(dr);
dt.AcceptChanges();
}
private void TestCode2()
{
System.Data.DataSet ds = new DataSet("TestDS");
System.Data.DataTable dt = new DataTable("Test");
ds.Tables.Add(dt);
System.Data.DataColumn dc1 = new DataColumn("ID", typeof(int));
dt.Columns.Add(dc1);
dt.Columns[0].AutoIncrement = true;
dt.Columns[0].AutoIncrementSeed = 1;
dt.Columns[0].AutoIncrementStep = 1;
System.Data.DataColumn dc2 = new DataColumn("Text",
typeof(string));
dt.Columns.Add(dc2);
System.Xml.XmlDataDocument xmlTest = new XmlDataDocument(ds);
xmlTest.Load("C:\Test.xml");
ds.AcceptChanges();
System.Data.DataRow dr = dt.NewRow();
dr["Text"] = "Text2";
dt.Rows.Add(dr);
dt.AcceptChanges();
}
Axel Hecker
- 14
- Visual C#.Net >> how to do thatHi all...
I know this isn't the right place for that but i'm with this problem..
I work in a hospital and need to make a program that counts the amount
of people interned per day. I have in a mysql database the day that the
person interned and the day that it leaves.
tHow can I count that the person is interned in the middle days??? I
need to make a graph of that.
Some ideas???
*** Sent via Developersdex http://www.developersdex.com ***
- 15
|
| Author |
Message |
beihong

|
Posted: Thu Jul 14 12:47:35 CDT 2005 |
Top |
Visual C#.Net >> Excel/PowerPoint Quit event
I'm working with Office Application objects in a client/server
WinForm application which allows the user to access remotely
stored files. When the user opens the remote file, it is
downloaded to their machine, and it is opened in the appropriate
Office app.
I've hooked the various BeforeSave events to let me know if/when
they've made modifications to the file, so I can mark it as dirty.
However, I would like to know when the Office application has
terminated, so that I can then upload dirty files back to the
remote server. Word.Application has a Quit event in its parent
interface ApplicationEvents4_Event, so I can hook that. However,
I haven't seen a similar Quit event in the Excel and PowerPoint
objects. Anybody know where it is, or if it exists?
(I'd also like to know when the Office applications quit so that
I can remove the COM references and null out the variables that
point to them.)
Oh, and I can't use the BeforeClose/Close events, because if
the user hits the Close Window button on the frame of the
application, then the document is closed it is saved. (Oddly enough.)
Thanks,
Harold
DotNet172
|
| |
|
| |
 |
Nicholas

|
Posted: Thu Jul 14 12:47:35 CDT 2005 |
Top |
Visual C#.Net >> Excel/PowerPoint Quit event
Harold,
Since the office applications are processes in themselves, you could get
the Process instance that represents the process that you started, then call
the WaitForExit method, blocking until the application exits. Of course,
you don't want to keep your application hung up while this is happening, so
I would recommend doing this in another thread while waiting (which can then
fire an event upon completion).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- EMail@HideDomain.com
<EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> I'm working with Office Application objects in a client/server
> WinForm application which allows the user to access remotely
> stored files. When the user opens the remote file, it is
> downloaded to their machine, and it is opened in the appropriate
> Office app.
>
> I've hooked the various BeforeSave events to let me know if/when
> they've made modifications to the file, so I can mark it as dirty.
> However, I would like to know when the Office application has
> terminated, so that I can then upload dirty files back to the
> remote server. Word.Application has a Quit event in its parent
> interface ApplicationEvents4_Event, so I can hook that. However,
> I haven't seen a similar Quit event in the Excel and PowerPoint
> objects. Anybody know where it is, or if it exists?
>
> (I'd also like to know when the Office applications quit so that
> I can remove the COM references and null out the variables that
> point to them.)
>
> Oh, and I can't use the BeforeClose/Close events, because if
> the user hits the Close Window button on the frame of the
> application, then the document is closed it is saved. (Oddly enough.)
>
> Thanks,
> Harold
>
|
| |
|
| |
 |
hsuntn

|
Posted: Fri Jul 15 10:33:11 CDT 2005 |
Top |
Visual C#.Net >> Excel/PowerPoint Quit event
Thanks for the reply, Nicholas. I played around with the Process class
as per your suggestion, and indeed it all works beautifully, except...
(knew that was coming, didn't'cha?)
Ok, I seem to have a paradox. In order for the Excel process to
terminate (so my waiting thread unblocks from the WaitForExit()
call), I have to release all references to the Excel.Application
instance, including using the Marshal.ReleaseComObject().
If I do this, Excel dies a peaceful death when the user
closes it, and the WaitForExit() call returns and I can then perform
clean up. Beautiful.
But, if I release all references to the Excel.Application, then the
BeforeSaveEvent that I've hooked to let me know that the workbook
was saved no longer receives events. So now I can't tell if the
file was saved (using that event). I could use file modification time,
I
guess, but I was wondering if there was another way out:
ReleaseComObject(): good for WaitForExit(), bad for BeforeSave
no ReleaseComObject(): bad for WaitForExit(), good for BeforeSave
Many thanks indeed,
Harold
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ Visual C#.Net |
- Next
- 1
- ADO >> Looking for Comments on CodeI would appreciate any comments on the following code--particularly
criticism that is constructive. It is some of my first data-layer code.
I felt these helper routines would be helpful in their own data-layer class.
There are a few issues that came up, mostly related to using an
SqlDataReader. Also, the compiler complains that all my trailing, default
return statements are unreachable, which doesn't seem right. But these
routines appears to work okay.
Thanks!
/////////////////////////////////////////////////////////////////
/// <summary>
/// Executes a stored procedure and returns it's return value.
/// </summary>
/// <param name="proc">Name of the stored procedure to execute</param>
/// <param name="args">Procedure arguments (one name and one value for each
argument)</param>
/// <returns>The integer value returned from the stored procedure or -1 if
as error
/// occurred</returns>
public static int ExecProcInt(string proc, params object[] args)
{
using (SqlConnection conn = new SqlConnection(_connStr))
{
using (SqlCommand cmd = new SqlCommand(proc, conn))
{
cmd.CommandType = CommandType.StoredProcedure;
// Add parameter arguments
for (int i = 0; i < args.Length; i += 2)
cmd.Parameters.AddWithValue((string)args[i], args[i + 1]);
// Add return value parameter
var retVal = new SqlParameter("@RETURN_VALUE", SqlDbType.Int);
retVal.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(retVal);
// Execute stored procedure
cmd.Connection.Open();
cmd.ExecuteReader();
if (retVal.Value != null)
return (int)retVal.Value;
}
}
//
return -1;
}
/// <summary>
/// Executes a stored procedure and returns the resulting DataReader. Be
certain to
/// close this DataReader when finished.
/// </summary>
/// <param name="proc">Name of the stored procedure to execute</param>
/// <param name="args">Procedure arguments (one name and one value for each
argument)</param>
/// <returns>The DataReader returned from the stored procedure or null if an
error occurred</returns>
public static SqlDataReader ExecProcReader(string proc, params object[]
args)
{
SqlConnection conn = new SqlConnection(_connStr);
using (SqlCommand cmd = new SqlCommand(proc, conn))
{
cmd.CommandType = CommandType.StoredProcedure;
// Add parameter arguments
for (int i = 0; i < args.Length; i += 2)
cmd.Parameters.AddWithValue((string)args[i], args[i + 1]);
// Execute stored procedure
cmd.Connection.Open();
return cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
//
return null;
}
/// <summary>
/// Executes a stored procedure and returns the resulting DataSet.
/// </summary>
/// <param name="proc">Name of the stored procedure to execute</param>
/// <param name="args">Procedure arguments (one name and one value for each
argument)</param>
/// <returns>The DataSet returned from the stored procedure or null if an
error occurred</returns>
public static DataSet ExecProcData(string proc, params object[] args)
{
using (SqlConnection conn = new SqlConnection(_connStr))
{
using (SqlCommand cmd = new SqlCommand(proc, conn))
{
cmd.CommandType = CommandType.StoredProcedure;
// Add parameter arguments
for (int i = 0; i < args.Length; i += 2)
cmd.Parameters.AddWithValue((string)args[i], args[i + 1]);
// Execute stored procedure
cmd.Connection.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
}
// An error occured
return null;
}
/// <summary>
/// Executes an SQL query. Be certain to close the returned DataReader when
finished.
/// </summary>
/// <param name="query">SQL query to execute</param>
/// <returns>SqlDataReader with the results of the query, or null if an
error occurred</returns>
public static SqlDataReader ExecQueryReader(string query)
{
SqlConnection conn = new SqlConnection(_connStr);
using (SqlCommand cmd = new SqlCommand(query, conn))
{
cmd.CommandType = CommandType.StoredProcedure;
// Execute stored procedure
cmd.Connection.Open();
return cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
//
return null;
}
/// <summary>
/// Executes an SQL query.
/// </summary>
/// <param name="query">SQL query to execute</param>
/// <returns>DataSet with the results of the query, or null if an error
occurred</returns>
public static DataSet ExecQueryData(string query)
{
using (SqlConnection conn = new SqlConnection(_connStr))
{
using (SqlCommand cmd = new SqlCommand(query, conn))
{
cmd.CommandType = CommandType.Text;
// Execute stored procedure
cmd.Connection.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
}
// An error occured
return null;
}
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
- 2
- Microsoft Project >> Scheduling from fixed finish dates?What is the best way to schedule a series of activities from a fixed
finish date? We are planning an event that takes place on July 23, 2005. I
am trying to plug in things like:
Issue press release 3 days before event (must occur on)
Issue press release 30 days before event (could be +/- 3 days)
Design, print, mail brochures must be finished 60 days before event.*
* Design and print can happen early but mailing must
take place no earlier than 60 days before event and no
later than 45 days before event.
These activities needs to be relative days in case we have to reschedule
the entire event for a later date. However, most tasks MUST happen as
outlined above (finish x number of days before event).
I am fairly used to constructing projects that have regular SF relations
and the end date floats depending on the length of time. Here we're trying
to plan backwards and I'm not sure I'm doing what I want.
Thanks for the help!
--
Tom G.
Send replies to tom |att| geldner /dott/ com
- 3
- Dotnet >> dynamically determine .net baseframework version of exe or dllHi All,
Whether in a Winform application (.exe) or a .Net assembly (.dll), is there
a way to determine what version of the .net baseframework the run-time
module (i.e. exe or dll) was loaded with (is using)? Seems that using
reflection this is possible...just can't seem to figure out what
classes/instances will get me there. Thanks in advance!
Tony
- 4
- ADO >> DataSet.WriteXmlHi,
I have a question need your help. I have defined a dataset with two tables
and I also defined a relationship between the two tables. one is Order
another is OrderDetail. I loaded 3 order records and its related order
detail records, when I use .WriteXml() to write out the data, it actually
output 2 order records first and the output all order details altogether
like:
<MyDataSet>
<Order />
<Order />
<Order />
<OrderDetail />
<OrderDetail />
<OrderDetail />
<OrderDetail />
<OrderDetail />
</MyDataSet>
How could I get the xml like:
<MyDataSet>
<Order>
<OrderDetail />
<OrderDetail />
</Order>
<Order>
<OrderDetail />
</Order>
<Order>
<OrderDetail />
<OrderDetail />
</Order>
</MyDataSet>
Thanks very much!
John
- 5
- Dotnet >> .Net Broadcastwindow 1.0.5I've got a c# app that causes a ".Net Broadcastwindow 1.0.5" event window to
pop up when I shutdown the machine, it stops the shutdown. Has anyone else
seen this, or figured out what could cause it? thanks
- 6
- Net Framework >> "Error executing program!" when starting .Net 2.0 applicationHi there,
i've a problem with the .Net 2.0 Framework. I've created a very simple
C++ .NET 2.0 Windows Forms application using Visual Studio 2005. I only
create a new project, save and compile it and launch it. Thats ok on
the machine where my IDE is installed. On a second computer i've
installed the .Net 2.0 Framework ( exactly same version which came with
the Visual Studio 2005 ). All i get on the second machine is a error
box saying "Error executing program!" immediatly after clicking on the
executable which is copied to the local harddisk of the second
computer.
I don't think this has anything to do with security policies since i've
also disabled some of this security stuff by using "caspol -e off -s
off".
Thx for your help
Michael
- 7
- ADO >> Event QuestionHello,
I have an Excel Add-in that is using an assembly that I coded using VB.Net.
The assembly has forms in it. If I make the TextBox controls Public I can
add handlers, in my excel add-in, to the public TextBox events. The problem
is that I don't want to make my TextBox controls public. Is there a way to
add handers, i.e. - TextBox.TextChanged, from an outside source such as the
Excel Add-in without make my controls on the form public?
Thanks,
Rob Panosh
Advanced Software Designs.
- 8
- Visual C#.Net >> ADO Record Set rs.MoveNext(); problem....help pleaseOk,
Everything connects correctly and loads properly in this
WebApplication. I have four buttons and all work correctly except one
(the NEXT RECORD button). PREVIOUS, FIRST and LAST all work properly.
This identical code works correctly in a windows app.
Please tell me what I am doing wrong.
Here is my connection code:
private void InitializeDataConnection ()
{
// frmStatus frmStatusMessage = new frmStatus();
if (!HasConnected)
{
// frmStatusMessage.Show("Connecting to SQL Server");
// Attempt to connect to SQL server or MSDE
bool IsConnecting = true;
while (IsConnecting)
{
try
{
// Open a Connection
cnn.ConnectionTimeout = 0;
cnn.CommandTimeout = 0;
cnn.Open(Connectionstring, null,null,0);
if (cnn.State != 1)
{
throw new System.Exception("Connection failed.");
}
if (!HasConnected)
{
// frmStatusMessage.Close();
}
IsConnecting = false;
HasConnected = true;
}
catch
{
if (Connectionstring == SQL_CONNECTION_STRING)
{
// Couldn't connect to SQL server. Now try MSDE
// Connectionstring = MSDE_CONNECTION_STRING;
// frmStatusMessage.Show("Connecting to MSDE");
}
else
{
// Unable to connect to SQL Server or MSDE
// frmStatusMessage.Close();
// MessageBox.Show("To run this sample you must have SQL
Server ot MSDE with the Northwind database installed. For instructions
on installing MSDE, view the Readme file." + MessageBoxIcon.Warning +
"SQL Server/MSDE not found");
// Quit program if neither connection method was successful.
// Application.Exit();
}
}
}
}
// }
// Build SQL statement.
// string strSQL = "SELECT * " +
// "FROM member " ;
string strSQL = "SELECT t1.member_id, t1.first_name, t1.last_name "
+
"FROM member t1 " ;
rs.ActiveConnection = cnn;
rs.CursorType = CursorTypeEnum.adOpenStatic;
rs.Open(strSQL,cnn,ADODB.CursorTypeEnum.adOpenDynamic,ADODB.LockTypeEnum.adLockOptimistic,0);
rs.MoveFirst();
}
and here is the code giving the problem:
private void Button2_Click(object sender, System.EventArgs e)
{
// this code is used to prevent going to EOF
if (!rs.EOF)
{
rs.MoveNext();
if (rs.EOF)
{
rs.MovePrevious();
}
PopulateSimpleNavigationForm();
}
}
Any help is appreciated.
Thanks,
Trint
- 9
- 10
- Visual C#.Net >> Undo/Redo PatternHello,
I've tried to find information about how to implement an Undo/Redo pattern.
This article describes such a pattern:
http://www.codeproject.com/csharp/PcObjectUndo.asp , but is a little bit to
narrow, since it only can handle 1 object, and since it only works on
properties.
What if you , in an application, have more than 1 object , and you want to
use undo/redo on them?
What if you'd like it to work on methods as well as properties?
If there is a better pattern than the one in the link, that will let me do
this, please let me know.
Christian H.
- 11
- 12
- Visual C#.Net >> Good books about .NET and C#?Hello!
I am a software developer with 5+ years of C++ experience and VB
experience since version 1.0 until 6.0. I would like to learn more
about C# and .NET framework. I have some VB.NET, C++/CLI and C#
experience. So far the books I have come accross start with basics
like "writing loops" and "how to use IDE" and stuff like that. I
don't care about books like that. Is there any books that don't
assume the reader is complete beginner? Something that would go in
depth about the language? And something about common idioms and
programming styles of C#? Is there a FAQ of this newsgroup? Any
suggestions?
Thanks,
Ahti Legonkov
- 13
- 14
- Winforms >> URGENT: VS2005 Text Rendering IssueFirst up, sorry for cross-posting.
I have what is (to me, at least, an urgent issue) with the look/feel of my
applications.
I have been using VC# EE Beta2 until about a week ago and I have just bought
VS2005 Professional RTM.
All programs I've written in VC# EE now do not render text correctly. The
labels and controls render much the same way as they do with .NET1.X, ugly
and about 1.5 spaced.
New projects look fine, like a native Windows program and don't suffer the
rendering issue.
For my upgraded VC B2 apps I've made sure that UseCompatibleTextRenderer =
false and I've done a clean build.
Can some one *please* help me with this problem.
Thanks in advance,
Annette.
- 15
- Visual C#.Net >> Collection issue to refresh control : suiteHi,
I'm still in trouble with my collection which should refresh my control.
Here is my code extract.
custom Control class code :
...
private ColumnEventHandler HandlerColumnCollectionChanged;
...
/// in constructor
public CARListView()
{
this.HandlerColumnCollectionChanged = new
ColumnEventHandler(OnColumnCollectionChanged);
this.Columns.ColumnAmountChanged += this.HandlerColumnCollectionChanged;
}
...
[Category("Behavior")]
[Browsable(true)]
[Description("Column Collection")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor(typeof(ColumnCollectionEditor),
typeof(System.Drawing.Design.UITypeEditor))]
public ColumnCollection Columns
{
get
{
if (this.m_columns == null)
{
this.m_columns = new ColumnCollection(this);
}
return this.m_columns;
}
}
...
public void OnColumnCollectionChanged(object Sender, ColumnEventArgs e)
{
this.Invalidate();
}
in my ColumnCollection class, i have the following code :
public event ColumnEventHandler ColumnAmountChanged;
public int Add(Column column)
{
if (column == null)
{
throw new System.ArgumentNullException("Column is null");
}
int index = this.List.Add(column);
this.RecalcWidthOfAllColumns();
this.OnColumnAmountChanged(new ColumnEventArgs(column, index,
ColumnEventType.ColumnAdded, null));
return index;
}
...
protected virtual void OnColumnAmountChanged(ColumnEventArgs e)
{
if (ColumnAmountChanged != null)
{
ColumnAmountChanged(this, e);
}
}
...
So everytime that a column is added, it should raise the event
ColumnAmountChanged. This event should be caught by
OnColumnCollectionChanged handler method, but it is not true.
So where could be the problem ?
thanks a lot,
Al.
|
|
|