|
MemberDotNetting wrote: I also found on this blog template studio 2010 but how add it.
This[^] blog might help you to work that out. If not, then I found that by using vs2010 how to add a template as a search phrase in my favourite search engine. It gives over half a million hits, give it a try.
Henry Minute
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
Cogito ergo thumb - Sucking my thumb helps me to think.
|
|
|
|
|
Hi,
I would like to add a small box with ads (configurable by admin) on a Windows Application.
Has anyone tried one?
Thanks.
|
|
|
|
|
Telerik offers an adrotator for Windows Forms - see here[^].
This behaves similar to the image adrotator control that is used in ASP.Net to display various add images as a user is viewing a page.
Other than this, you can use a picture box and a timer to build your own simple adrotator custom control that you can plugin to your application.
|
|
|
|
|
My task is to convert an existing PHP application into a C# windows forms application. The PHP application displays report based on several criteria. This report is a mix of some text and some tables all stacked and centered in the form.
Please suggest how I can do this in a C# desktop application.
|
|
|
|
|
Bastard Programmer from Hell
|
|
|
|
|
Instead of a table, you will need to use a datagridview to show data in a tabular format.
Text can be displayed in a text box.
|
|
|
|
|
Hi Guys,
I have a suite of applications that create simple log files for errors, etc. One of the applications must run with Administrative privileges.
requestedExecutionLevel level="requireAdministrator"
When it creates the log file, it sets permissions so that the other apps can't write to it.
Is there a way to open or create a text file and specify that it should be available to all users to read/write?
Thanks...
|
|
|
|
|
If you are asking if multiple apps should write to one "log" file then that probably isn't a good idea.
If your log file exists to provide information to you, a developer, so you and not someone else, can figure out what happened when the application failed then each application should have its own log file.
|
|
|
|
|
As I said, this is a suite of applications that work together. That's why the log is shared. It allows end users to provide information to technical support about when and where whatever happened.
I'd like any user to be able to open it for read/write.
|
|
|
|
|
Steve Harp wrote: As I said, this is a suite of applications that work together. That's why the log is shared. It allows end users to provide information to technical support about when and where whatever happened.
Then I can only repeat what I said - it isn't a good idea to share the same file.
I base that on 20 years of using logs.
|
|
|
|
|
Hi Steve,
I'm afraid I'm missing something here. Yes, when an application creates a text file it can control the permissions of the file, just as the administrative-privelege application does. That application would need to create the log file with different priveleges allowing "world" read/write access.
If that's not possible, an administrative user could change the permissions of the file after it is created, but that an operational issue rather than a programming issue.
BDF
I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be.
-- BillWoodruff
|
|
|
|
|
|
Excellent! That put me on the path.
Thanks very much....
|
|
|
|
|
Hi All
This has been drving me insane. I have a user control that I am adding and removing controls from and want to see what it looks like on the main form. When I goto the main form the updates are not there. The same thing happens when I run the solution. Taking the control off and putting it on again doesn't work. Shutting down visual studio 2008 and re-opening it causes me to loose all of my changes. I found this article here[^] but it didn't fix my problem. I even deleted all copies of the dll I could find, checked the auto populate setting and when I went to the Choose Items... dialog, there was a reference to the dll in there as before.
The form and user control are in the same DLL within the solution. Is there any way around it? Should I structure my project differently?
Thanks for your help in advance
The FoZ
|
|
|
|
|
A bit harsh, but this should do the trick;
- Right-click on the toolbox, and choose "Reset Toolbox".
- Right-click on the toolbox, and choose "Choose Items.."
- Select "browse" to navigate to the assembly containing the UserControl.
Bastard Programmer from Hell
|
|
|
|
|
Closing Visual Studio and losing your changes without a prompt is really strange. I think Visual Studio is corrupt.
Does it update if you close the user control and main window, then build and reopen the main window?
If so go with that.
"You get that on the big jobs."
|
|
|
|
|
That seems to be working thanks. Although I'm not sure if the Easter Break has done my PC some good.
I'll make sure everything is update to. Hopefully my 2010 installation is causing any troubles.
Cheers
The FoZ
|
|
|
|
|
I’m using Visual Studio 2010 on Windows 7
I’m trying to write a log file in one program while reading the same log file in a second program.
The first program receives data from a server every minute from second 0 through second 5.
I want the second program to sleep till 30 seconds after each minute, read the traces from the first program’s log file, and display any warnings.
I found a post on the web saying I should open the file in program 1 as:
_logStream = new FileStream(logFileName, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
_logFile = new StreamWriter(_logStream);
Then open the file in program 2 as:
var _logStream = new FileStream(filename1, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
var xyz = new StreamReader(_logStream);
But I get the error message:
Unhandled Exception: System.IO.IOException: The process cannot access the file '
C:\SandBox\120405133716.log' because it is being used by another process.
Can this be done in Window's 7 ??
If so, what is the proper code ??
|
|
|
|
|
I don't like textfiles as a buffer. I'd switch to a database, and do insert's and selects - that would also solve the problem of simultaneous access.
Bastard Programmer from Hell
|
|
|
|
|
|
No. The only code you're going to get is the code you write.
We're not in the business of handing projects out to everyone who demands them. We're in the business of helping you with your own code.
|
|
|
|
|
Dave Kreskowiak wrote: No. The only code you're going to get is the code you write.
Perhaps Chris should rename the site, The Codes Project.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
or perhaps the CODEZZZ URGNNTZZZ!!!! PROJECT
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Quote: codes for the note pad
Is that supposed to mean something?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
1. Press the windows key + R.
2. In the dialog that appeared, type in the code "notepad" (without quotes)
Notepad launches.
V.
|
|
|
|