Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. [edit]removed due to posting guidelines - Orbity[/edit]
  2. Complete code to do what? Always nice to see a polite question that doesn't demand too much.
  3. Not native machine code - but you can code in MSIL directly using ILASM as a utility
  4. If you've got a web project open then it should be aboult half-way down the project menu (from the menu bar at the top). If you've created a data connection through one of the wizards the connection components it puts on the form have a ConnectionString property. If you look at the property window there should be an entry for dynamic properties - this will store the connection string in the web.config file so it can be easily modified later without needing a re-compile.
  5. try dim dv as DataView(test.Tables("New")) ComboBox2.DataSource = dv ComboBox2.DisplayMember = "site"
  6. In no certain order: Application.DoEvents() - gives the application chance to process it's message loop. FullScreenExclusive means the application will go fullscreen ;) and no other application is allowed access to the hardware device i.e. only we can draw to the screen at this time. Other modes may allow multiple applications to draw to the hardware at the same time. The idea behind 2 surfaces is you draw to the secondary surface which isn't visible so nobody can see the scene being built up in code and then when the drawing is complete you switch it to the primary surface (similar to blitting an image to a form). The psurface.Flip(ssurface, FlipFlags.DoNotWait) is a performance thing, we are just going to update the display now even if it isn't the best time as far as the hardware is concerned - this is faster but may cause 'artifacts' or image distortions. If we choose to wait the image may be better (fewer drawing errors) but the overall speed may be slower. The Dispose Method of the class simply frees up memory when escape is pressed and the Game loop exits (do while gamegoes) Sure if I'm wrong anywhere Mutant will put me straight :)
  7. As long as the other machine has the FrameWork installed you just need to copy certain files over (*.aspx, *.asmx, *.ascx, web.config, *.css, *.xml and the contents of the bin folder - not 100% this is all that is required though). Easiest way is from Visual Studio on the project menu there is a copy project option that can do this for you.
  8. Probably a bit easier than C++ as it removes the whole pointer issue and introduces useful data types (arrays, strings etc) without having to learn the MFC / ATL / STL implementations.
  9. Not worked with the TCPListner overly much so I may be wrong - but won't the tcpListner.Stop prevent it having new connections? Try removing that line and just keep looping in the main form just to see if it will keep accepting new connections. private sub form_load() tcpListener.Start() do ListenerGO loop while true end sub if it now starts to accept more than one connection then at least the problem is spotted ;) (even if the code I suggested isn't that good)
  10. Sorry - missed the bit about it being maintained by a seperate application. Easiest way is probably to periodically refresh the data (or just give the user a refresh button and let them requery whenever they need to).
  11. What kind of 'Custom Event'?
  12. Are you adding the records direct to the dataase? If so you will need to refresh the DataSet - ADO.Net works in a disconnected fashion rather than the connected way of ADO.
  13. Post some code if possible, makes it easier for people to see where you're comming from.
  14. Response.Redirect("Newpagetogoto.aspx?text=" & text1.text) or similar will pass the value as part of the querystring
  15. in the buttons click event you can use response.redirect(url) or server.transfer(url) to go to another page
  16. Would just having a dummy version that does nothing not work. Out of interest why are you trying to hide the base method? If it isn't required by all subclasses it shouldn't be in the base class. hiding it would effectively break inheritance. Imagine the following code using System; //your code follows public class classBase { public void Method(string str) { } } public class classDerived : classBase { private new void Method(string str) { } } class cMain { static void Main() { classDerived cl = new classDerived(); cl.Condizione(3); } //extra code static void Test(classBase B) { B.Method("test"); //what would happen here if a classDerived Object was passed in??? } }
  17. given an array of bytes held in b() somethging similar to the following should work Imports System.IO Dim ms as new MemoryStream(b) dim sr as new StreamReader(ms) dim s as string = sr.ReadToEnd()
  18. The picturebox is square so left is just left. The same as the top is just the top
  19. If by change a variable you mean alter it's currently running value then you can do that from the immediate window as well as the watch and locals windows. If you mean edit the code then unfortunately the edit and continue has been lost - although it is expected in a later version.
  20. IIRC ActiveX controls have problems running on threads other than the applications main thread. You may be better of having a quick search of these archives as I'm sure somebody mentioned a RS232 wrapper class not too long ago. I also think http://www.mentalis.org have a serial port wrapper which may be useful. http://www.mentalis.org/classlib/class.php?id=15 edit: bothered to find the url ;)
  21. Have you tried using the timer from system.Threading? The following snippet should give you the idea (just past into a form with a single button) Private Sub Tick(ByVal state As Object) MessageBox.show("test") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Visible = False Dim t As New System.Threading.Timer(AddressOf Tick, Nothing, 0, 5000) End Sub
  22. Dim sr As New System.IO.StreamReader("c:\test.txt") Dim line As String Dim vals() As String Do line = sr.ReadLine() If line Is Nothing Then Exit Do vals = line.Split(" ") 'vals will contain an array of the data for each line. Loop While Not line Is Nothing bit rough but should do the trick
  23. What does the contents of the text file look like? Are we talking some kind of structured file (TSV, CSV etc) or a more free form layout?
  24. Enum Number one two three End Enum should do it.
  25. Only the server would need the framework installed.
×
×
  • Create New...