Jump to content
Xtreme .Net Talk

sjn78

Avatar/Signature
  • Posts

    258
  • Joined

  • Last visited

Everything posted by sjn78

  1. How?? It's always good to see other peoples methods of doing the same thing.
  2. You would of got a CD with heaps of samples. I have 2002 version, not sure if 2003 samples are different. Its called VB.NET - Windows Forms - Simple Printing
  3. Could get around it by having 2 PictureBoxes and a timer. Have the pictureboxes on top of each other, one showing a normal button image and the other showing the depressed button image. Then when you click the picture box, turn the timer on using a short period of time for the interval, hide the normal button and show the depressed button. When the timers tick event fires, run your code. It's a work around for what you need. But still think you should see if it can be done using a button.
  4. Have a look in the examples that come with .NET. Thats how I learned to do it!!! There is one in there for printing as you require.
  5. Glad to help out. I knew there was going to be a lot of IF's, and there was surely a more efficient way to do it, but that was what first popped to mind.
  6. Open your database connection conn.Open() cmdPaiments.ExecuteNonQuery() conn.Close() cmdPaiments.Dispose()
  7. Print it to where?? A printer, to the screen (if its a console app) or to the output window for a windows app?
  8. Each letter has an ascii code. Not sure what A is but lets say its 98. Your string to represent aaaa would be 98 98 98 98. Find out what A is, just for this lets say 100 to make things simple. Store your letters in an array. Then write some code to go through and increase each letter. For i = 0 to 99 ' or whatever you need it to be If code(3) = 100 then code(2) += 1 'Goes to the next letter code(3) = code(98) ' Back to A Else code(3) += 1 End If Next You will need more IF statements to satisy each position in the code. Hope this makes sense or gives you an idea on how it could be done.
  9. did you compile it using the release mode?
  10. I have a small window popup and it runs a process. Takes about 30 seconds. I have a button on it that closes this window. The problem is, I can't get to that button until the process is finished. How can I do this so I can press the 'Cancel' button midway through a function routine that stops the process and closes the form.
  11. Speaking of text editors, I found a great one that has syntax highlighting for any language..vb, c++, html, pascal, and many more, and if it doesn't, you can setup your own. Its called Crimson Editor. http://www.crimsoneditor.com Its free (which is good). Can also complie programs as long as you have a compiler installed. I recommend checking it out, I have found it very useful.
  12. LOL, didn't expect that.
  13. Simple question...Which is better to use for webpage designs, Dreamweaver or .NET. Do any of you guys have a preference for a particular program and if so, why do you like one more than the other. Me, I like Dreamweaver because of the ability to create unique graphics and animations quickly and easily. I'm interested in others opinions. Thanks
  14. Thanks....now to find a server that supports asp and databases!!!
  15. I haven't played too much around with binding controls to database tables so I don't know too much about it. I just read in the records and then disperse them to wherever I want them to go. Is there any real advantage in binding? I guess you don't have to write as much code, but is that it? I feel I have more control when I don't bind anything since I can put records anywhere I please. Any comments would be great.
  16. This may be a silling question but, when you creat an application, you have an exe to distribute. What do you do for a web application? There is a dll in the bin folder, is that what is used for the webforms and anything else that you create when making a web application? Thanks
  17. Ok, now I can get a little further!!... I now have an error that says Syntax Error in From clause. The error occurs when I fill the dataset. sql = "SELECT name, password FROM User WHERE name = '" & TextBox1.Text & "' AND password = '" & TextBox2.Text & "'" I break the program to see if the variables are correct and they are what the textbox's have in them. And yes, I have made sure the database table name and fields are correct. This is getting to me now!!! You said to point to the database where it resides on the computer, but how do I set it up when it is on a webserver somewhere?
  18. cnstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://localhost/WebApplication1/data.mdb;"
  19. Ok, I did that but still get URI formats are not supported error. It throws the error on the line where i try to fill the dataset.
  20. use a rich text box, it has scroll bars
  21. Ok, this is what I have Code: Function CheckLogin(ByVal username As String, ByVal password As String) Dim sql As String = "SELECT * FROM User WHERE name = '" & username & "' AND password = '" & password & "'" Dim objDsName = New DataSet() Dim objDaName = New OleDbDataAdapter(sql, cnstring) objDaName.Fill(objDsName, "Temp") If objDsName.tables(0).rows.count = 1 Then Panel3.Visible = True Panel4.Visible = False Else Panel3.Visible = False Panel4.Visible = True End If objDsName.dispose() objDaName.dispose() End Function Error: Server Error in '/WebApplication1' Application. -------------------------------------------------------------------------------- URI formats are not supported. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: URI formats are not supported. Source Error: Line 62: Dim objDsName = New DataSet() Line 63: Dim objDaName = New OleDbDataAdapter(sql, cnstring) Line 64: objDaName.Fill(objDsName, "Temp") Line 65: Line 66: If objDsName.tables(0).rows.count = 1 Then Source File: c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb Line: 64 Stack Trace: [ArgumentException: URI formats are not supported.] Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) WebApplication1.WebForm1.CheckLogin(String username, String password) in c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:64 WebApplication1.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:52 System.Web.UI.WebControls.Button.OnClick(EventArgs e) System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) System.Web.UI.Page.ProcessRequestMain()
  22. I tried doing that but when I got to filling the dataset it came up with an error. I can't give you the error message now as I'm at work. When I get home i will post what code I use and the error.
  23. I have searched around on the web and this site and haven't come across what I need. Maybe i'm not looking in the right places, but anyway.. I have an access database with user name/passwords and a webform with a textbox for username and another for password. I have worked with the oledb connection and understand that in an application but I am stumped on how to do it for a webpage. If anyone could point me in the right direction or show me an example I would greatly appreciate it.
  24. Thanks for the info. I only experience I have with C is from the Uni course I am doing which so far is only creating programs that run in the DOS environment using Borland's C Compiler. I thought if I used C++ V5 I would start to grasp the concept of OOP in this language (even though I am familar with VB.NET) For example, when i moved from VB5&6 to VB.NET, I had to pretty much learn VB over again. EG, showing a form in early VB was as simple as: form1.show and now you have to declare an instance of the form in .NET When going from say early verions of C++ to C.NET is the syntax the same? I don't want to waste my time using an early version if C.NET differs as VB.NET does with its earlier versions. I hope you understand what I'm trying to say.
  25. This is the story...Have only used VB to do any serious programming and now with studying, I am getting into C++. I have found C++ to my liking and I don't want to go out and spend my money on C.NET..not just yet anyway. I have a copy of C++ V5 and want to know if I start using that, will there be a huge jump when I move to C.NET. I know that the .NET Framework will have changed a lot of things in there, but is it basicallly the same. I only ask this since VB6 and lower has changed a lot since going .NET. Thanks for any suggestions or opinions
×
×
  • Create New...