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
  • help! progressbar wont show!

    visual-studio help question
    5
    0 Votes
    5 Posts
    0 Views
    D
    The problem is not with the loop or doevents. When you open a form in vbmodal then the program execution stops till the window is closed. This has to be used for showing some alert or message where user. Either use vbModeless or else use a timer control to increment progress bar value. dsk:)
  • Datagrid Copy/Paste Rows

    tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 3rd Party Components

    css question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • VB runtime - how to distribute?

    question tutorial
    2
    0 Votes
    2 Posts
    0 Views
    N
    I could be wrong here as I have only distributed my applications with the Package and Deployment Wizard, but I am not sure that you would need to include the runtime environment to install and run an application itself. Nick Parker **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown **
  • Please help

    help com
    2
    0 Votes
    2 Posts
    0 Views
    N
    Post some of the code you are having a problem with. Nick Parker **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown **
  • Internet

    help question workspace
    2
    0 Votes
    2 Posts
    0 Views
    N
    Try something like this, there are actually several ways to check for something like this, but they all differ slightly. Private Const INTERNET_CONNECTION_CONFIGURED = &H40 Private Const INTERNET_CONNECTION_LAN = &H2 Private Const INTERNET_CONNECTION_MODEM = &H1 Private Const INTERNET_CONNECTION_OFFLINE = &H20 Private Const INTERNET_CONNECTION_PROXY = &H4 Private Const INTERNET_RAS_INSTALLED = &H10 Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long Private Sub Form_Load() Dim Ret As Long Me.AutoRedraw = True 'retrieve the connection status InternetGetConnectedState Ret, 0& 'show the result If (Ret And INTERNET\_CONNECTION\_CONFIGURED) = INTERNET\_CONNECTION\_CONFIGURED Then Me.Print "Local system has a valid connection to the Internet, but it may or may not be currently connected." If (Ret And INTERNET\_CONNECTION\_LAN) = INTERNET\_CONNECTION\_LAN Then Me.Print "Local system uses a local area network to connect to the Internet." If (Ret And INTERNET\_CONNECTION\_MODEM) = INTERNET\_CONNECTION\_MODEM Then Me.Print "Local system uses a modem to connect to the Internet." If (Ret And INTERNET\_CONNECTION\_OFFLINE) = INTERNET\_CONNECTION\_OFFLINE Then Me.Print "Local system is in offline mode." If (Ret And INTERNET\_CONNECTION\_PROXY) = INTERNET\_CONNECTION\_PROXY Then Me.Print "Local system uses a proxy server to connect to the Internet." If (Ret And INTERNET\_RAS\_INSTALLED) = INTERNET\_RAS\_INSTALLED Then Me.Print "Local system has RAS installed." End Sub Nick Parker **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown **
  • Backcolour in VB6

    help
    3
    0 Votes
    3 Posts
    0 Views
    L
    Thanks Nick
  • Selecting text in WebBrowser control

    com tools question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Drawing disappears on modal form

    graphics
    2
    0 Votes
    2 Posts
    0 Views
    N
    If you add your code to the subroutine Form_Paint() I think you should be able to see your rectangles when redisplaying your form. This worked for me. Private Sub Form_Paint() For i = 0 To 100 'TextOut GetWindowDC(GetActiveWindow), 50 + 10 * i, 50, str, Len(str) RetVal = Rectangle(GetWindowDC(GetActiveWindow), 20 + 10 * i, 40, 30 + 10 * i, 50) 'ProgressBar1.Value = i Next End Sub Nick Parker **So like children pointers should be left to grown ups. - Norm Alomond **
  • Want red rectangles:

    help
    2
    0 Votes
    2 Posts
    0 Views
    N
    Try using something like this, I believe it will go one pixel at a time. Declare Function FloodFill Lib "gdi32" Alias "FloodFill" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long FloodFill Me.hdc, x, y, vbRed Nick Parker **So like children pointers should be left to grown ups. - Norm Alomond **
  • Managing my own EventLog

    help csharp
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • modal form and timer

    database question
    3
    0 Votes
    3 Posts
    0 Views
    N
    This is amazing! It worked! Many many many thanks! Thanks, ns
  • sendmessage not sending in VB dll:

    question com help
    3
    0 Votes
    3 Posts
    0 Views
    N
    Private Declare Function SendMessage Lib "User" (ByVal hWnd As Long, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Long) As Long I changed it to ByVal hWnd As Long, it was originally integer from the msDN. But it still doesnt work.....:confused::confused: The msgbox doesnt fire, result = SendMessage(pBAr, 1029, 0, 0) MsgBox result /// never fires The VC client gets a com error at runtime (goes into the catch(com e) block) is: sway.exe (KERNEL32.DLL): 0xC000008F: Float Inexact Result. Desperate!
  • How do I update methods and properties in VBA?

    c++ help question com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • pascal

    visual-studio csharp delphi question
    2
    0 Votes
    2 Posts
    0 Views
    R
    DOH! Not as far as I know... there might be a version of Delphi for .NET soon but I don't think that it will use the VS IDE.
  • any way to programmatically dismiss a modal form?

    question announcement
    4
    0 Votes
    4 Posts
    0 Views
    N
    I think you can pass it as a Long. Nick Parker **So like children pointers should be left to grown ups. - Norm Alomond **
  • textout wont work!

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • how to launch form in a vb COM dll

    com help tutorial career
    8
    0 Votes
    8 Posts
    0 Views
    N
    yes. Just have tofigure out the mechanism. Also looking at postmessage....between the two. Thanks, ns
  • Catch keydown in Word by VBA?

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • importing an excel file and storing in MS-Access?

    csharp database help tutorial
    2
    0 Votes
    2 Posts
    0 Views
    M
    Are you still stuck on this? I'm pretty sure my buddy has done this before so I could ask him tomorrow if you're still stick (seeing as you asked this a little while ago).