dindelus's Q&A profile
Windows Forms OnHandleCreated, IsHandleCreated: some threading issue makes me crazy :(
I'm getting smth strange. I am overriding OnHandleCreated method on my Form, and as usual Window Handle is already created i can happily access it from the OnHandleCreated method body. but if start a new thread right away, i can not access the Window Handle from there - at least "IsHandleCreated" returns false and Form.Invoke methods throws an exception if called from this new thread "private IntPtr handle;" is not declares as volatile, so maybe what i am getting is a threading memory synchronization issue how do flush thread caches i've tried executing some "locked" section - in Java this would reload all the data from the main memory copy, but this did not help :( what i hate about my problem - it is 50% repro ...Show All
SQL Server What is the difference between SQL Server 2005 installed with .NET and a standalone one
Please could anyone tell me what are the real differences between SQL Server 2005 bundled along with Visual Studio.NET and a standalone one. Thanks in advance. This will depend on the edition of VS. With Visual Studio express, SQL Express is shipped. With the other versions of VS you could have installed the express edition of SQL or the developer edition. With most of these the main difference is that they can be instaled on the desktop. With a lot of the SQL Server installs you must have a server os for it to install. As with the differences the only differences are those based on the editions of sql 2005 that are installed, you can find information on these on the the sql home page or in the boo ...Show All
SQL Server Filter measure
I have a delima. I have a dataset that needs to return "Fatalities Involving drivers age 15-17". For years 2003 , 2004, 2005. So i set up 3 different filters: Year : 2003,2004,2005 Person type: Driver Age : 15,16,17 Now this is fine for getting a crash count and fatalities (for teen drivers). But i want the fatalities for everyone ( All Person Types) and (All Ages) ...how do i go about this. All i get right now, is the fatalities for Drivers 15-17. Please help..im confused! That would show only the fatalities for what ever is selected. But it will not show all the fatalities . I heard something about a filter mdx quer ...Show All
Visual Studio Execute target when (core)compile will execute
Hello, there must be a simple solution for this silly question, yet I cannot find it. I want to execute a target before compilation only when compilation will occur, i e when corecompile has been determined to execute (ie dependencies have been updated) then I want my target to execute before compilation. If corecompile does not run, I do not want my target to run either. So, is there a hook before corecompile is run after it has been determined that it will run Or is there a simple property that expresses the inputs / outputs used so that I can use the same dependencies /mawi Another variation I've seen is to add a <CallTarget> inside the target (in this case CoreCompile) to invoke your targe ...Show All
.NET Development Serialization?
Can someone give me a slightly "dumbed-down" explanation and example of serialization Where might one use serialization when developing well serialization is a way you can store a collection of objects into an Xml format then reconstruct them again either at say, load time of an application or perhaps stream it down the wire (network communication) Take a look at this: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=590301&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=724142&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=837396&SiteID=1 basically you can think of it as a way of storing data into an xml format which late ...Show All
Software Development for Windows Vista BaseTypeAttribute class is dropped
Hi, I upgraded my project from wwf Beta1 to Beta2 but i got the following error on the class BaseAttribute. i checked the upgrade document and i saw that this class have been removed, but what can i use to solve my problem SqlCommand command = activity.CreateCommand(); ............................ // Create the PropertyDescriptor for the SQL parameter PropertyDescriptor prop = new SqlParameterPropertyDescriptor (command.Parameters .ParameterName, new Attribute [] { new BaseTypeAttribute ( SqlDatabaseHelper .GetType(command.Parameters .SqlDbType)), new ParenthesizePropertyNameAttribute ( true ) }); Please any help Thanks, Tarek Ghazali SQL Server MVP ...Show All
Software Development for Windows Vista StateMachine Webservice Runtime
Hi, Firstly, I'm quite new to WF... 3 weeks using it. Steep learning curve.... I've searched all over but cant seem to find a solution. The problem i'm having is my StateMachine is not firing off the Delay event correctly. I created a StateMachine workflow and published it as a webservice. This works great with webservice calls etc and changes through all the states just fine. The workflow models a basic bug tracking service. When the state changes to Open, there is a delay event set to fire up after 5 minutes. The event fires off an e-mail and changes the state to escalated. This works fine, if you keep calling functions exposed by the web service e.g. CheckCurrentState(). The StateMachine also does persistence correctly ...Show All
Visual Studio 2008 (Pre-release) Introduction to WCF.
Hello, I am new to this thread and WCF technology. I have read a little-bit about WCF, but have not yet understood clearly the technology. I have seen various MSDN resources etc, but find them talking too abstract rather than hitting the real point. I understand that this technology does have some advantages over existing .NET Distributed technologies, but I fail to visualize a scenario where WCF 'PROVES' itself over existing technologies. It would be a great help if you'll can help me in clearly understanding the technology and actually outlining the differences between .NET 1.1 or 2.0 based Distributed technologies and WCF. I would really appreciate if you can bring out exact scenarios and how they fare in both the cases. So, for e ...Show All
SQL Server SQL 2005 Express and Visual Studio 2003 - Connecting
I have Visual Studio 2003 and had used it successfully with MSDE. I recently upgraded to SQL 2005 Express and cannot seem to connect to the SQL server. it appears in the list of servers on localhost, but when I try to create a new database it tells me that it "cannot create databases on this server." It will not even open up any existing databases. I have .NET 2.0 installed. I uninstalled SQL and reinstalled it, but nothing seems to help. I feel I must be missing something, but do not know what. I no longer have the MSDE installation files, so I hope I can get Studio to talk to SQL Express. Any help is appreciated. A simple usage of osql.exe (suppose your machine name is MachineA, S ...Show All
Visual Basic Variable Declaration Shortcuts
I am working on a project for a customer and the previous developer had used shrotcuts like ! , % , $, # when declaring their variables. I have never used these before and cannot find any documentation on these. Has anyone ever used them before It's the symbol postfixes that are there for backwards compatibility (e.g., !, %, $, ...), not the letter postfixes (also, the symbol postfixes can also be used in variable declarations instead of specifying the type explicitly). ...Show All
Windows Forms How to determine a control design mode?
Hello, how can I determine whether my control is in a design mode or not Let's say I want to have the background color blue in designer and red when my application is running. I know there is a "DesignMode" parameter for Component objects, but for Control Hey, you could obviously use the DesignMode of the parent form of the control. Otherwise you could create a custom control and with its code define its behaviour in DesignMode by calling this.DesignMode. ...Show All
Windows Forms Error launching Clickonce app from intranet
I have an app which is deployed on an intranet site. When I try to launch the <app>.application file, I get the error below. BUT, if I do a RUNAS and run under a admin user of the webserver, the app will launch. Running framework 2.0 Windows Server 2003 Here is the error: PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM.050727-4200) dfshim.dll : 2.0.50727.42 (RTM.050727-4200) SOURCES ...Show All
Visual C++ Passing struct as an argument to a thread pool worker
Hey guys.. I have a problem... It looks that it is a very common problem but still I cant find a way to solve it. I have a dll which contains a thread pool. Each function performed by the thread pool need several arguments to pass in. For this purposes I created a structure like this: typedef struct _tagWorkerFunctionParameters { char* url_ptr; char* ip_ptr; int port; THREAD_CALLBACK callback; // callback function int id; } WORKER_PARAMS, *PWORKER_PARAMS; each time the dll is called from the following function, a new job goes to the thread pool and waits for a free thread in a queue. extern "C" __declspec(dllexport) int r(char* url_ptr, char* ip_ptr, int port, THREAD_CALLBACK callback, int id ...Show All
Visual C++ I know that i can use LoadFromResource in CHtmlView to load resource in the web browser, but when I embedded a browser in the di
I know that i can use LoadFromResource in CHtmlView to load resource in the web browser, but when I embedded a browser in the dialog how can i get the .htm file in the resource I appreciate your help. Maybe you simply have to adjust your string using "\\" or "/" instead of "\" ...Show All
Smart Device Development DropDownList on Smart Devices
Hello I am developing a website application designed for smart devices (using .Net 1.1). I am having a problem with dropdown lists. When navigating to the website via a smart phone all the dropdown lists take a maximum of only 3/4 of the screen width. The data that I need to display is quite long and the customers agreed to have a horizontal scroll bar on the page, however, I can't achieve it. The HTML is: <table cellSpacing=0 cellPadding=0 width="100%" border=0> <tr> <td> <asp:dropdownlist id="lst" Runat="server"></asp:dropdownlist> </td> </tr> </table> The code behind is: Data ...Show All
