|
ya i have installed .NetFrameWork 3.5..
and am installing this directly to the system...
|
|
|
|
|
So that means you are using VS2008 ?
And Did you create setup Project or you just build the project and take the exe that gets created in the bin directory ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
ya..what i did is..i have created a setup for that and that i put it in the other machine and run the set up to install... den i copied the exe in the bin and put in the sytem and tried running and got this error..
may be my approach is wrong
am new to c# and learning...
can u just tel me how to how to create the setup and wht and all i should do to the client machine to get it work?...
|
|
|
|
|
Thats was your mistake
Step 1
After you are happy with your application
Step2
Right Click on your Project and Add New Project,Go down to "others Project types" and look for a "SetupProject",
look at the path and make sure that its in the same directory as your Project and give it a name, just give it the same name as your Project but add something like MyProject_Setup.
Step 3:
At the Bottom of your Solution explorer you will see your setup Project and Right click on your setup project and select --> Project Output, You will see that automatically the name of the Project to be outputed will be displayed, just click ok.
Step 4:
In Visual Studio there is a Green Button that you use to run your program with , and next to it , the is an Option that is written "Debug", change it to Release"
Step 5:
Right Click your Application and rebuilt
Step 6:
Right Click your setup project and rebuilt
Step 7:
Go to your Application Folder(NOT in VS) and you will see that there is a Folder that has been created for you and it will have
a name like MyProject_Setup. Open it and Open the "Release" Folder and thats what you must take to the Clients computer and run a setup and your application will work.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
ok..Thanks for ur kind reply...let me try with ur steps...
|
|
|
|
|
am not getting that release option.... is there any way to set that?
|
|
|
|
|
ok now i have taken the setup from the release folder and ran in client machine....it got installed and only the dll of the application is created...am not getting any application file to run the application?...do i need to copy the other files from the bin/debug folder?...
|
|
|
|
|
I want to create sub table in sql server . can any suggest me the process.
|
|
|
|
|
What is a sub table ? Did you know we have a SQL forum ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
i have used ManagementObjectSearcher class for listing the drives...
there is no error but it does not display the output....
please can anyone check the code and tell me whether this approach is right...If not please tell me what is wrong with this...and what modifications should i do to get required drives in the server?
private void button1_Click(object sender, EventArgs e)
{
try
{
ManagementObjectSearcher mosDisks = new ManagementObjectSearcher("SELECT name FROM Win32_DiskDrive");
// Loop through each object (disk) retrieved by WMI
foreach (ManagementObject moDisk in mosDisks.Get())
{
// Add the HDD to the list (use the Model field as the item's caption)
listBox1.Items.Add(moDisk["Model"].ToString());
}
}
catch (ManagementException me)
{
MessageBox.Show(me.ToString());
}
}
|
|
|
|
|
Well, the biggest problem is that you didn't check to see if the call to mosDisks.Get() actually returned anything. You just went straight to enumerating the collection that is MIGHT have returned. In this case, your WMI query didn't work, or didn't find anything to return.
|
|
|
|
|
|
Hard to tell without seeing the code. If you are not creating new form object each time, it should retain all the controls and it's values.
Please post the relevant code.
|
|
|
|
|
It shouldn't reload the controls each time unless you are constructing an instance of it each time (i.e. AForm Form2 = new AForm()) or you are calling some other method which forces it to reinitialise (e.g. are you handling some event in Form2 which initialises the controls)
Easy to see - breakpoint at ShowDialog and trace in to see what happens. If you're not sure if it's the same instance of the form each time, set the title to be the current time in the constructor.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
I will set a break point and do a trace. I only create Form2 once. Form 2 only gets initialized once as well. However I can tell you that every time Form2.ShowDialog(this) is called it gets into my Form2_Load but when I call it using Form2.Show(this) it only gets into Form2_Load once.
Below is a sample of code that is creating and Showing Form2.
<pre>
public partial class Order : UserControl
{
public OrderEntry.UserControls.OrderOptions orderOptions = new OrderEntry.UserControls.OrderOptions();
public Order()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void setupButton_Click(object sender, EventArgs e)
{
if (this.orderOptions.ShowDialog(this) == DialogResult.OK)
{
}
else
{
}
}
}
</pre>
Below is a sample of Form2.
<pre>
public partial class OrderOptions : Form
{
public OrderOptions()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//Need to makes sure that all controls are enabled and disabled correctly.
if (this.printImmediately.checkBox1.Checked)
{
this.invoiceMsg.Enabled = true;
this.receiptMessage.Enabled = true;
}
else
{
this.invoiceMsg.Enabled = false;
this.receiptMessage.Enabled = false;
}
if (this.barcodeScanning.checkBox1.Checked)
{
this.stopInQuantity.Enabled = true;
}
else { this.stopInQuantity.Enabled = false; }
}
private void OrderSetup_FormClosing(object sender, FormClosingEventArgs e)
{
this.Hide();
e.Cancel = true;
}
}
</pre>
|
|
|
|
|
|
Well, I would think this is how it is meant to behave.
When you Show() a form, you may show and hide it, with the 'controlling' program deciding upon its visibility, but it is only Loaded the first time it is shown.
With a dialog form, you have to close it before continuing - so as it is closed, showing it again 'Loads' it.
I'm guessing you are hiding the dialog to save time in having to recreate it each time?
If you want to keep the values, set them up in the Form2 constructor - then they won't be set again - or add your own 'init' method which you can call when you want to initialise the form.
The bottom line is that the Load event is triggered when the ShowDialog method is used, so don't put code there when you don't want it executed every time.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Setting up the values in Form2's constructor fixed my problem. Thank you very much.
|
|
|
|
|
Not a problem - glad to be of help
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Hi,
I need to parse some text that's currently is in PDF-format so I'm thinking that converting it to text or html would be a good place to start.
There are a lot of PDF-component out there for C#, has anyone of you tried anyone and can tell me which once are doing a good job.
Thanks.
|
|
|
|
|
I have used PDFBox. But its in java. So you need to use iKvm.net to use PDFBox.dll in .Net. It has a class called PDFTextStripper which has a method called getText. But this will only work on Text PDF. It won't work on Image PDF.
But if it not that much taks you can use iTextsharp.
One more thing So far I have learned that iTextsharp is great for creating pdf and PDFBox is great for parsing/reading pdf.
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|
|
I tried iTextsharp but it really did a terrible job with my PDF so now I'm playing around with PDFBox and it seems to be doing a much better job.
|
|
|
|
|
The following is the exact message I am getting when running the application from Visual Studio 2005, trying to load a .dtsx package. I could not add a screen shot here. The code is so simple that I cannot understand what the path problem is.
Failed to open package file "\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
The. ,dtsx package and code are both located on the server. I can run the .dtsx package fine in BIDS and get the required result. When the code runs to the line "pkg = app.LoadPackage(pkgLocation, eventListener);" that is when I get the "Failed to open package file" error.
Below is a re-posting of the actual code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace DocBeaEntry
{
class MyEventListener : DefaultEvents
{
public override bool OnError(DtsObject source, int errorCode, string subComponent, string description, string helpFile, int helpContext, string idofInterfaceWithError)
{
// Add application-specific diagnostics here.
Console.WriteLine("Error in {0}/{1} : {2}", source, subComponent, description);return false;
}
}
public class clsSSIS
{
public static void RunDTSX()
{
string pkgLocation;
Package pkg;
Application app;
DTSExecResult pkgResults;
MyEventListener eventListener = new MyEventListener();
pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
app = new Application();
pkg = app.LoadPackage(pkgLocation, eventListener);
pkgResults = pkg.Execute(null, null, eventListener, null, null);Console.WriteLine(pkgResults.ToString());
}
}
}
|
|
|
|
|
Try changing:
pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
to
pkgLocation = @".\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
|
|
|
|
|
unfortunately, I came up with the same error. I just cannot understand what I am doing incorrectly. It has to be caused by something on the server somehow. I actually have the asme code in Vb and it works just fine but the c# code does not want to work past this line.
pkg = app.LoadPackage(pkgLocation, eventListener);
I have tried the following for the pkglocation,
they all give me the same error:
Failed to open package file
pkgLocation = @".\Serv37\M:\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
pkgLocation = @"\\Serv37\M:\wwwroot\AS-
MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
pkgLocation = @"\\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";
pkgLocation = "\\Serv37\\wwwroot\\AS-MIS\\LoadBeaPayroll\\LoadBeaPayroll\\package.dtsx";
Any more suggestions anyone?
|
|
|
|