Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

LCARS x32

@LCARS x32
About
Posts
21
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C, VB.net, MySql
    L LCARS x32

    You can also export your C classes in such a way that VB.net can use them like you would API calls. I did this on a shell I developed so that I could get the sytem tray icons. Search google for "Use C++ DLL in VB.net". Another option is to use WndProc messages between the two applications. That's the way I would go personally. The concept you'll want to research is "inter-process communication".

    Visual Basic question csharp database mysql

  • Access another program's controls?
    L LCARS x32

    Those concepts will only work if he has access to both programs' code. If you are trying to control a program you did not create or cannot modify, you will need to use API calls such as "FindWindow"/"FindWindowEx" to locate the window and child control (also considered a "window"). You can use programs like spy++ or winspector spy to figure out the class/caption of the windows and controls. Once you have the handle (intptr) to the control, you can use other API calls to send key presses and/or mouse clicks. You'll have to google those, tho. Hope that helps! Ray

    Visual Basic csharp c++ question

  • How to store data(images, Text, Music) in one file? like.dat
    L LCARS x32

    If you want to do it through your own code, use a FileStream to read the files into memory and another to write them to the same file. FileStreams read the raw bytes of the files. You'll want to put some sort of delimiter between the files so you can separate them later. To add your delimiter to the file, create a string and then use System.Text.Encoding.Ascii.GetBytes(YourStringVariable). That will give you a byte array with which to write with the filestream's write method. Hope that wasn't too confusing! Ray PS: If you want to compress your files, there are lots of examples for compressing files in .NET, just search google for "compression vb.net"

    Visual Basic help tutorial question

  • Plugins for Application
    L LCARS x32

    It may be, but so is creating separate exe's and talking through interprocess communication. At least this way, it's a true integrated plugin. It's also how most developers are used to creating plugins. I can't think of any other applications that use interprocess communication for plugins. I hope somebody else can give you a better solution. But I wouldn't hold my breath :)

    .NET (Core and Framework) question sysadmin security help

  • Plugins for Application
    L LCARS x32

    You could have your program ask the user if the plugin should be allowed internet access the first time the plugin is loaded. And I mean the very first time, not each session. You can verify the plugin hasn't changed by storing a hash of the plugin's file and checking it against that hash any time it loads. Force the plugin developers to use your program to update the plugin so you know when to regenerate the hash. In effect, your program becomes a mini firewall. No extra exe's and your program protects the user from malicious plugins. Unless, of course, the user allows the plugin access. But you can't win them all -Ray

    .NET (Core and Framework) question sysadmin security help

  • Where to update datagrid cells
    L LCARS x32

    Cellformatting is where you want it. You were close. Just add another line under your code to change the color:

    e.FormattingApplied = True

    Visual Basic question announcement

  • TCPclient/TCPlistener connects but can't send/receive data? Please help.
    L LCARS x32

    Hey everyone, I'm working on a project that includes product activation. We are using a TCPclient on the client application to connect to a TCPlistener on the server. 99% of the time, everything goes fine. But we have had a few clients complain that they are unable to activate. I was able to set up a debug server and have the client try activating against that. I watched the incoming connection and the issue seems to be that the client is able to connect and send data (verified by the clients log file), but the server never receives it. The stream.readbyte() function hangs until it times out. Here's some info on the configuration: There are two servers, a main and a backup. Both are up and communicating with most users. They listen on ports 80 and 63016. If the connection fails on port 80, it tries 63016. If the main server cannot be connected to, it tries the backup server with the same ports. My best guess is because it's communicating on port 80 (the http protocol's port), some firewall or security program is blocking the packets because they aren't standard http traffic. It may look like malware trying to "phone home". Which would explain why the connection goes through but the data does not. The client never tries the other port because it successfully connected (I'm in the process of changing this behavior now.) Please, if you have any ideas or things I can try, I'd be greatly appreciative. I'm at the end of my rope here.

    Visual Basic help sysadmin security debugging question

  • Don't allow notifyIcon to be hidden
    L LCARS x32

    Ho hum... that's what I was afraid of. lol. Thanks for the replies. Looks like I'll have to find a "creative solution". The Code Project and it's community ROCKS! :cool: -Ray Jeff Computers StudyX.com

    Visual Basic com json question

  • Don't allow notifyIcon to be hidden
    L LCARS x32

    What I meant was, if the user has auto hiding of their notify icons turned on, the icon gets "hidden" (where you have to push the arrow to see the "hidden" icons). We need ours to always be visible. It's not that the icon is disappearing, per se; it's being hidden until the user clicks that arrow. Sorry for the confusion :) -Ray Jeff Computers StudyX.com

    Visual Basic com json question

  • Don't allow notifyIcon to be hidden
    L LCARS x32

    Is there some way to stop Windows from hiding a notifyIcon? I'm not afraid of API calls if they're necessary. We're developing a program that will minimize to the tray and it's important that it's icon is always visible (it updates the user by changing the icon as events occur). I'm sure there's a way, since the Windows icons do it. Thanks, Ray Phillips Jeff Computers StudyX.com

    Visual Basic com json question

  • Change startup dir
    L LCARS x32

    If I understand you correctly, the following should work:

    System.IO.Directory.SetCurrentDirectory("c:\myfolderpath")

    Hope that helps. -Ray

    Visual Basic question

  • Visual Basic
    L LCARS x32

    Computafreak wrote:

    (unless you like the elegant, flowing symbols of C#)

    I think you mean "unless you like trying to figure out where the heck you're missing that curly bracket". :) Visual Basic an excellent programming language that is popular with beginners and experts alike because it's easy to understand, and has a very English-like syntax. All while still having the power of the .NET framework at its disposal. Visual Basic is also very good for rapid application development thanks to the very well thought out Visual Studio IDE. -Ray Phillips

    Visual Basic question

  • Hiding the Script Combobox in FONT Dialog
    L LCARS x32

    I don't know if this is what you are looking for or not. This doesn't make the combobox disappear completely, but it gets rid of all of the choices except for the default.

        Dim myFont As New FontDialog
        myFont.AllowScriptChange = True
        myFont.ShowDialog()
    

    Hope that helps. -Ray

    Visual Basic question tools

  • Problem with restarting thread
    L LCARS x32

    You could also create a new instance of the thread just before starting it. Hope that helps, -Ray

    Visual Basic json help question

  • Declaring a array
    L LCARS x32

    I agree with David Anton. Example:

    'Declare the array:
    Dim myIntArray(2) as Integer

    myIntArray(0) = 9

    myIntArray(1) = 8

    myIntArray(2) = myIntArray(0) - myIntArray(1) 'The value becomes 1 (9 - 8)

    That's how it's used. -Ray

    Visual Basic csharp data-structures

  • "Add to Windows Media Player list" from vb.net
    L LCARS x32

    Looking though the file options for WMA files, I found that when you click on a WMA file, Windows uses the following command: "C:\Program Files\Windows Media Player\wmplayer.exe" /prefetch:5 /Play "%L" %L is the path to the file/files (I assume). You will have to experiment. Usually %1 indicates the path. Hope that helps, Ray

    Visual Basic help csharp database visual-studio

  • Problem when Resoluction Change
    L LCARS x32

    I had a similar problem. Set the "AutoScaleMode" property of the form to "Off". When you change the DPI, it's auto-scaling your controls and causing them to display incorrectly. Hope that helps, -Ray

    Visual Basic help tutorial

  • Newbie looking for direction
    L LCARS x32

    Wow. Those were really useful posts... Way to help out. BTW: VB.NET can do ANYTHING that C# can do. Anything. :mad: The easiest way to do what you want is with a collection. I would also get rid of the timer and just use Now.timeOfDay to get the current time. Heres an example: The example below needs the following controls on it's form:

    Control Name

    TextBox txtID
    Button btnAdd
    Button btnSave
    ListBox lstResults

    'Begin Code:
    '============================================================================================================
    Option Explicit On
    Option Strict On

    Public Class Form1

    'Create a new structure to make saving our data easy.
    Private Structure Competitor
        Dim ID As String
        Dim FinishTime As DateTime
    End Structure
    
    'Create a collection to hold all of the competitors.
    'I like using collections instead of arrays because 
    'they're easy to resize
    Dim myCompetitors As New Collection
    
    Private Sub btnAdd\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    
        'Create a competitor variable to temporarily hold the
        'competitor we are adding.
        Dim currentCompetitor As New Competitor
    
        'Set their ID to the the text of the textbox
        currentCompetitor.ID = txtID.Text
        'Set the finish time to the current date/time
        currentCompetitor.FinishTime = Now
    
        'Add the competitor to the collection
        myCompetitors.Add(currentCompetitor)
    
        'Update the list of competitors/times
        UpdateResults()
    
        'Reset the textbox and give it focus 
        'so we don't have to click on anything
        'to enter the next competitor.
        txtID.Text = ""
        txtID.Focus()
    
    End Sub
    
    Private Sub UpdateResults()
        'This sub updates the listbox with all of 
        'the competitors in the collection.
    
        'Clear the contents of the listbox
        lstResults.Items.Clear()
    
        'Loop through the collection, adding the competitors information
        'to the listbox.
        For Each currentCompetitor As Competitor In myCompetitors
    
            'add the competitor's ID followed by the date and time of their finish.
            'if you want to show just their time, you would 
            'change currentCompetitor.FinishTime.ToString to cur
    
    Visual Basic

  • Changing the middle/wheel click to click-n-drag
    L LCARS x32

    Hello Farzad, I know this was posted a while back, but I want to help. As it turns out, I was working on a similar program not to long ago and was able to modify it for your use. It's kind of hodge-podged together. It uses a Mouse-hooking class written in C# I came across somewhere on the net and modified for my use. The main form is written in Visual Basic .NET. You can download the code from: HERE Hope that's what you needed, Ray

    .NET (Core and Framework) c++ com question announcement workspace

  • to draw the line between the cells of msflexgrid
    L LCARS x32

    I don't know much about the MSFlexGrid control itself, but you can draw lines on any control using ControlName.CreateGraphics.DrawLine(pens.color, x1, y1, x2, y2). Hope that helps. -Ray

    Visual Basic tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups