Skip to content

Visual Basic

Visual Basic Questions

This category can be followed from the open social web via the handle visual-basic@forum.codeproject.com

34.4k Topics 120.1k Posts
  • How to shutdown system through code

    tutorial
    2
    0 Votes
    2 Posts
    0 Views
    W
    You can use the ExWindowsEx API but its not without inherant problems. Here is a link[^] that may help detail the process: Regards Wayne Phipps ____________ Time is the greatest teacher... unfortunately, it kills all of its students LearnVisualStudio.Net
  • Capturing Image from Webcam

    graphics help question
    2
    0 Votes
    2 Posts
    0 Views
    D
    Go to http://developer.logitech.com[^] to get the SDK for the Quickcam. RageInTheMachine9532
  • Problem Runtime Error 430 continues

    help
    2
    0 Votes
    2 Posts
    0 Views
    G
    The FileSystemObject that is installed on the other computer is not compatible with the version that you have on your computer. Install Internet Explorer 5.5 or later on the Windows 98 SE and things will work fine. You may also look for a recent version of the scripting runtime from http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28001169 - I usually prefer to required Internet Explorer 5.5 in my setups since the scripting runtime setup EXE sometimes seem to fail on some older computes.
  • ProgressBar - This should be simple, but it doesn't work!

    csharp help question
    2
    0 Votes
    2 Posts
    0 Views
    D
    A few questions: What are the Minimum and Maximum properties set to? What does the Increment statement look like? Also, after to do the Increment, have you tried doing an Application.DoEvents() so the window and it's controls can update? RageInTheMachine9532
  • 0 Votes
    3 Posts
    0 Views
    V
    Thanks so much for your response, Dave. I found out that the IIS was not even installed on this computer. I installed it and I'm up and running again. Yay! Vi
  • Accessing a structure by pointer in VB/VB.NET

    csharp performance help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • dde example in vb.net

    tutorial csharp com
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Transferring arrays from C DLL's to VB.Net

    csharp c++ data-structures question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Credtits screen?? VB6.0!!!!

    tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    N
    simplest way to do it is probably to have a huge group box. in the group box you place your pictures and labels that you want on your credits. remove the border of the group box and use a timer to make it scroll up (decrease the .top property of the group box) slowly. edit: oh ya.. this is vb.NET.. u said vb6. well you CAN do this in vb6, of course. only thing is that i dont think group boxes are called that in vb6, only vb.net. so check out vb.net to see what a group box is. it looks just like a big label, with a border and a caption at the top left of the border.
  • Listing shares and type

    tutorial
    2
    0 Votes
    2 Posts
    1 Views
    A
    Try the following CodeProject article: Network shares and UNC paths[^]
  • String from vb to VC

    help c++ graphics tutorial
    7
    0 Votes
    7 Posts
    0 Views
    J
    :confused: Yes, perhaps you misinterpreted my inquiry --- and the reference to the c++ forum was a simple suggestion. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
  • PLEASE PLEASE PLEASE HELP, Embedding images and icons.

    help hardware learning
    2
    0 Votes
    2 Posts
    0 Views
    D
    First, lookup 'ResEditor' in the Visual Studio documentation. You'll have to compile this little tool and use it to create a .resources file with your image information in it. Simple Add an image, give it a resource name, then click on the little '...' button and point it at image file that it is going to represent. Keep adding names and resources... then save this file as a .resources file in your project folder. Next, add the .resources file to your project in the Solution Explorer. Then in your code, you can use something like this: (This is the initialization code for a component I'm writing) Private m\_img\_LightOn As Image Private m\_img\_LightOff As Image #Region " Windows Form Designer generated code " . .   **' Load our internal resource files Dim thisAssembly As System.Reflection.Assembly = Me.GetType.Assembly Dim resManager As New System.Resources.ResourceManager( "BinaryDisplay.BinaryDisplay", thisAssembly ) m_img_LightOn = CType(resManager.GetObject("BMP_LIGHTON"), System.Drawing.Image) m_img_LightOff = CType(resManager.GetObject("BMP_LIGHTOFF"), System.Drawing.Image)** End Sub RageInTheMachine9532
  • catching exceptions thrown from a thread

    help question
    2
    0 Votes
    2 Posts
    0 Views
    D
    How you have this setup won't work like you want. Your code, as it is now, will only catch exceptions thrown during the Thread setup and start. It won't catch exceptions that happen inside that new thread. Exceptions caught with Try/Catch blocks won't cross thread boundries. Since the code on your main thread can be anywhere when an exception on a second thread is thrown, there is no way to capture an exception using a Try/Catch block. An alternative method for capturing exceptions on seperate threads is to have your threaded code in a class that can raise events. Then, if an exception does occur, try/catch blocks in your threaded code can raise an error event and send the exception data back to your main code through an event handler. That way, all of your error handling code for your threaded component can he handled in one place. RageInTheMachine9532
  • DataSet Clear() performance problem

    architecture performance help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • XP look needed in vb applications

    2
    0 Votes
    2 Posts
    0 Views
    N
    VB.NET: System.Windows.Forms.Application.EnableVisualStyles() VB6: Add the API function InitCommonControls, defined as: void InitCommonControls(VOID); In VB: Private Declare Sub InitCommonControls Lib "comctl32.dll" () Make sure you make a call to this in Form_Initialize: Private Sub Form_Initialize() InitCommonControls End Sub Then add a manifest file called .manifest, so if your app is App1.exe then this file would be App1.exe.manifest. The file must contain the following lines: Your App name goes here greetz ;-) *Niels Penneman* Software/Dev Site Personal Site
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • object procedures

    help csharp visual-studio question
    2
    0 Votes
    2 Posts
    0 Views
    D
    The VB compiler natively supports adding descriptions using the Description attribute. These will appear in the Object Browser and below the Properties box in the bottom right corner of the IDE, but will NOT show up in Intellisense. For this, you have to use a plug-in like VBCommenter. You can find that here[^]. An example of the Description attribute: <Category("Appearance"), \_ Description("Set the number of LEDs to display."), \_ DefaultValue(4), \_ Bindable(True)> \_ Public Property SizeInBits() As Integer Get Return m\_SizeInBits End Get Set(ByVal NewValue As Integer) If NewValue < 1 Or NewValue > 32 Then Throw New ArgumentOutOfRangeException("SizeInBits", "Value must be between 1 and 32.") Else m\_SizeInBits = NewValue OnSizeInBitsChanged(EventArgs.Empty) If m_Value >= (2 ^ m_SizeInBits) Then m_Value = 0 OnValueChanged(EventArgs.Empty) End If End If End Set End Property RageInTheMachine9532
  • Multiple Monitors

    help
    3
    0 Votes
    3 Posts
    0 Views
    A
    In multimonitor environments use the DesktopLocation property instead of the Location property to correctly position forms.
  • Password viewer???

    question
    2
    0 Votes
    2 Posts
    0 Views
    D
    Encrypt? Do you mean you want to scramble the actual text behind the dots, or you want to see the text behind the dots? If you want to see the text, you would use GetWindowText or use SendMessage and the WM_GETTEXT message to retrieve the text from the Textbox. BUT! I'm NOT telling you how to get the window handle of the Textbox! Hacking a password is not supported here... If you want to encrypt the text, you can't. If you encrypt the text, your actually just typing the scrambled characters into the textbox and the program will not know that your password is scrambled and pass on a scrambled (and incorrect) password to whatever authentication process is being used. To stop this practice from being used on projects I've worked on in the past, I've used techniques like clearing the password from the textbox after 3 seconds or so and have written a textbox control that keeps the password typed in seperate from the textbox. The textbox display is just a plain textbox, without using the Password Character property, that just has asterisks in it that correspond to the number of characters entered. You can use Revelation on it, or some other hack tool that does the same, and you'll actually see a string a asterisks instead of the text behind them. And no, I can't give you the code for it because it's copyrighted by my employer at the time... RageInTheMachine9532
  • VB Script Password InputBox

    tools help
    2
    0 Votes
    2 Posts
    0 Views
    D
    VBScript and the Windows Script Host don't yet support a password-type input box yet. You'll have to use an external component of some kind to do this or make your code run in an HTML page and use an HTML password box. But, there are limitation on what your script can do inside a browser. RageInTheMachine9532