Jump to content
Xtreme .Net Talk

joe_pool_is

Avatar/Signature
  • Posts

    512
  • Joined

  • Last visited

Everything posted by joe_pool_is

  1. I have some code (VC++) with the following line: __set_app_type(_CONSOLE_APP)Obviously, this sets the application type to a Windows Console Application. But how could I set it so that this window (which only displays debug information) is minimized? It is unnecessary once the main program gets rolling, but it is the window that calls the main program.
  2. Problem Solved For those interested in the solution: Some of the downloaded project files that needed to be compiled had their settings configured to run in multi-threaded mode whereas others specified single-threaded mode. I went back into all 6 of my supporting projects and set them all to the same mode (single-threaded), and recompiled them all. Just added the new avitar today. It isn't great, but it's hard to find something that's less than 75x75 *and* less than 14k. I guess I could have created one especially for this, but I'm a better programmer than a graphics art guy. How do the rest of you do it?
  3. I have VS.NET 2003, and the list of Projects under my Start Page shows my most recent projects - or so one would think. Whenever I open one of these projects and work on it, the "Modified Date" listed on the Start Page does not change. Also, if I open an existing project on my computer using "Open Project", it does not get listed in the list of my most recent projects. The only way I can seem to get a project to show up on the "Open an Existing Project" list is if I use the "New Project" button to create a new one. Is there a setting somewhere that I can adjust so that my Projects tab on the Start Page will show a more acurate picture of my recently modified projects? I have had VS.NET 2002 and VS.NET 2003 running on several different PCs, and this doctrine seems to imbue them all.
  4. I have a freeware project I am trying to build in Visual C++ .NET called DOSBox. To build it, I first had to compile several other freeware projects that were required to work with it. I have now spent about 4 days working on this, but I am stuck with the following message: fatal error LNK1181: cannot open input file 'zlib.lib' I have compiled a fresh zlib.lib file, I have it referenced in the "Project | Properties | Configuration Properties | C/C++ | Command Line", and even added a Reference to it in the Solution Explorer. Why can't the linker find this? How can I help fix this problem? Any help would be appreciated. I am originally a VB.NET programmer, but I am starting to get into C++ - so the answer could be a simple one that I just don't know where to go to find the solution.
  5. So, using "RegisterClientSideScript", something like: theBody.Attributes.Add("onload", "myAction()");might enable me to "mix" my client/server side functions? I'll have wait until later to look up "RegisterClientSideScript" - I am allowed "Borland only" here at work. Your btnSubmit has an ASP.NET tag in the html page, but all my body tag has is id=theBody. Currently, I write to span's InnerHtml using the body's onload and the hyperlink's mouseover events in JavaScript. This leaves my work exposed for others to grab, and I have to write different versions for IE and Netscape. Using C#, I want to try varybycustom="browser" so that .NET will taylor its output to the particular browser. That would save me a LOT of time in development.
  6. I wrote some code in C#: <%@ Page Language="C#" %> <script runat="server"> void myAction(Object Sender, EventArgs e) { if (Sender.Equals("theBody")) { testArea.InnerHtml = "The body works."; } else if (Sender.Equals("myLink")) { testArea.InnerHtml = "The link works."; } } </script> <html> <head> </head> <body id="theBody" onload="myAction" runat="server"> <asp:Hyperlink id="myLink" onmouseover="myAction" runat="server" NavigateUrl="" Text="Test" /> <span id="testArea" runat="server" /> </body> </html> ...but this gives me an error in Internet Explorer, saying "Error: 'myAction' is undefined". When I select "View Source", obviously the C# script is not displayed. How can I allow my C# code to be accessed by the form? Does anyone even understand what I am trying to ask? Is this possible in ASP.NET/C# ... or whatever you want to call it.
  7. Okay, I got this to work: void Page_Load(Object Sender, EventArgs e) { HttpCookie cookie = Request.Cookies["userCookie"]; if (cookie == null) { cookie = new HttpCookie("userInfo"); cookie.Values.Add("userName", "jdoe"); cookie.Values.Add("realName", "John Doe"); cookie.Values.Add("lastVisit", DateTime.Now.ToString()); cookie.Expires = DateTime.Now.AddDays(365); cookie.Path = Server.MapPath("/"); Response.Cookies.Add(cookie); } else { if (cookie.Value.ToString() == "") { loginPanel.Visible = true; } else { // if userInfo is found in the database welcomeName.Text = "Welcome back " + cookie["realName"].ToString(); welcomePanel.Visible = true; } } } Just posting this to help others that might browse here looking for solutions.
  8. Someone please show me how to *create* subitems (or subkeys) for my cookies. I have found code out there for doing this in VB.NET, but I can not seem to get it to work in C#. Here is what I have:void Page_Load(Object Sender, EventArgs e) { HttpCookie cookie = Request.Cookies["userCookie"]; if (cookie == null) { cookie = new HttpCookie("userInfo"); cookie.HasKeys = true; // this bombs: HasKeys is read only cookie.Value["userInfo"]["userName"] = "jdoe"; // this bombs. Why? cookie.Value["realName"] = "John Doe"; // this bombs, too. Why? cookie.Value["lastVisit"] = DateTime.Now.ToString; // can't get this far cookie.Expires = DateTime.Now.AddDays(365); cookie.Path = Server.MapPath("/"); Response.Cookies.Add(cookie); } }
  9. Never mind. PlausiblyDamp's link has all the info I needed.
  10. external file(s)? First, my apologies for over stepping the bounds in my colorful metaphors above. I simply wasn't paying attention. How to create CSS scripts seems straightforward enough, but I have never used a separate file for holding my scripts. Would the separate file need to begin with <html><script> (( other code here )) </script></html> or simply start with the first line reading ".style"? Web pages are a hobby of mine, but I've never included a separate text file for either JavaScript or CSS scripts. Thanks for the links, too! I will certainly be exploring them.
  11. In the ASP.NET environment using VS.NET, there is a WebControl Appearance Property called CssClass that I have always been curious about how to use. (Similarly, the Properties for things like the <BODY> tag include Style elements.) I searched all of this forum, but only found one instance of someone asking about CssClass. I went to MSDN's site, and I was able to find what CssClasses are for and how to create them, but not how to use them in my ASP.NET classes using VS.NET. Are there any good links out there that I could look into for tutorials or examples? Could someone tell me in a nutshell how to use this property and how to create the CssClass? I assume it is a separate file for the project, but I hate to ***-u-me. Any pointers from those "in the know" would be greatly appreciated.
  12. Could there be an IsPostback() function calling it?
  13. This is old DOS and Borland C 3.1 stuff, but there are no decent boards for things like this. Maybe some of you more experienced programmers (aka Old Timers?) can lend a hand for me. Basically, I need to create a routine that allows me to write and update values on a flash-disk that is being used as our hard drive that runs on ROM-DOS v6.22 (ROM-DOS is almost identical to MS-DOS, but most of the extra features have been reduced to allow it to easily fit into Flash media such as we use). We are programming in Borland C 3.1, and the included fopen() and fprintf() do not work for our purposes because they call on DOS functions. Our programs run in DOS Protected Mode (DPMI) to allow us to create interrupts, but the DOS functions disable DPMI for an undetermined amount of time until they have completed. DOS has no "I'm done now" flag to check, so we do not know how long our interrupts are being disabled. Our programs are written for deap sea drilling rigs and mining equipment, so disabled interrupts present hazards to workers and equipment. Can anyone think of a solution that would allow us to write to our sectors to save data? I have looked up information on FATs, because I will probably have to write my own, but I have not found out how to determine where a given file resides (sector, offset) on my hard drive or how much room it has that I can write to prevent me from clobbering other files on my drive. Does any of this make sense? Where should I go for answers? Regards, Joe
  14. I am trying to install the Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release A. The ReadmeMSDE2000A.htm file gave me the message that I needed a strong password as described in the Microsoft Knowledge Base article 322336. I followed this link to find out how to do this. It told me to enter "osql -U sa" at the command prompt. I did this, but my returned message was: 'osql' is not recognized as an internal or external command, operable program or batch file. There was nothing telling me what I should do in this event. What now? Obviously, I need to install osql, but I don't know what that is, or if there is something else that might be required with it.
  15. 1. Please define the difference between an ActiveX component and a DLL file. 2. What is meant between "in process" and an "out of process"? 3. How is unmanaged code specified in (pick one: C# or VB.NET)? 4. What is an example (with explanation) of ISOMORPHISM in (pick one: C# or VB.NET)? I'm trying to get a grip on this whole Object Oriented thing, but these topics are confusing me. Could someone answer to one or more of these?
  16. I just started a new job that uses microcontrollers, real time systems (touch screen displays and "fly-by-wire" controls), and small Pentium processors to handle the control and operation of deep sea drilling rigs and large industrial mining equipment. (http://www.letourneau-inc.com/) Since speed is a priority, 95% of their software is written in C or Assembly. Also, the systems have no hard drives: The OS resides on 126 MB of flash memory; DOS is initially loaded, but during the boot stage, a 3rd party OS takes over all of the interupts. Is there any way that I can use Visual Studio .NET to code and maybe even compile my programs? The code relies heavily upon C's pointer notation, but I am unaware of a method to create a new C project in VS.NET. Further, if I were to open a new C project, would I truely have access to memory via pointers? This company currently uses Borland 6.0, and is considering moving over to Visual Studio .NET. I really would like a lot of firepower to battle against Borland, but I also know that Microsoft does not like Developers having full control of memory. Due to safety, the equipment requires calculatable presentation of feedback from sensors down to the microsecond. Can Microsoft's Visual Studio .NET do this? I am looking for any feedback, ideas, or suggestions. Regards, Joe
  17. In fact, I have placed a breakpoint on my "HandleRowUpdated" sub, but it never stops there. How can I make sure that this event is even happening? It used to work, so I don't know why it would have stopped.
  18. When I try this: [edit]Please use code tags when posting code, Joe.[/edit] Private Function DataWrite() as Boolean AddHandler Adapter1.RowUpdated, AddressOf HandleRowUpdated Try Global.Command1 = New OleDbCommand Global.Command1.CommandText = "SELECT @@IDENTITY" Global.Command1.Connection = Connection1 Global.Command1.Connection.Open() Adapter1.Update(DataTable1) Global.Command1.ExecuteNonQuery() Global.Command1.Connection.Close() Return True Catch ex As Exception lblError.Visible = True lblError.Text &= "Database Save Error.<br>" & _ "Error: " & ex.Message Global.Command1.Connection.Close() Return False End Try End Function Private Sub HandleRowUpdated(ByVal sender As Object, ByVal e As OleDbRowUpdatedEventArgs) If e.Status = UpdateStatus.Continue _ AndAlso e.StatementType = StatementType.Insert Then ' Get the Identity column value e.Row("ID") = _ Int32.Parse(Global.Command1.ExecuteScalar().ToString) txtClientID.Text = e.Row("ID").ToString e.Row.AcceptChanges() End If End Sub The problem is that e.Row("ID") is not returning anything. When I look at my Access database, there is only one entry, and it is number 87 (the rest have been removed to help us debug). Could anyone tell me why I am getting this error and please explain how to fix it? Thanks, Joe
  19. Maybe. Would someone mind telling me how to do that? That's what I'm here to try and find out! I don't know how to do it, and that's why I'm asking!
  20. If this helps anyone, the Exception is thrown when this line is reached: Adapter1.Update(DataTable1)But from looking at my code, each field seems to have been added to the insert command, each parameter seems to be included, and each column to the datarow seems to be added. I don't know why I am getting this. Any suggestions?
  21. Never used a meta refresh. Care to show an example with some notes? As for using JavaScript, that would work great! BUT! How do I tell my VB.NET code to jump to some JavaScript code then return to the spot it was in my VB.NET code? My tasks are to 1) change a label message to "Message Sent" so my visitors know their message went through, then 2) redirect the page after about 4 seconds to the homepage. I've managed to get something to work. Instead of changing the label, I am currently redirecting the visitor to a ThankYou.htm page. That ThankYou.htm page has JavaScript in it that handles a redirect after 4 seconds. But, I'd rather have it all included on the same page, rather than have to include a separate page in my project just to handle the submittal notice. Ya know?
  22. After my ASP.NET page has successfully sent an email, I change my Lable to read: lblMessage.Text = "Email was successfully sent."That part is easy. But I would also like the page to redirect to my homepage after it displays the lblMessage to the user. How would I go about this? It would be perfect if I could add a waiting period to the Response.Redirect() command, but that does not seem possible.
  23. Help! When I try to write to my database, I get this error: Error: Parameter ?_7 has no default value. I have assigned all of my parameters a default value, though. For those of you who need to see some code, it is attached as "sql-save.zip", a 2.2 KB text file. sql-save.zip
  24. I am getting the error "Operation must use an updateable query." I have searched on here and elsewhere, and I know that my problem is that I do not have permission to access this database. My project is located at: C:\Inetpub\wwwroot\aspnet-client My database is located at: C:\Inetpub\database\database.mdb Server.MapPath("database.mdb") can not find my database file. I assume this is because the database is located outside of the wwwroot directory "http://localhost," and does not see it. So, I am passing it the hard coded path "C:\Inetpub\database\database.mdb" instead. My question is: How do I give this folder permission to allow me to read/write to my Access database? Note: Just an FYI. When the database was in the same folder as the aspnet-client directory, my code worked fine. So I know I am not experiencing a coding issue. Our client does not want their database accessable from the web, so we are having to move it up one level.
×
×
  • Create New...