Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. A full two minutes research since Robby's post as well. Just go to google and search on "page directive cache asp.net" and the first hit will give you a lot of information on the page directive and caching.
  2. You could provide an overloaded constructor: within frmLBInput add private f as frmMain sub New (frm as frmMain) f=frm end sub and when you create your instance of frmLBInput (from frmMain?) dim frm2 as new frmLBInput(me)
  3. That wouldn't compile because he's passing a textbox in and rere has now been set to accept a string.
  4. given a valid instance of the frmAdmin held in a variable f you could do f.Controls.Add(cbobox) then. you cannot refer to frmAdmin direct as it is a class and not a running instance of the form.
  5. would me.controls.add(cbobox) not work?
  6. You would need to pass the form in as a parameter to the function as well. Public Sub addstatus(ByVal msg As String, f as frmChatMain) f.ListBox1.Items.Add(Now & " " & msg) End Sub
  7. You would need to use javascript for that. Have a look here http://www.w3schools.com/js/tryit.asp?filename=tryjs_confirm
  8. You would need to add a reference to the microsoft.visualbasic namespace and at the top of your file add Imports Microsoft.VisualBasic or alternatively (and the prefered way) have a look at the class System.Random
  9. You would overload the form's constructor just like a normal class. What code are you using in the form and how were you trying to instantiate it?
  10. if you look at the overloads of Array.Sort - one takes two arrays - try that one.
  11. D3DDEVTYPE_HAL tells D3D to use the hardware capabilities of the video card. D3DDEVTYPE_REF is a software (not for end user use) reference driver - IIRC it supports all the DirectX features but is not accelerated in any way at all. As to wether you can select the HAL or not depends on the video card in use.
  12. It will probably be your side of the router it's reporting rather than the internet side of the router. Unfortunately there is probably no reliable non-hardware specific way of interrogating the router to find out the external address.
  13. The file open dialog will just give you a file name, that will work just fine with System.IO.File.OpenText() As Mutant says though - if your teacher tells you to avoid streamreaders and then says use the FileOpen way instead I would seriously doubt his .Net knowledge.
  14. You should have a look at the System.IO namespace, the newer .Net file handling stuff is in there. Classes to start looking at in this case are: System.IO.File System.IO.FileStream System.IO.StreamReader
  15. Check the Dataset contains a table with the name "ClientName". How are you populating the dataset?
  16. If you step through your code in the debugger which line throws the exception? in the line SqlDsClients1.Tables("ClientName").Rows does the table ClientName exist?
  17. Overloading a form's constructor is perfectly fine. Overloading a usercontrol's constructor can be done but the design time creation of controls only uses the default constructor - you will either have to manually create the control in code or go in and edit the designer generated code to use the overloaded constructor.
  18. Just created a simple solution 1 forms based app - went into assemblyinfo and gave it a title. created a user control in a seperate project and pasted in your code. Added a label to the control (lblInfo) and also a variable (object[] objAttributes;) Added control to form and placed a button on form - in it's click event I called the GetAttributes method and the label displayed the applications title correctly. How are you declaring objAttributes (or is that variable referenced anywhere else)? What version of VS are you using (2003 here).
  19. Cursor is just the mouse pointer on screen (Arrow, hand etc.) I think you may be mistaking it for a database cursor. How are you reading in the file - if you are using a System.IO.StreamReader you shouldn't need to be checking for EOF anyway. Post some code and see if we can help.
  20. It's probably the only way - you could do it mor elike explorer does and only populate one level at a time. When you start fill all sub-folders of the root directory, when they expand a directory populate it's sub folders etc.
  21. System.IO.Directory.GetDirectories("path here") will return all the folders in a given directory. you will have to call this to populate each sub folder in the tree view.
  22. to achieve the same result in a textbox use... Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress e.Handled = True End Sub
  23. From playing around with mono a few months ago myself it depends on the area's of functionality. windows forms were poorly supported then - not sure how well they are supported now. Console apps seemed to work fine and quite large parts of ASP.Net were working without any problems. At the end of the day .Net code compiles to an intermediate language called MSIL (literaly Microsoft Intermediate Language) which is a subset of the Common Intermediate Language and similar to Java byte code runs in a virtual machine style environment. There is absolutley no reason why a .Net .exe or .dll cannot be used on any platform that supports a compatible version of the runtime - it's just that there are currently no 100% compatible implementations out there.
  24. try protected override void OnPaint(PaintEventArgs e) as the declaration
  25. This is a VB6 snippet - worth a look. http://www.visualbasicforum.com/t121679.html it does depend on the website in question never changing it's format or just disappearing though...
×
×
  • Create New...