Click here to Skip to main content
16,004,977 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: System.Timers.ElapsedEventArgs Pin
Christian Graus14-Dec-07 15:37
protectorChristian Graus14-Dec-07 15:37 
GeneralRe: System.Timers.ElapsedEventArgs Pin
Raveheart17-Dec-07 4:30
Raveheart17-Dec-07 4:30 
GeneralWindows platform SDK Pin
plural14-Dec-07 2:25
plural14-Dec-07 2:25 
GeneralRe: Windows platform SDK Pin
Dave Kreskowiak14-Dec-07 3:57
mveDave Kreskowiak14-Dec-07 3:57 
QuestionHow to Export gridview data to Excel file in VB.NET standalone application Pin
Jats_4ru14-Dec-07 1:12
Jats_4ru14-Dec-07 1:12 
AnswerRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Dave Kreskowiak14-Dec-07 3:56
mveDave Kreskowiak14-Dec-07 3:56 
GeneralRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Jats_4ru14-Dec-07 4:09
Jats_4ru14-Dec-07 4:09 
GeneralRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Dave Kreskowiak14-Dec-07 5:28
mveDave Kreskowiak14-Dec-07 5:28 
Jats_4ru wrote:
but i have no knowledge of C#


BS. You know more than you think you do. Take a look at a bunch of documentation in the MSDN Help for Visual Studio. Notice that there are thousands of examples of small bits of code in both C# AND VB.NET. Compare the two and you'll find C# has a lot in common with VB. Most of what you see has nothing to do with either language anyway since alot of code just manipulates objects in the .NET Framework.

For example, these two pieces out of the MSDN docs on the ManagementObjectSearcher class are, line-for-line, identical:
' VB.NET
Imports System
Imports System.Management
 
Public Class Sample
    Public Overloads Shared Function _
        Main(ByVal args() As String) As Integer
 
        Dim s As New ManagementObjectSearcher( _
            "root\MyApp", _
            "SELECT * FROM Win32_Service", _
            New EnumerationOptions( _
            Nothing, System.TimeSpan.MaxValue, 1, _
            True, False, True, True, False, _
            True, True))
 
        For Each service As ManagementObject In s.Get()
            'show the instance
            Console.WriteLine(service.ToString())
        Next
    End Function
End Class

// C#
using System;
using System.Management;
 
public class Sample 
{
    public static void Main(string[] args) 
    {
        ManagementObjectSearcher s = 
            new ManagementObjectSearcher(
            "root\\CIMV2", 
            "SELECT * FROM Win32_Service", 
            new EnumerationOptions(
            null, System.TimeSpan.MaxValue,
            1, true, false, true, 
            true, false, true, true));
 
        foreach (ManagementObject service in s.Get()) 
        {
            // show the service
            Console.WriteLine(service.ToString());
        }
    }
}

All you have to do is compare each line to see that they both specify the exact same things, just using a slightly different syntax.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




AnswerRe: How to Export gridview data to Excel file in VB.NET standalone application Pin
Paul Conrad24-Dec-07 11:38
professionalPaul Conrad24-Dec-07 11:38 
Questionhow to calculate the date? Pin
sathyan_829413-Dec-07 23:06
sathyan_829413-Dec-07 23:06 
AnswerRe: how to calculate the date? Pin
Christian Graus13-Dec-07 23:35
protectorChristian Graus13-Dec-07 23:35 
GeneralCrystal Report(Vb.net) Pin
~V~13-Dec-07 21:39
~V~13-Dec-07 21:39 
GeneralRe: Crystal Report(Vb.net) Pin
Tom Deketelaere14-Dec-07 1:24
professionalTom Deketelaere14-Dec-07 1:24 
GeneralRe: Crystal Report(Vb.net) Pin
~V~14-Dec-07 19:19
~V~14-Dec-07 19:19 
GeneralRe: Crystal Report(Vb.net) Pin
Tom Deketelaere17-Dec-07 1:15
professionalTom Deketelaere17-Dec-07 1:15 
GeneralRe: Crystal Report(Vb.net) Pin
~V~16-Dec-07 18:13
~V~16-Dec-07 18:13 
GeneralRe: Crystal Report(Vb.net) [modified] Pin
~V~19-Dec-07 0:07
~V~19-Dec-07 0:07 
QuestionHow to Sort DataGridView Combobox Column? Pin
rashadaliarshad13-Dec-07 21:18
rashadaliarshad13-Dec-07 21:18 
Generali am using rich text box in vb.net Pin
Deepthy.P.M13-Dec-07 20:43
Deepthy.P.M13-Dec-07 20:43 
GeneralRe: i am using rich text box in vb.net Pin
Christian Graus13-Dec-07 21:54
protectorChristian Graus13-Dec-07 21:54 
GeneralReading .pdf file using visual basic code Pin
rkuravi13-Dec-07 19:35
rkuravi13-Dec-07 19:35 
GeneralRe: Reading .pdf file using visual basic code Pin
Christian Graus13-Dec-07 21:55
protectorChristian Graus13-Dec-07 21:55 
Generalhelp me to generate barcode with vb.net Pin
sitt13-Dec-07 19:18
sitt13-Dec-07 19:18 
GeneralRe: help me to generate barcode with vb.net Pin
Christian Graus13-Dec-07 21:58
protectorChristian Graus13-Dec-07 21:58 
GeneralRe: help me to generate barcode with vb.net Pin
sitt14-Dec-07 0:27
sitt14-Dec-07 0:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.