|
Yes, the readability has increased a lot.
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
|
|
|
|
|
Some more comments, out of the blue:
1. if you create instances of a class that has a Dispose() method(such as Graphics, Font, Pen, Brush), you should call it when done with the objects.
2. you should avoid creating objects inside an event handler that is going to be called often; say you need a few brushes, just create them once and keep them around.
3. There are a whole lot of stock objects available at no extra charge, see classes such as Pens and Brushes . (and no, you don't dispose them, they aren't yours, you just borrow them).
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
|
|
|
|
|
Hi,
RegistryKey.openSubKey("KeyName",true) working in windows XP , but it is not working in
Windows 7 32 bit. we are getting error : no rights to read.Please suggest me better way
|
|
|
|
|
I have just tested it with Win 7 from the MSDN example, and it is working fine. The MSDN site recommends using
Registry.CurrentUser.OpenSubKey("yourKeyName", true); maybe that is an issue.
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
Windows, since Vista, protects those entries that affect all users, so you can't just access some of the hives (e.g. LOCAL_MACHINE) any more, unless you get the required privileges and go through UAC. I don't have all the details, I suggest you Google. The CURRENT_USER hive works just fine.
And the way the protection works is different on 64-bit systems, I haven't figured that one out at all.
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
|
|
|
|
|
Luc Pattyn wrote: The CURRENT_USER hive works just fine.
Unless you're running an app over the network on a terminal and/or VPN.
At least, it wouldn't the current user access the HKCU hive when remoting in on the systems here.
|
|
|
|
|
hi
is there any way to make Silent installation to my C# program - on Visual-Studio 2008
(i mean that i dont want that when the user install my program he will need to press next->next...)
thanks in advance
|
|
|
|
|
Do you need an installation at all?
if the right version of .NET is present, and your app doesn't need "all user" access in the registry and/or in the file system, then chances are copying its files (exe, dll's, config) to some folder on the local disk is all it takes to make it executable.
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
|
|
|
|
|
Or you can just make a normal .MSI install and install it with
msiexec /i myinstaller.msi /qn
|
|
|
|
|
Hi
I am using OleDbDataAdapter to read an excel file from harddisk. Like
using (OleDbConnection conn = new OleDbConnection(strConnectionString))
{
conn.Open();
using (OleDbCommand cmd = conn.CreateCommand())
{
cmd.CommandText ="SELECT [ATA], [SID], [Equipment] FROM [Sheet$] ;
try
{
using (OleDbDataReader reader = cmd.ExecuteReader())
{
FieldInfo fi;
bool bsave = true;
while (reader.Read())
{
...
}
But the names of columns are in the second row.
How can i write that query.
excel sample data how it looks ( see picture with this message )
http://imageshack.us/photo/my-images/96/excelo.png/[^]
Please help
With regards
|
|
|
|
|
I copy and paste only the part of the sheet I need to another sheet and use that. This also allows me to clean up the data a bit first without altering the original sheet.
|
|
|
|
|
Good idea, can you give me some lines of codes or something to help ?
|
|
|
|
|
You don't need any code to Copy and Paste from one spreadsheet to another.
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
Hi
Actaully from my system I used the below code and it works fine as a local Report. But my program has to be accessed by 2 more users on network. For that I have no any idea, what else I need? May be I need to install anything on my sqlserver installed machine in network? or I have to install reportviewer to my users system ?
And any sample code for that?
Any Guidences will be happy.
reportViewer1.RefreshReport();
Microsoft.Reporting.WinForms.ReportDataSource VehRDS = new Microsoft.Reporting.WinForms.ReportDataSource();
RepDS.Name = "DataSet1";
RepDS.Value = MyDataTable1;
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(VehRDS);
reportViewer1.LocalReport.ReportPath ="C:\\Documents and Settings\\...\\My Documents\\Visual Studio 2010\\Projects\\MyProject\\My_Report.rdlc";
reportViewer1.RefreshReport();
reportViewer1.Visible = true;
I tried by the below code
reportViewer1.ServerReport.ReportPath = "//Mysever/MyProject/Expence_Report.rdlc"; And I copied my report to that server folder And I tried. Is it correct or some other way?
Thanks For The Ideas & Guidences
Thanks and Regards
PARAMU
modified on Thursday, June 2, 2011 7:50 AM
|
|
|
|
|
Hello Experts,
You knows every body can do the programming if they spend some years for programming. But they can not do the systematic programming.
Guess : I have a requirement of School Management System Software.
So i want to know that where to start the project. and Which methods to declare in interface.
Thanks
If you can think then I Can.
|
|
|
|
|
eg_Anubhava wrote: So i want to know that where to start the project. and Which methods to declare
in interface.
Well, one thing good developers know is that you never start off by worrying what methods to declare in the interface. A good developer will normally start off by trying to understand what the problem is that they are trying to solve. Talk to users. Gather requirements and flesh them out. Ask questions and attempt to get consensus of what you are going to deliver. In other words, start off at the design stage. Do not attempt to skip this step. Even Agile methodologies still have an emphasis on the design phase - there is no subsitution for this step. Now you know where to start.
|
|
|
|
|
eg_Anubhava wrote: But they can not do the systematic programming.
The what?
|
|
|
|
|
|
ismail20 wrote: help me ?
No. I have no idea what you are trying to accomplish. Are you trapped in a jam factory just waiting for someone to unlock the door?
|
|
|
|
|
Huh?[^]
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
|
|
|
|
|
What application?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Okay, so I'm trying to be a good .Netizen here, but I've been fighting with non-descript errors and no clear answer as to what approach to take. I'm trying to use Database first, but I'm getting nowhere fast.
I want to take advantage of the free client-side validation in ASP.NET MVC3, but this seems completely lost when using EF.
Am I missing something? Even a simple thing - like nvarchar(6) - is being overlooked. The tool-generated code doesn't spit out things like [StringLenght(6)] (from System.ComponentModel.DataAnnotations) so it seems that you've lost all client-side validation, no?
Is there a way to turn it on?
To have the EDMX generate the appropriate attributes?
To track down the so-called "magic unicorn" and ring it's silver-blood-filled little neck?
end slash venting.
|
|
|
|
|
Hi,
I am trying to send a big file over a TCP connection using NetworkStream and TCPClient. Both the client and the server is written in C#.
There is no problem while transferring small files around the size of 300KB. My buffer size is 2KB and here is how the protocol works.
-Server requests the file.
-Client tells the server the size of the file, and then sends the first 2KB of it.
-The server asks for another chunk of the file -like, send 2KB data, starting from 42649-
-Client sends the chunk
-Server asks for more, and client sends it...
-When the end of file is reached, the client acknowledges the server that transfer is complete.
Without looking at the code, since it is too long to be posted here, can you see any possible problems that may be causing this problem? I even tried sleeping the thread while receiving and processing the incoming chunks of data.
Regards
|
|
|
|
|
You haven't even said what the problem is.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Yeah, sorry about that.
While I am trying to transfer the data, it is stuck at some point. The server doesn't make any other requests and hence, the client doesn't send any more data.
I have no idea why nothing new happens.
|
|
|
|