Hi. I made a windows program that I now want to be able to deploy. I know it is possible to do this easily in VS2003 but I don´t know how to do it. There are several options, aren´t there? Can someone help me? Thank you, F
naglbitur
Posts
-
Making a setup project in VS2003 -
stopping a threadHi. I am experimenting with threading and I made the following simple program: Thread blue = new Thread(new ThreadStart(bluebegin) ); Thread yellow = new Thread(new ThreadStart(yellowbegin) ); Thread red = new Thread(new ThreadStart(redbegin) ); blue.Start(); yellow.Start(); red.Start(); .... .... public void bluebegin() { this.BackColor = Color.Blue; Thread.Sleep(2000); yellowbegin(); } public void yellowbegin() { this.BackColor = Color.Yellow; Thread.Sleep(500); redbegin(); } public void redbegin() { this.BackColor = Color.Red; Thread.Sleep(3000); bluebegin(); } I don´t know how to stop one or all threads. I have tried adding to one of the methods : blue.Abort(); but then I am told that the namespace blue could not be found. Can someone please help me? Thanks, F
-
Splitting the contents of a page on 2 printed pagesHi there. I made an app that displays string, lines and stuff (the code is in Page_Load). I need a way to make sure that part of what is on the asp.net page gets printed on one page and part on another page. I thought that could be achieved by locating what I need way down with a high y value (above 1300) but it didn´t work. Then I tried saving the image on the hard drive and then print out but it didn´t work either, all still get´s printed out on one page (the first). How can I control what goes on the first page and what on the second page when the contents of my page get printed out on a printer of a user that visits my page? F
-
Saving an image to the hard drive.Hi. It just so happens that I have 2 hard drives, c and e. I changed the code to: bm.Save("e:\\mypic.gif",ImageFormat.Jpeg); and it made all the difference in the world :), the image appears on drive e. You were absolutely right!! Very impressive. On the other hand I don´t understand why this small change makes such a big difference? Do you have any suggestions on how I can make the pic save to c? F
-
Saving an image to the hard drive.Hi. I am not really following you:( If you are right, how do we fix the problem? F
-
Saving an image to the hard drive.Hi. If I comment out this line: bm.Save("C:\\mypic.gif", ImageFormat.Gif); I get no error reports but I want to save it to my hard drive. F
-
Saving an image to the hard drive.Hi. I am just running this on my own PC and I pretty much copied the code from a book to learn and modify later. Everything seems to be OK but when I right-click and choose view in browser I get: A generic error occurred in GDI+ and this line gets the red color: bm.Save("C:\\Mypic.gif", ImageFormat.Jpeg); This just doesn´t make sense:confused: F
-
Saving an image to the hard drive.Hi. I have created and image in the Page_Load event: Bitmap bm = new Bitmap(300, 300); Graphics g = Graphics.FromImage(bm); g.FillRectangle(brush, 50,50,100,100); g.DrawLine(Pens.WhiteSmoke, 10, 10,180,10); g.DrawLine(Pens.White,10,10,10,180); After the line drawing code I added: bm.Save(Response.OutputStream, ImageFormat.Jpeg); bm.Save("C:\\mypic.gif", ImageFormat.Jpeg); bm.Dispose(); g.Dispose(); I would like to be able to save that image to my hard drive but I haven´t been able to do that, can anyone help me? This compiles just fine but when I want to view it in the browser and an error occurs. What am I doing wrong? Can someone please show me the error of my ways? Thanks, F
-
Populating a ListBox with list of files in a folderHi. I got a bunch of strange errors but I think there must have been something wrong with the VS 2005 I am using because everything works very well in my VS 2003. It´s strange. Thanks very much for your help! By the way, you wouldn´t happen to know of some simple way of making an app stop working after a period of time. I finished making an app and I want it to only work until some day. It´s doesn´t have to be a bulletproof way as long as it is simple and works most of the time. I was thinking of perhaps making a thread that checks to see, for instance, if the year is 2007 and then it will disable some part (like the menus) of the app. How is this done if it is possible to do it this way. Thank you, F
-
Making an app not function after some timeHi. I was thinking about creating a thread that checks to see if year is 2007 and then disables something in the app. Is this possible? Perhaps someone can show me how this is done as it seems to be an easy way of doing this. Thanks, F
-
Making an app not function after some timeHi. Can you maybe elaborate a little more? Isn´t there some simple way of doing this? I was thinking of DateTime, perhaps creating a thread that checks to see if year is 2007 and then disables something in the program. Do you know how to do this? Thanks, F
-
how to decalare varibleHi. Judging from what I see your problem might be: a) The name of the variable is not OK. b) Variables are declared so: type var-name. Hope this helps.
-
Making an app not function after some timeHi. I am wondering how one goes about making an application not work after some time. I just made an app and I want it to work for a year and then the buyer needs to buy again. How do I do that? This is similar to how many companies do, they license their software for some time and after some time it stops working or something like that. How is this done? Thanks, F
-
Populating a ListBox with list of files in a folderThanks for your help. I pasted the code you pointed out into my code in VS 2005 and I got a bunch of errors that don´t seem to make sense. Is there a difference between VS 2003 and VS 2005 how this is done. Here is what I did and get loads of errors: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { public string FileName; //set directory and array Directory myDirectory; ArrayList values = new ArrayList(); //get files String [] files = Directory.GetFiles(@"N:\Myndir","*"); //iterate through list, replace path info, and add to the listbox //with the Add method. for(int i=0;i
-
Populating a ListBox with list of files in a folderHi. I am wondering how I can get a list of files in a folder on the server to appear on a webpage. I don´t know how to get the contents of a folder into a ListBox. Is there perhaps some other webcontrol that is better suited for this? This code I put in the Page_Load event: DirectoryInfo di = new DirectoryInfo(@"c:\somefoldername"); FileInfo [] fi = di.GetFiles(); foreach (FileInfo fiTemp in fi) ListBox1 By looking at the code you can see where I am stuck. Can someone please help me? Best regards, F
-
Passport AuthenticationHi. If I understood you right then this is relatively easy, there are special entries in either Machine.Config or Web.Config (these are xml files that VS automatically generates). Maybe you know what I am refering to? I hope this helps, F
-
VS 2003 and VS 2005?Hi. I have VS 2003 on my computer and I am wondering if I can install VS 2005 also on my computer without uninstalling 2003. Can I have both VS 2003 and VS 2005 on my computer at the same time? Thanks, F F
-
VS 2003 and VS2005?Hi. I have VS 2003 on my computer and I am wondering if I can install VS 2005 also on my computer without uninstalling 2003. Can I have both VS 2003 and VS 2005 on my computer at the same time? Thanks, F
-
Splitting up a pageHi there. I was hoping someone might be able to give me some help and/pointers. Is it possible to splitt an .aspx page into say 4 compartments. So when a user opens an .aspx page through the browser he/she will see 4 different frames. In one compartment the user is able to do this and this, in another that and that and perhaps in another part to run some program like a viewer for .pdf files? Is this possible? If so, how? Thanks, F
-
Disabling a program after a certain timeHi. As most or all of you fine folks know many software companies license their products to a user for a certain time. Let´s say a user bought a program a year ago and it expired today. Then it stops working. How is this done? I also assume that this feature needs to work on computers that don´t have an internet connection. Is there a thread in the program that checks to see if the time is such and such and then some features in the program are disabled? Thanks for your help. F