-
Forcing application focus
Date: 05/28/06
Keywords: programming, browser
I'm kind of new at the whole C#/Windows GUI programming thing, so sorry if this is a dumb question.
I'm working on a program and I want it to be able to launch links in an external browser. I found that you can use the Process class to do this, and if you even just hand the URL to the Process's "filename", it opens with whatever the user's default HTTP-handling application is. So I've got links launching in Firefox and everything, which is great. But I'd like it to send the link to be opened in Firefox without losing focus on my application.
I tried setting some of the Process.StartInfo members (like WindowStyle as minimized, even though that's not what I want) and then tried going about it the other way around, by just calling this.Activate() from the form that's calling the Process.Start() method, but that doesn't work either. Is there anything I can do to keep my application focused when launching a different process?
Source: http://community.livejournal.com/csharp/63983.html
-
Курсы по C#
Date: 05/25/06
Keywords: no keywords
Народ, изучаю язык C#, но понял, что одними книжками
не отделаешься. Подскажите пожалуйста, где в Питере лучше
пройти курсы по данному языку и стоит ли вообще записываться на курсы.
Заранее спасибо.
Source: http://community.livejournal.com/csharp/63445.html
-
C# book recommendations
Date: 05/25/06
Keywords: programming, web
Hi all,
I'm 3 days into a 5 day "essential .net 2.0" class and I'm looking for a book that covers the language a) well b) with simple examples and c) explains some of the .net weirdness. I've got a few years of C++ and other OOP, web programming, etc. It's not that I'm new to programming, but some of the things we're discussing in class seem bass-ackwards to me, in terms of how they're implemented.
I'd love a C#/.NET book similar to the "head first design patterns" style of writing. is there anything like that, that you'd recommend?
thanks
Source: http://community.livejournal.com/csharp/63223.html
-
zmlc 1.0
Date: 05/25/06
Keywords: software, html, xml
I just finished the beta of ZMLC, which can be located at:
http://www.mathgladiator.com/jeff/code.html
In a nutshell, the software lets me (and anyone that wishes) to define an object model in one large file. This file is compiled to produce C++ headers, serialization code to and from XMLjr, and serialization code to and from flat binary. Furthermore, a C# class library is built with the same behavior (except for binary serialization). My goal was to create a C# scene editor for a C++ scene graph that evolves constantly.
Anyone want to beta test?
Source: http://community.livejournal.com/csharp/62921.html
-
Enumeration conversion
Date: 05/22/06
Keywords: xml
I'm trying to utilize the System.Drawing.Drawing2D.HatchStyle enumeration in order to define a Brush type. The thing is, I need this to be dynamic in that I want to be able to change the HatchStyle changing a value in an XML file.
The XML looks somewhat like this:
System.Drawing.Drawing2D.HatchStyle.Weave
Anyway, I get the HatchStyle node but I can't get it to explicitly convert to the right type.
This is how I thought it would work:
System.Drawing.Drawing2D.HatchStyle objHatchStyle = (System.Drawing.Drawing2D.HatchStyle)Stylenode.InnerText;
but the line fails stating that it can't convert from type string to type HatchStyle.
Any ideas?
Source: http://community.livejournal.com/csharp/62496.html
-
Memory leak [Updated]
Date: 05/22/06
Keywords: no keywords
This might be a FAQ, but I couldn't find any help elsewhere.
In my current project, I wrote a PageControl class for navigation (we use the MVC pattern). It instantiates the new controller, gets its view and puts it on the form. The controller itself registers at some of the events of the data model, so if the data in the model changes, the controller can perform appropriate steps if necessary. If you leave a page, the controller and its view get dropped. If you go back, the controller and its view get instantiated again (due to some requirements in the project).
My problem is, that there is a memory leak. On the start page, there are some checkboxes, where a message box pops up, if you uncheck it. If you go back to the start page, the message box popped up twice. So I added an instance member of type DateTime, that gets the date and time of the instantiation. So I found out, that this messagebox gets shown by 2 different instances. (Going forth and back again adds another instance, so you get 3 message boxes.) But I can't find out who still keeps a reference to the old instances.
Is there a way to find out who references an object? Or is there a reference counter?
TIA
Update
I found the leak. The events, where the objects registered, keep the objects on the heap.
Source: http://community.livejournal.com/csharp/62228.html
-
Contracts?
Date: 05/19/06
Keywords: no keywords
Can anyone here link me to a place (free, if possible) that has things like sample contracts and agreement forms for programmers?
(x-posted)
Source: http://community.livejournal.com/csharp/62202.html
-
Architecture question
Date: 05/11/06
Keywords: software, asp, security
While the project to which this question applies is written in C#, this particular question is more of an architectural issue and less of a semantic/syntactic C# problem, for which I apologize. I was hoping I could still get some help.
In vague and general terms, here is my architectural problem du jour:
I am constructing a client-server application with a subscription model, in which the "server" component is an ASP facility owned/leased by my company. There are various levels of access granted to a given customer -- for the sake of simplicity, let's say there are two levels, "demo" and "purchased." The "demo" level allows the customer to run the client software on one PC at a time (I have the logic in the client and server software for this to happen, so it's not part of the scope of this question); the "purchased" level allows the customer to run the client software on some large number of PCs simultaneously. The application's value proposition depends somewhat on its large-scale deployability; it needs to be very simple for a "purchased" user to install the client-side software on a large number of PCs with very little effort or time investment. Therefore, a silent install is required -- an installation requiring absolutely no interaction from the user, aside from being launched. Progress/confirmation may be displayed, but no additional interaction would be required after launching the installation. I believe I can build such an installation mechanism without much weeping and gnashing of teeth, so that's not my question here.
The client software's mission in life is to transmit data periodically to the server, which customers can access to view the data in a valuable, money-saving, revolutionary fashion (that's the idea, anyway). However, the server needs a way to associate all of these clients' data streams with the computers from which they are originating, each time a transmission is made. This part is done -- using a series of hashes, the server is able to distinguish unique computer from unique computer when they transmit their data streams.
However, it is the next level of association with which I am having trouble. Each unique computer needs to be associated with one customer.
One solution I was imagining was a very computationally expensive process by which the registration of each new customer causes a recompilation of the MSI archive and setup application, bundling a new customer ID into the archive for each new customer. Then, when that customer downloads the client software to install on his target PC(s), the silent install notices this customer ID and transmits it with each data stream. The hashes I gather give me uniqueness among different computers within the same customer, while the customer ID gives me uniqueness among customers and ownership to each unique computer. However, this strategy would require the MSI compilation software installed on the ASP, which is a unique configuration that I'm not sure I could persuade many leased-ASP providers to support. "Someday," if the application is successful, I would have no problem colocating or owning the ASP myself, but in the beginning this would not be an option.
Another solution I can imagine is that each new computer the server notices that is not associated with a customer gets put in a pool of new computers, and the customers may select those computers which he wants to add to his account. Unfortunately, the type of this software would make such a model a vast security risk, so it is not an option.
Finally, I thought of a solution in which the customer is asked to provide details about the PC(s) he will be adding to his account, e.g. the public IP address from which they will be transmitting. However, this approach seems even more intrusive than asking the customer to type in a customerID every time he installs the client software on a local PC, so it's not feasible either.
Any of your help would be very much appreciated. Thanks for any thoughts or ideas, even if they're not completely fleshed out; they might give me the impetus I need to come up with a complete solution.
Source: http://community.livejournal.com/csharp/61406.html
-
Document Management Tool
Date: 05/08/06
Keywords: web
Hi, do anyone know of a Document Management Tool (other than Sharepoint)?
It must be web-based. There should be provision for loading documents on the web page, editing the document and saving it back.
Source: http://community.livejournal.com/csharp/60891.html
-
Website forms
Date: 05/08/06
Keywords: web
I'm making a client-side application that monitors the status of a website and reports what it finds. I have that part working, but now I need to add the ability to have my application automatically submit information through a form on the site (textboxes and submit button style.) I have no clue how to do this, any suggestions?
Thanks
Source: http://community.livejournal.com/csharp/60592.html
-
Business Objects
Date: 04/20/06
Keywords: software, web
I'm writing some inventory control software (still!) and I've got a question about how best to implement my business objects.
Basically, my question is, do my Business Objects themselves encapsulate the functionality of updating themselves? For example, should I have methods such as InventoryItem.UpdateToDB and InventoryItem.GetFromDB?
Does anyone here have some good website or book recommendations for these kind of questions? I've always been a good coder, but I'm never sure of my actual design skills.
Also, what is the best way to check foreign key constrains? Should I use some kind Relation class like a dataset has, or is there a better\easier\doubleplusgooder way?
Source: http://community.livejournal.com/csharp/59595.html
-
Myspace.com is hiring .NET developers!
Date: 04/19/06
Keywords: programming, software, asp, sql, web, yahoo, microsoft
They are hiring developers like crazy! Email your resume to myspacejobs@yahoo.com.
Job description: .Net Developer-ASP.Net and C# (1.1 and 2.0)
Social Networking is one of the hottest sectors on the web in recent years. MySpace.com has emerged as the definitive leader in this space and is the 2nd highest trafficked site on the Internet. MySpace has 210 employees and is in rapid growth mode.
The .NET Team at MySpace.com focuses on performance and scalability to a degree that most developers have never had a chance to experience.
Required Skills/Experience:
- 2+ years of solid C# experience
- 2+ years of ASP.NET (and the .NET 1.1 Framework) experience
- 2+ years of experience developing with SQL Server 2000 (including stored procedures)
- Strong knowledge of .NET Remoting (including HTTP and TCP/IP) and UDP
- a solid foundation in n-tier, Business Objects, Design Patterns, and general OOP
- Strong knowledge (and wisdom) of IIS6 and it's internals
- Experience on sites under heavy loads that require meticulous attention to coding practices as they relate to performance and scalability
Preferred but not required Experience:
- Microsoft Pattern and Practice Team's Enterprise Application Blocks
- Agile Software Development (including Extreme Programming)
- Microsoft Application Center Test
- LLBLGen
- NUnit
- nANT
- Visual Studio 2005 (including Team System)
- ASP.NET 2.0, ADO.NET 2.0, AJAX (Atlas), and the .NET 2.0 Framework
- SQL Server 2005 feature set, enhancements, and changes that effect developers
- ReSharper & dotTrace (from JetBrains)
Source: http://community.livejournal.com/csharp/59216.html
-
Return a value from Form B and use it in Form A.
Date: 04/18/06
Keywords: no keywords
I have asked this question before, in fact. But, being a moron, I am still not able to figure out how to do this, and searching MSDN for it is getting frustrating at best. (Please explain to me how the search engine sees "delegate" and points me to 250 walkthroughs on how to write a multithreadad app.)
I have Form A. I click a button on Form A. A dialog box, Form B, pops up. Form B contains nothing but a label, a datetimepicker, and buttons labeled OK and Cancel. The entire purpose of Form B is to get a date which it will then pass back to Form A, so Form A can use that date. For the sake of argument, we'll assign the date gotten from Form B to the variable thisDate.
I can't simply do:
thisDate = formB.dtpDate;
...because as far as form A is concerned, dtpDate doesn't exist.
When I last asked the question, I got some tantalizing hints about delegates and event handlers. Which seems a rather complex solution (if an instance of formB is created in the code for formA, it seems to me that formA's code should then have access to the data in that instance of formB by default-- but that's just me), but if someone can walk me through it, I'd appreciate it. I get the feeling this is something I'm going to end up using hundreds of times in the various projects I'm working on.
Thanks. And sorry for being so hard-headed.
Source: http://community.livejournal.com/csharp/58708.html
-
Вышел №56 рассылки .Net Собеседник
Date: 04/14/06
Keywords: html
http://subscribe.ru/archive/comp.soft.prog.dotnetgrains/200604/14091954.html
Source: http://community.livejournal.com/csharp/58070.html
-
Retrieving a ValueMember
Date: 04/13/06
Keywords: no keywords
Of course I'm not done with you yet...
So I have a datagridview. I'm trying to pull CurrentRow information. Normally, this is an easy process;
dgRates.CurrentRow.Cells[dgRates.Columns["clmProvID"].Index].Value
Now, here's the fun bit, and I hope it's just me overlooking soemthing stupid again.
I have one column (and will have more) that's a ComboBoxColumn instead of a TextBoxColumn. I need to extract the ValueMember instead of the Value. Cells[,] does not have a ValueMember function. Nor does Cells[,].Value. ComboBoxColumn does, obviously.
So how do I get it?
Thanks.
Source: http://community.livejournal.com/csharp/57764.html
-
asp.net 2.0
Date: 04/12/06
Keywords: css, html, asp
I am upgrading some 1.1 code to asp.net 2.0. The old code used stylesheets. The controls on my page that use css classes are fine after the upgrade, but the controls that i have hard coded the properties for are not. Its as though they are being overridden by a style sheet or some other unknown force. I have no css class specified for these controls, just set the properties on the html page, and I can't get it to show what I want.
Does anyone know why these hard coded properties are not showing up? What is overriding the settings?
Thanks for any tips.
Source: http://community.livejournal.com/csharp/57422.html
-
One DataView, multiple routines.
Date: 04/12/06
Keywords: sql
There has to be a better way to do this...
private void btnMarket_Click(object sender, EventArgs e)
{
DataView dvRates = new DataView(dsHospRates.RateData);
dvRates.RowFilter = "RateTypeID = 1 AND ProvID = " + cboName.SelectedValue.ToString();
dgRates.DataSource = dvRates;
}
private void btnContract_Click(object sender, EventArgs e)
{
DataView dvRates = new DataView(dsHospRates.RateData);
dvRates.RowFilter = "RateTypeID = 2 AND ProvID = " + cboName.SelectedValue.ToString();
dgRates.DataSource = dvRates;
}
private void btnMarket2_Click(object sender, EventArgs e)
{
DataView dvRates = new DataView(dsHospRates.RateData);
dvRates.RowFilter = "RateTypeID = 3 AND ProvID = " + cboName.SelectedValue.ToString();
dgRates.DataSource = dvRates;
}
What I want to do is instantiate dvRates somewhere higher up in the code, so each time a button is clicked, the data filters simply get changed instead of a new DataView getting instantiated. However, I can't find a single place where I can instantiate it like this. I've tried putting it in the designer, but I can't figure out what reference contains DataView; declaring it as System.Data.DataView, System.Data.SqlClient.DataView, System.Collections.Generic.DataView, and System.Windows.Forms.DataView all fail. Declaring it in Form_Load makes it private to Form_Load, so it's not recognized below (and I don't want to make Form_Load public). Declaring it outside a routine causes it to break because "An object reference is required for the nonstatic field, method, or property 'HospitalRates.dsHospRates.RateData.get'." Declaring it in public HospitalForm() gives me the same error. It works in the Button_Click events listed above, though.
Is there a way to do what I'm trying to do? Thanks.
Visual C# 2005 Standard.
Source: http://community.livejournal.com/csharp/57129.html
-
Storing quantities with units
Date: 04/09/06
Keywords: software
I am writing inventory software for a company that uses a lot of chemicals, with varying units for both the chemicals, and other things such as purity. Is there a better\more clever way to store the units of measure for such things than having something like an Amount column and an Amount_units column?
Also, instead of coming in g,, sometimes things come in packs or sets of (for example) 500 g (i.e., inventory would show 3 x 500g in human readable form.) Currently, I have it set up such that there is an amount column, which in this case would store the three, and a "quant" column (reflected that the item is quantized) that would store the 500. Is there a better way to do this?
Thanks, humans..
Source: http://community.livejournal.com/csharp/56436.html
-
New VS.Net file extensions
Date: 04/06/06
Keywords: software, asp, sql, microsoft, google
Hi,
I'm kind of new here and wasn't sure of where to post this since it pertains to Microsoft Visual Studio .NET 2003 itself and neither C# not ASP.Net
The project I'm working on requires me to work a lot on.pc and .pkg files (ProC and PL/SQL packages)
Now Microsoft Visual Studio .NET 2003 recognizes neither and I spent a long time on google trying to find out how to make it treat these files like C and SQL files respectively - basically do the necessary colorization - but with no result.
I finally found the solution after looking around in my machine's registry.
-
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\
That's where you need to add an extra key in the registry if you need your VS to recognize new file types.
Use the value from the existing file type whose formatting you want the new file type to have.
-
Works beautifully!
Just thought I'd post it here in case anyone else finds it useful. Posted to both aspdotnet and csharp. Do let me know if this is against community rules and I'll take it off.
Source: http://community.livejournal.com/csharp/56217.html
-
Data Grid Export
Date: 04/03/06
Keywords: no keywords
I'm Baffled.
I need to export a data grid to excel... seems simple enough...
but I don't want the whole grid returned, just what I see on the screen.
I can seem to figure out how to get what I'm looking at and not the whole dataset.
Help????
Source: http://community.livejournal.com/csharp/55548.html