Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. dim f as new frmAbout f.Show that do the trick?
  2. If you do a view source on the resulting web page what do you see? Is it proper HTML or does it contain stuff like in it?
  3. Microsoft's SQL purchasing page MS Whitepaper on licensing licensing FAQ
  4. in the html between the and tags enter replacing stylesheet1.css with the name of your style sheet. Not 100% sure but IIRC the entry in your stylesheet should be .StandardLabel { font-size: 1.17em; }
  5. Could you give us a reason why you need to do it that way? There may be a better alternative in ASP.Net.
  6. Could you post any code you have so far?
  7. The academic and professional versions don't have VSS, only the enterprise developer and enterprise architect versions do.
  8. Not sure if you can do it exactly the way you say but you could achieve something similar with a collection. Dim vars As New Collections.Specialized.StringDictionary vars.Add("Name1", "Frederik") vars.Add("Name2", "Andreas") Dim name As String = "Name1" Response.writeline(vars(name)
  9. The one I tend to use is Winmerge, good and free. never used examdiff but I've heard good things about it.
  10. A possible problem is that user controls resolve urls relative to themselves (the ascx file) rather than the page that contains them. In code you could use something along the lines of Page.ResolveUrl(relative url here) this will resolve the url relative to it's containing page. If you have user controls containing other user controls then this no longer works....
  11. Depending on your requirements you may be better of with a single dataset that is shared between several (all?) the child forms - but give each child form it's own dataview(s) to filter down the dataset. This is all specullation though - if you could give a bit more detail or possibly some code then we may be able to give you a better suggestion.
  12. Duke3D - those were the days. http://jonof.edgenetwork.org/buildport/duke3d/
  13. Behind the scenes all events are based on another feature of .Net called delegates - in simple terms these define how a function looks, it's signature, (return type, number and type of parameters etc) but not what it actually does. This means any function that has the same signature can be used in place of the delegate. To keep the system flexible under .Net all the standard events are based on a delegate called System.EventHandler which has two parameters - the first of type object and the second of type EventArgs. This means events raised from different places in the system - not just the form itself (as you said) can be handled in one place. The first parameter will contain the control that raised the event but it's typed to an object due to the fact it can contain any .Net class or control. The directcast simple converts the object variable to the correct datatype (button in the case posted above). This maybe a problem and need further checking as the handler could work not only for multiple controls but multiple controls of different types i.e. Private Sub Something_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, TextBox1.Click Dim b As Button 'can only hold a button Dim t As TextBox 'can only hold a textbox Dim c As Control 'can hold any windows control 'the followin will work with either button or textbox in this sample 'but c will only allow access to the features common to all 'controls - any button or textbox specifics will be unavailable c = DirectCast(sender, Control) MessageBox.Show(c.Name) 'If the type is unkown we need to check first - as the following lines show. If TypeOf sender Is TextBox Then t = DirectCast(sender, TextBox) 'use t here End If If TypeOf sender Is Button Then b = DirectCast(sender, Button) 'use b here End If End Sub the above example only shows what can be done - if you need different processing for different control types using different event handlers is probably a better idea. Most controls also support the .Name property which should always be the name - some controls return different things for the .ToString function. Finally to display the code put it between [ vb ] and [ /vb ] tags (without the spaces between the square brackets). edit: typo
  14. sender is the object that raised the event (the form in this case). e are any arguments that are relevant to the event. The form load event doesn't have any extra information passed to it so e really doesn't contain anything useful. Try it with something more useful like a mousedown and you can see the difference. Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown, Button2.MouseDown Dim b As Button b = DirectCast(sender, Button) 'convert sender to correct object type b.Text = "clicked " & e.Button.ToString() End Sub
  15. Why on earth do you want to store an MP3 in the cookies folder? Would using the Temp directory, the application's direcory or storing it as part of the user's application data not be far more appropriate?
  16. Code that calls itself i.e. Private Sub DoThing DoThing() end Sub
  17. Could you post some code - it helps a lot in trying to fix problems. The error basicaly means you've run out of stack space - nearly always caused by recursion somewhere in the code.
  18. You are probably best looking at the System.IO.FileSystemWatcher class.
  19. No code in the following link but the full RFC for NNTP can be found at http://www.cotse.com/CIE/RFC/977/index.htm.
  20. http://www.w3schools.com/css/default.asp
  21. Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing Me.Hide() e.Cancel = True End Sub
  22. You could give the form a public function that returns a string and within that function get the form to display itself.
  23. You could replace your form_load code with the code from above Dim ico As Icon ico = New Icon(([Assembly].GetExecutingAssembly().GetManifestResourceStream("WindowsApplication1.Icon1.ico"))) Me.Icon = ico or if you just want to drop them in the application directory use Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load NotifyIcon1.Icon = New _ System.Drawing.Icon(Application.StartupPath & "\Icon1.ico") NotifyIcon1.Visible = True NotifyIcon1.Text = "WHM & CP Launcher" End Sub although the second way isn't always 100% reliable - a short-cut could have an alternate startup directory which would break this.
  24. Comment's are stripped out on any kind of build. If you do a build in Release mode then debug info is also stripped and the compiler will perform optimisations on the produced code as well. As for the Dotfuscator I personally don't see a lot of benefit - is your code (or most peoples code even) that special and fantastic somebody will want to decompile it? It is normal for the config file to be deployed as well - this allows for some control over the execution of the program depending on what values you are storing in there. Rather than storing the serial number in the app you may want to store a hash of the number and when the user enters the serial to unlock it hash that and compare hashes. (Have a look under System.Security.Cryptography for classes to do the Hash - MD5 or one of the SHA classes should be suitable).
  25. I'd go remoting in preference to COM+ unless you need features specific to COM+ as it is heavily based on Microsoft standards and RPCs (all data is a binary format as well). With ermoting you can still use XML (SOAP) and http so to all intents and purposes it is a webservice but without needing IIS (more work than a webservice but maybe worth it.)
×
×
  • Create New...