Nima Dilmaghani's Q&A profile
Windows Forms Running initial code from another form that Form1 in VB 2005 Express Edition
Hi everyone, Is it possible to make another form than Form1 running the initial code. (by the way: il yes, how to do it ) I have tried swapping forms'names (Form1 in Formx and Formx in Form1), the initial code still executes from the first form chronologicaly created in VB Studio (i.e Forms1 x in the above example). You may wonder why such a question: my computer is slow and as my application is growing, compile and loading duration are becoming unbearable. If I could test new controls without having to stand the loading of the whole application I could save a lot of time. pls notice that I have tried conditional assembly (#const ...Show All
Visual C++ C2275 with CTypedPtrArray
Hi, I received the following error message while using a CTypedPtrArray as typedef. Using the VC++6. I include here the complete code. The program is called CMini: in MiniDoc.h: #include <afxtempl.h> #include <afxwin.h> #include <afxext.h> class Cline: public CObject { protected: int m_x1,m_y1,m_x2,m_y2; public: Cline(int x1,int y1,int x2,int y2) { m_x1 = x1; m_y1 = y1; m_x2 = x2; m_y2 = y2; } void Draw(CDC *pDC); }; typedef CTypedPtrArray<CObArray, Cline*> m_LineA ...Show All
.NET Development Int32 - how related to ValueType?
Hi! I am looking at System.Int32, for example, and don't understand how it's related to System.ValueType . Can someone explain how ValueTypes are implemented as structs in some detail, or refer me to a good explanation on the Web Thx, Jess C# Online.NET http://www.csharp-online.net/ Thanks, Imran! I couldn't see how a struct could--literally--extend a class, but your byte code makes it obvious. Thanks to all for your help! Jess C# Online.NET http://www.csharp-online.net/ ...Show All
Visual Studio MsBuild & VCBuild task setting /useenv
I'm replacing our Nant scripts with MSBuild for building all our projects. We rely on LIB & INCLUDE being set in the environment when building VC projects. When building these projects via the MsBuild task (i.e. building the solution), vcbuild gets invoked without the /useenv parameter, so the environment gets ignored. The VCBuild task doesn't include a Useenv property either. Is there a sneaky way to do this For now I can work around it by using the Exec task to invoke VCBuild directly, but it would be nice to write: < Project DefaultTargets = " build " xmlns = " http://schemas.microsoft.com/developer/msbuild/2003 " > & ...Show All
Windows Forms (c# 2.0) Custom control and don't take a line in the .designer.cs file when property change
Hello, (escuse me for my english) i make a new label (custom control) extended label. i add a new property to choice the look (ErrorMessage, Title1, Title2, FieldCaption...). when the property is selected the control go to the setting file, take the parameters, and assign the properties. for example errormessage -> forecolor = red; backcolor = yellow; textalign = middlecenter... when i design a form, i take a new form, add my label, select the look type, the control go taake the paramters and assign the properties value. and it's ok, i can view my label with the good properties. but in the .designer.cs file (I nitializeComponent() method) ...Show All
Visual Studio Express Editions Where is project temlpates?
Hi,I've installed vwd2005 beta2 after uninstalling March preview and now I don't have any Project Templates in "New Project". What could I do with it Thanks. It's bad you don't have explicit mechanism to reset cached configuration settings-all caches must be invalidated from time to time.What you mean under "devenv" There'is no such thing in "express" editions...maybe "VWDExpress.exe /setup" Best wishes. ...Show All
Visual Studio Express Editions Need Help
hi, i know it might seems silly and even i don't expect answer but anyway since Dec 2005 i starting to learn programming with .net i have learned lots of stuff but every thing i try to learn will be like i open a door for hell, every thing even small controls have tons of properties and methods and lots of stuff you need to learn , i know its natural thing to happend when you start to learn new things, and i know i'll not be able to memorize the .net framework 388000 command(method, property ... etc) 2 months and half now i keep reading like dog and have feeling that the way still too long to walk , but realy i feel i overloading my br ...Show All
Windows Forms Using the .NET 1.1 com interop in .NET 2.0?
Hi there, I am having some real major issues with getting an activex COM library to fire events in VS2005 but its ok in VS2003 SO I was searching around and i wonder if its possible to Use the .NET 1.1 com interop in .NET 2.0 My idea is really ... that if it worked in VS 2003 then to make it work in VS 2005 then if i could use the interop com from NET 1.1 (vs2003) then i may have a chance Thanks in advance Ian I did try putting this in, <startup> <supportedRuntime version="v1.1.4322" /> </startup> but it stops my application from running saying strong name validation faile ...Show All
SQL Server Full Text Search Engine in Chinese Simplied
contains(name,'" 三"') will not find the row in database with column named "name" and " 三" is sure there,but will find ' 三一',' 三二' why name column is sure in the fulltext category and data population is finished! This is due to wordbreaking behaviour in Chinese Simplified wordbreaker. ' 三一' is got broken into ' ' and '三一'. You could try freetext instead of contains to allow some fuzziness into the query. select * from Table1 where freetext (*, N' 三') ...Show All
Smart Device Development ReadXml with XmlNodeReader to slow with 1.0
Hello, we use XmlNodeReader to read special Nodes from a XmlDocument to a DataSet. Bigger Files (>700 Nodes) are taking too much time. Is there any possibility to accelerate this or use a nother easy functionality We are using CF 1.0 and have no chance to update to 2.0. Thank you, JakobH 1. Make sure you have NETCF V1 SP3 installed, it has XML performance improvements. 2. Do not use DOM, use XmlTextReader instead. ...Show All
SQL Server BUG in AS 2005 Generate/ascendants function ?
When you run this query on the Adventure works cube with the CTP 16 + QFE (9.00.1320.00) , I get a strange error message. Optimized hierarchies (geography.geography for instance) don't have this error. Query: with member parentnames as generate ( Ascendants ([Promotion].[Promotions]. currentmember ), [Promotion].[Promotions]. currentmember . name ," - ") select parentnames on 0, [Promotion].[Promotions].[Promotion Name]. members on 1 from [Adventure Works] Error: Executing the query ... Internal error: An unexpected error occurred (file 'mdcell.cpp', line 2201, function 'MDStrongHierMixedGrainMapping::ComputeRelation ...Show All
SQL Server Exporting SQL Maintenance Plans
I have taken a look at the new maintenance plan designer and have come up with a maintenance plan I would like to be able to deploy on an enterprise level. Anyone know of a way I can export the plan to another SQL 2005 server - without directly pulling from the msdb system tables I like the fact that you can script the output of most of the wizards, but the maintenance plan wizard does not appear to be one of them. Thanks, Matt I also really need to know how to do this. We want standardized maintenance plans at all of our clients and creating these by hand is a pain in the a$$. How can you do this I see that you can create ...Show All
Visual C++ Region Resource leaks in C++ MFC project developed using VC7, Dotnet framework 1.1
I am facing some resource leak problems with my application. During investigation i found that the app was leaking a lot of regions. I was suprised since we did not explicitely use any regions in the app. So just to find out more I built a sample wizard generated VC7 C++ MFC project, Dotnet framework 1.1 on Windows XP After invoking the application, Opening and closing the document window introduces approximately 6 GDI object(Region) leaks each time. Even more puzzling is the fact that the same application run on Windows 2K does not leak at all. I have not been able to understand the reason for these leaks or how to circumvent the ...Show All
SQL Server Join XML fragment with real table
I was wondering how someone would go about joining an XML fragment with a SQL table. Say for example this is my XML fragment. <foo><key>1</key><description>One</description></foo> <foo><key>2</key><description>Two</description></foo> My table looks like this: key SomeInfo 1 SomeInfo1 2 SomeInfo2 I want to be able to create a Stored procedure that takes my XML fragment as an xml type and then create a SQL select statement that looks like this in pseudo code. Select myTable.key, myTable.SomeInfo, @myXML.Description From myTable an ...Show All
SQL Server DATABASE AGE
What's a reliable way to tell when the database (SQL Server 2000) was created Thanks. -John Does select crdate from sysdatabases where ... work for you If you are using SSMS, you can select the database in the Object Explorer (OE), right click, and see the create date in the properties window. Does this answer your question ...Show All
