|
You can try creating a Installer project using Visual Studio. That'll result in a nice setup file that will also install the .NET framework if it is not available.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Creating an Installer is alright, but will it not mean a huge size distributable file because the Installer (bootstrapper) will add about 1MB to 2MB size, whereas .NET framework installation facility may add another about 15MB to 20MB (as the .NET framework size is that much)?
So, a small assembly of say 30 KB will become a distributable file of several MB.
But, the question is will there really be so much addition to the size?
|
|
|
|
|
hi all,
I know that How to register a event..
suppose that ,I want to register Load Event..Then we can do it like this:
this.Load += new System.EventHandler(this.Report_sessions_Load);
But How Do I unregister a Event using C#?
Thanks in advance..
|
|
|
|
|
yeah I hear this stuff isnt in the docs at all, and certainly isnt intuative
this.Load -= new System.EventHandler(this.Report_sessions_Load);
|
|
|
|
|
|
There seems to be alot that you require on users machine to run a C# dll addin. You must install .Net framework, Office PIA's and then your own C# dll. Complicated for a user to do. Is there any simplified way around this complication, using install shield for instance. Also my project requires the extensibility.dll which does not come with .Net framework it appears. Do I have to include this in my C# dll setup project.
Cheers
Mit Semaj
notsnoj
|
|
|
|
|
Hi allllllllll
How can I create report in HTML fromat in C#
Thanks
|
|
|
|
|
<br />
Response.Write("< html >< body >");<br />
Response.Write("report");<br />
Response.Write("< /body >< /html >");<br />
Jeff Martin
My Blog
|
|
|
|
|
I have Form1 and call a thread. How to set the value of an edit box in Form1 from the thread(class DownloadThread). Thanks.
public class Form1 : System.Windows.Forms.Form
{
private void btnGO_Click(object sender, System.EventArgs e)
{
DownloadThread dwThread=new DownloadThread(str,1);
Thread thread=new Thread(new ThreadStart(dwThread.GetStream));
thread.Start();
}
}
public class DownloadThread
{
public void GetStream(string str,int dLevel)
{
}
public void GetStream()
{
}
}
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
Pass an instance of the edit box to your download thread class. Also keep in mind you cannot modify a Windows Forms control like and edit box from a thread other than the GUI thread. Use Control.Invoke or Control.BeginInvoke to marshal a call back to the original thread.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
Hello, i'm using a dataGrid in my application to load in data from an access database. The data is loading in fine and all, i'm just looking for a means of having each column resize automatically to fit it all in on the screen. For example i have a details column that when normally viewed you can't see all the details until double clicking the column divider at the top to resize it to fit the data.
I'm just after a means of getting it to automatically resize rather than having the user need to double click the column divider to have it resize.
Thanks In Advance,
Bryce.
|
|
|
|
|
Only Microsoft knows why this little feature was ommited from the 1.0 and 1.1 Framework DatGrids, but here[^] is an aritcle on MSDN that demonstrates how to do it. It's in VB.NET, so it shouldn't be too hard to convert the code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I am trying to run an .exe application using RunAs. I don't know how can RunAs handle the exception of the exe application I want to run.
Can you guys give me a hint?
Thanks so much.
|
|
|
|
|
|
Could you please be more detailed?
Where should i search?
Thanks
|
|
|
|
|
Hi,
I am developing a C# application, that has display the list of classes, methods and properties from a .jar file and .class file (created in java). How to accomplish this?
Thanks and Regards.
|
|
|
|
|
AFAIR, Jars are compressed archives in a standard format (ZIP, I think), which contain a manifest.
You should be able to use most open archiving libraries (but check on the format first).
Cheers
Sid
|
|
|
|
|
This is the actual exception/stack trace:
An unhandled exception occured in the program
The type initializer for "RDC.Global" threw an exception.
The root element is missing.
The exception was thrown by System.String get_DataLocation()
at RDC.Global.get_DataLocation()
at RDC.FileManager.get_Location()
at RDC.Album.ReadXml(String albumName)
at RDC.DetailsAlbum.set_AlbumName(String value)
at RDC.DetailsPane.InitializeComponent()
at RDC.DetailsPane..ctor()
at RDC.MainForm.InitializeComponent()
at RDC.MainForm..ctor()
at RDC.MainForm.Run()
at RDC.MainForm.Main()
the property looks like this:
return Environment.GetFolderPath( Environment.SpecialFolder.Desktop );
and it's only happening on one notebook, but I really want to figure out why. Putting that code into a new program, and running it so it comes up in a messagebox, gives a messagebox with the path to the desktop ( on that particular notebook ).
Furhter, this is the calling code in FileManager.get_Location
Logging.Log("Getting Location");
string link = Path.Combine( Global.DataLocation, Consts.LocalPhotoFolder );
Then the property looks like this:
public static string DataLocation
{
get
{
Logging.Log("Getting Data Location");
try
{
string retval = Environment.GetFolderPath( Environment.SpecialFolder.Desktop );
Logging.Log("Returning " + retval);
return retval;
}
catch (Exception e)
{
Logging.ForceLog("Environment.GetFolderPath failed");
Logging.ForceLog(e.Message);
Logging.ForceLog(@"returning c:\ as default");
return @"c:\";
}
}
}
Here's the kicker - my error log contains "Getting location" - it does NOT contain "Getting Data Location". So the error seems to be trying to find the property to access it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Try using "DesktopDirectory" instead of "Desktop", i.e., try using the following code and see if it solves your problem:
return Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
|
|
|
|
|
I've got a question: Is you Log file being opened, written, flushed, and closed every time you write to it? If not, you're could be losing at least one line at the bottom of the log.
Environment.SpecialFolder.Desktop returns the virtual folder, which might not exist on that notebook. This could be because of some rights issue or a COM screw up for the Desktop.
I hate to say to it , but the first thing I'd do is garantee that your getting the physical path to the current desktop folder with
SpecialFolder.DesktopDirectory. <br />
<br />
It looks like <code>Global.DataLocation and/or Consts.LocalPhotoFolder didn't return what you thought they should. You might want to add a little code to debug those return values.
Logging.Log("Getting Location");
Logging.Log(" GDL=" + Global.DataLocation);
Logging.Log(" LPF=" + Consts.LocalPhotoFolder);
string link = Path.Combine( Global.DataLocation, Consts.LocalPhotoFolder );
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
I've got a question: Is you Log file being opened, written, flushed, and closed every time you write to it? If not, you're could be losing at least one line at the bottom of the log.
I have a helper function to make sure that a flush occurs every time, but a close does not occur every time, no. Surely flush is all I need ?
Dave Kreskowiak wrote:
Environment.SpecialFolder.Desktop returns the virtual folder, which might not exist on that notebook. This could be because of some rights issue or a COM screw up for the Desktop.
Thanks, I got that and tried DesktopLocation, it still crashes.
Dave Kreskowiak wrote:
but the first thing I'd do is garantee that your getting the physical path to the current desktop folder with SpecialFolder.DesktopDirectory.
Wrote a little app that does exactly that, it works fine on the notebook, brings up the path in a message box.
Dave Kreskowiak wrote:
It looks like Global.DataLocation and/or Consts.LocalPhotoFolder didn't return what you thought they should.
I logged Consts.LocalPhotoFolder, it's a const string anyhow, it was what I expected. Global.DataLocation does not appear to ever be entered. I think it's a problem with initialisation of a static object.
Dave Kreskowiak wrote:
Logging.Log(" GDL=" + Global.DataLocation);Logging.Log(" LPF=" + Consts.LocalPhotoFolder);
LOL - did exactly that yesterday, but the other way around ( as I expected the DataLocation to be the problem ). Got the localphotofolder, and then the usual crash. The thing is, all of the Global.DataLocation property is now in it's own try/catch, which doesn't rethrow, and logs something completely different. The try/catch is never entered, the exception is thrown by attempting to access the property, not within it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Can anyone point me to a good way to draw a usercontrol inside a listbox over and over again? What I mean is to insert something like a panel (with stuff on it obviously) inside a listBox and have that be displayed instead of some random strings (I've tried inserting it and I get random strings...I honestly don't remember what though). I REALLY don't wanna have to draw everything with GDI+ so if anyone knows a way to do that, I would appreciate it greatly. Note: It can also be a listview - either will do fine. I haven't found anything on CP that shows how to do that, so if there is something, please point me there. and forgive my stupidity.
|
|
|
|
|
Mmm cool idea, a ListBox for controls.
Off the top of my head, you'd create the controls say, Panel s, as children of the ListBox , and depending on the scrolling, move the controls that should be visible to somewhere inside the visible area of the ListBox .
You'd have to write some code for the scrolling, and managing of the controls, but you can let them paint themselves.
And don't forget to write an article for CP once you're done.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I've got a program with a function that contains this line of code:
return Environment.GetFolderPath( Environment.SpecialFolder.Desktop );
that's the whole function. It's fine on my machine, but blowing up on the client, with an error about a root node being missing. Does anyone have any ideas ? He reckons it crashes on multiple machines. I have a try catch around the main function, that writes the call stack and error message to a log file.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Try using "DesktopDirectory" instead of "Desktop", i.e., try using the following code and see if it solves your problem:
return Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
|
|
|
|