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
  • Open Bmp File

    help linux question
    2
    0 Votes
    2 Posts
    0 Views
    D
    What your looking for is in this[^] post. Or, if your using VB.NET, you can use Process.Start and Process.StartInfo to do the same thing. Docs on that can be found here[^]. RageInTheMachine9532
  • User login with Wizard Connection

    database sql-server sysadmin help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Printer Handshake

    help
    2
    0 Votes
    2 Posts
    0 Views
    D
    This article should give you a start.. '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd
  • still chart

    database data-structures help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    S
    hi Adhizzz. i hope this helps Print a Microsoft Access report from VB 6.0 As you may know, Microsoft Access provides a much more robust reporting system than Visual Basic. As a result, if you use Access as a back-end to your application, you may want to print Access reports from your VB application. Fortunately, you can do just that with Automation. The following code shows one way to do so, using late binding. remember to replace dbName and rptName with correct values: Dim objAccess As Object Private Sub Command1_Click() Dim dbName As String Dim rptName As String Dim Preview As Long Const acNormal = 0 Const acPreview = 2 dbName = "D:\PathToDB\db1.mdb" rptName = "MyReportName" Preview = acPreview 'acNormal With objAccess .OpenCurrentDatabase filepath:=dbName If Preview = acPreview Then .Visible = True .DoCmd.OpenReport rptName, Preview Else .DoCmd.OpenReport rptName End If End With End Sub Private Sub Form_Load() Set objAccess = CreateObject("Access.Application") End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next objAccess.Quit On Error GoTo 0 Set objAccess = Nothing End Sub :rose::rose:
  • how to open Main,Mid,Child Form?

    help question tutorial
    2
    0 Votes
    2 Posts
    0 Views
    S
    hi samerali, i don get your problem. with form1, form2 n form3 as u describe, this code works for me the way u want. assume each form has a button1: '//in form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim NewChild As New Form2() 'Display the new form. NewChild.Show() End Sub '//form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim NewChild As New Form3() 'Display the new form. NewChild.Show() End Sub '//form3 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() End Sub :rose::rose:
  • 0 Votes
    3 Posts
    0 Views
    S
    hi Tridip Bhattacharjee, A patch is simply a setup which makes changes to an existing application rather than instal a new one altogether. If u break your interface, u need to compile your application again; if there are database changes (if the application uses databases), then you need a script(s) to duplicate all changes to your customers' databases - without losing their data! This is your patch. :rose::rose:
  • KeyBinding to Office Add-In

    csharp help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Serialising objects which change alot

    regex tutorial
    7
    0 Votes
    7 Posts
    0 Views
    C
    Ray, Replies like yours are the reason I love this web site, well thought out, constructive and strictly in the vein of the problem. Thanks you. I think I have a partially thought out solution... If I serialize class A and want to add members to it then I should derive A using class B and add the members there. I can call A.Serialize from B.SerializeOldVersion, get me? Then I can B.Serialize and B.Deserialize and all my new members will be handled correcly. OK, its partially thought out because if there are relating objects then those relationships could mudy the water somewhat. But in theory, this meets the "don't change your interfaces" school of thought. I think deriving would certainly be the way through to data conversion though, then effectively you can roll all the stuff up into one class again. My ambitious thoughts are in this area though. As I am using SOAP format for serialization as oppose to binary format, at least for the time being (there's nothing quite like being able to see your megabytes of data in text format hehehe) well...to cut a long one short, there ought to be a structured way of massaging the data. i.e. you could write an XML parser, which a very good friend of ours on here has done recently, and insert the new fields where neccessary...then hey presto. I think there is definite potential in this approach. Again, your additional thoughts are very welcome. Many thanks. Nursey
  • Deploy VBA script for Outlook

    sysadmin tools help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • HELP ME PLEASE

    help question
    3
    0 Votes
    3 Posts
    0 Views
    R
    alright i appreciate that, and i did figuare out how to report it and i already did. I hope that works and again thanks for your help
  • MDI

    help question
    3
    0 Votes
    3 Posts
    0 Views
    A
    place a command button on form 2 and write the following code behind the command button. form1.show unload me
  • H-E-L-P!!! please....

    game-dev help tutorial
    5
    0 Votes
    5 Posts
    1 Views
    C
    OK, thanks for the clarification.... A = B x C in VB Speak.... Sub DoSomethingClever() Dim A as integer ' Here is an integer number, can't handle decimal parts A = 10 * 10 ' A = 100 i.e. A = 10 x 10 the * is x in progrmaming terminolgy Dim B as integer B = A * 10 ' Now B = 1000 get it so far? Dim C as integer C = B / 100 ' Now C = 10 Dim MyWage as Single = 100.55 ' Make a floating point variable and assign it value in 1 step MyWage = MyWage * 1000 ' I wish! No wage is multiplied and stored back into the variable as 100550.00 End Sub You can do things like this now A = A / 2 ' A is divided by 2 A = (B*B) ' A = B^2 A = B + C A = A - B All of the above are things you can type into VB literally and they will work. I think there is a mathematical function called power or pwr which raises a number to a given power. If you are in VB.NET look up the Math namespace as it contains all the cos sin and tan functions to name a few. This ain't the answer to your functions but you can work it out now. If not then shout for more help. I think you do need to read a little about Sub's and Function's and where to use them. For example private function MyAge () as integer Dim a as integer = 21 Return a End Function A short example of creating a variable, assigning it a value and returning that value, therefore... Dim B as integer = MyAge Assigns B the value 21, because VB calls the MyAge function which "Returns" the value of a which = 21. Clear as mud, I know, but I'm trying to help you find the answer rather than just spew lines of code that you might not understand if things go wrong. Nursey
  • Firewall

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Telnet Character &amp; cursor attributes

    sysadmin tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • League Table - its an emergency plz help

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Get active machines

    question csharp sysadmin
    4
    0 Votes
    4 Posts
    0 Views
    D
    Then you really can't do that. You would have to write an app that can capture all the packets that come by the machine it is running on. This would only work on Ethernet segments that are running on hubs. Switches will prevent you from seeing all the packets, which is what most corporate networks are going to be built with. RageInTheMachine9532
  • Some help needed here!

    com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Sending Email problem

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Voice Communication

    lounge
    2
    0 Votes
    2 Posts
    0 Views
    C
    Vimal, You probably need to look at TAPI, the telephony API. In VB there are a few off the shelf components available. Lookup Exceletel on the web. They have a suite of tools for placing and handling calls. Be warned. This area is a minefield. Nursey