Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. You shouldn't simply concatenate the key pressed, since the caret could be in the middle of the textbox. Set the CharacterCasing property to Upper, as that will handle pasting text as well.
  2. "Put quotes inside ""two pairs of quotes"""
  3. Javascript is client side, PHP is server side. They are nothing alike. And yes, VB.NET has full control over databases (creating, modifying, etc).
  4. It's all a matter of preference. However, .NET is more flexible than ASP.NET, but PHP is more widely supported (though that is beginning to change).
  5. VB.NET itself is not a server-side preprocessor technology. ASP.NET is, and it uses the .NET framework languages such as VB.NET. You still use VB.NET to program it. Perhaps we are misunderstanding you.
  6. You really really should get away from the old VB6 ways of file access. I also see you using InStr() which you should not do. Look at the System.IO namespace for file manipulation functionality that is supported by the .NET Framework, and use LinkFileValue.IndexOf("<tr... etc")instead of that InStr line. Read up on the String class for info on .NET string manipulation. To answer your question, use Environment.NewLine to insert a newline. Dim s As String = "Line1" & Environment.NewLine & "Line2"
  7. That's normal.
  8. I don't think so. The Select method allows you to select the control, or a row, but not a column, and the DataGridColumnStyle class doesn't seem to have any selection functionality.
  9. I'm not sure why it's chopping the fields with no user ids, but did you try this?SELECT REF_MasterNomen.Description, REF_CrossReference.Description, REF_CSDSoftware.ComputerName, REF_CSDComputers.LastUserID, REF_CSDUsers.Username FROM ((REF_MasterNomen INNER JOIN REF_CrossReference ON REF_MasterNomen.NomenID = REF_CrossReference.NomenID) INNER JOIN REF_CSDSoftware ON REF_CrossReference.DescID = REF_CSDSoftware.DescID) INNER JOIN REF_CSDComputers ON REF_CSDSoftware.ComputerName = REF_CSDComputers.ComputerName INNER JOIN REF_CSDUsers ON REF_CSDComputer.LastUserID = REF_CSDUsers.UserID WHERE (((REF_MasterNomen.NomenID)=14) AND ((REF_CrossReference.CategoryCode)=3) AND ((REF_CSDComputers.Billable)=Yes)) OR (((REF_MasterNomen.NomenID)=14) AND ((REF_CrossReference.CategoryCode)=3) AND ((REF_CSDComputers.Refreshed)=Yes));
  10. You can use wild-cards, so do something like this:csc.exe /target:winexe /out:myprog.exe *.csAlternatively, specify them one by one: csc.exe /target:winexe /out:myprog.exe file1.cs file2.cs
  11. Here's a basic class to send using the API:Imports System.Runtime.InteropServices Public Class NetSend 'Note the use of the Unicode keyword: Declare Unicode Function NetMessageBufferSend Lib "NETAPI32.dll" ( _ ByVal servername As String, _ ByVal msgname As String, _ ByVal fromname As String, _ ByVal buf As String, _ ByVal buflen As Int32) As Int32 Public Shared Sub Send(ByVal destination As String, ByVal message As String) NetMessageBufferSend(Nothing, _ destination, _ Nothing, _ message, _ message.Length * 2) 'times 2 because every one character = 2 bytes in unicode End Sub End ClassJust stick that in a class file and call it like NetSend.Send("127.0.0.1", "this is a message")
  12. And it must have IIS (Internet Information Server) running.
  13. You might also want to restructure your classes. 1) You shouldn't use Modules at all. Ever. Use Classes with Shared members: Module ThisIsBad Public Sub Blah(...) End Sub End Module 'to call it Blah(...)Becomes Public Class ThisIsGood Public Shared Shared Blah(...) End Sub End Class 'to call it ThisIsGood.Blah(...)Also, you shouldn't require your class to access objects in another class. Instead you should make the class containing the objects pass them into the other class. Public Class Form1 : Inherits Form '.... Dim c As New OutputClass() c.OutputData(Me.TextBox1) End Class Public Class OutputClass Public Sub OutputData(tb As TextBox) tb.Text = "Data" End Sub End ClassThat example allows the second class (OutputClass) to put data into the textbox in the first class (Form1) without having to actually have the instance of the second class. Rather than the second class fetching the object from the first class, the first class *gives* the object to the second class. Sorry if that was a bit confusing. :p
  14. Try this:Process.Start("mailto:")You can also specify a default to address and subject and stuff: Process.Start("mailto:me@microsoft.com?subject=Hi!")
  15. Not that I'm aware of. To use a function in a C++ DLL it has to be exported using the DEF file and use a special declaration line for it to be exported for external use. AFAIK, there's no way to do this for EXEs (and if there was, it's highly unlikely that the author of the EXE did this).
  16. Why do you need this? VB.NET has complete eliminated the need for twips...
  17. You'll need to either change the constructor, or make a new ShowDialog function:'in the Form Public Sub New(ByVal param As Integer) 'store "param" in a private member for later use MyBase.New End Sub 'when you create it: Dim newform As New Form1(55)OR 'in the form: Public Overloads Sub ShowDialog(ByVal param As Integer) MyBase.ShowDialog() 'store param for later user End Sub 'when you show it: newform.ShowDialog(55)
  18. Volte

    thread's?

    Look in the MSDN for System.Threading namespace. Here's a short example:Private Sub SecondarySub() 'do the stuff you want to do while waiting End Sub Private Sub Form_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load Dim t As New Threading.Thread(AddressOf SecondarySub) t.Start() 'wait for connection here... End Sub
  19. Did you do what the error message said and check to make sure the database is not opened with exclusive rights by one of the other computers (or even that one)? Did you try a reboot?
  20. Give it the ServiceNotification option in the 6th parameter. MessageBox.Show("TEST", _ "TEST", _ MessageBoxButtons.OK, _ MessageBoxIcon.Hand, _ MessageBoxDefaultButton.Button1, _ MessageBoxOptions.ServiceNotification)
  21. Try using [api]GetLastError[/api] and [api]FormatMessage[/api] to find out more information about the error.
  22. C# probably has less of a problem with exporting objects than VB.NET does for some reason, but that is indeed the way it's supposed to look. I'm not sure if .NET can automatically export VB6 VARIANTS, but to make it work, you'll need to modify the IDL so both of them take VARIANT* (pointers to variants), rather than just the Property Get, and also change the Property Let definition to [in, out] - interface _ComClass : IDispatch { [id(0x68030000), propput] HRESULT ComProperty([in, out] VARIANT* ); [id(0x68030000), propget] HRESULT ComProperty([out, retval] VARIANT* ); };You can use OLE View to save the IDL, where you can edit it. Then use the MIDL compiler located at C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\Bin\midl.exe to compile the IDL into a TLB. It's a command line program, so you'll need the DOS Prompt to use it. midl myfile.idl /out C:\will compile the IDL and output it to C:\ You'll probably have to overwrite the TLB .NET generated with the new one.
  23. I don't know what's going on at your end, but I can't create an exported property of type Object - it won't let me, and gives me a build error when I attempt it. It may simply be exporting the property as read-only on your end, which might result in the error you're talking about. If you've got the VS 6.0 Tools installed (they're in the VS 6.0 Start Menu Folder, under "Visual Studio 6.0 Tools"), run the OLE View tool, and using the "Open Typelib" button, open the TLB that .NET created. Look for the definition of your property. In my test project, I created an Object called ComObject with an Integer property called ComProperty. The IDL looks like this: interface _ComObject : IDispatch { [id(0x00000001), propget] HRESULT ComProperty([out, retval] long* pRetVal); [id(0x00000001), propput] HRESULT ComProperty([in] long pRetVal); };Find the definition of your property, and paste it here.
  24. Me.SelectNextControl() will focus the next TabIndex in line.
  25. You'll need to replace the Longs in the Structure definition with Integers, and the Integers with Shorts. The sizes of the data-types have shifted in .NET to comply with those in C++.
×
×
  • Create New...