Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-18-2009, 03:08 PM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
Wink Read .MIS files with Style. (VB.net)

VB.net is great for beginners. Especially the intellisense features. Highly recommended.

This is just in case anyone wants to learn, im not selfish with my source code, at least not yet on these little programs.

Code:
Public Class Form1
    Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click

        'Create a new dialog
        Dim o As New OpenFileDialog

        o.Title = "Choose MIS"

        o.Filter = "Mission File (*.MIS)|*.MIS"

        If o.ShowDialog = Windows.Forms.DialogResult.OK Then
            'Import dialog selection from user to RichTextBox
            datainputbu.Text = My.Computer.FileSystem.ReadAllText(o.FileName)

        End If
    End Sub

    Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click

        'Create new save dialog
        Dim s As New OpenFileDialog

        s.Title = "SaveMIS"

        s.Filter = "Mission File (*.MIS)|*.MIS"

        If s.ShowDialog = Windows.Forms.DialogResult.OK Then

            'Save the file as plain text, as to not lose any formatting
            datainputbu.SaveFile(s.FileName, RichTextBoxStreamType.PlainText)

        End If
    End Sub

   
    Private Sub BackgroundColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackgroundColorToolStripMenuItem.Click

        'Create new color dialog for background color of RichTextBox
        Dim cd1 As New ColorDialog

        If cd1.ShowDialog = Windows.Forms.DialogResult.OK Then

            'Set backcolor to user selection
            datainputbu.BackColor = cd1.Color

        End If


    End Sub

    Private Sub TextColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextColorToolStripMenuItem.Click

        'Create new color dialog for text color
        Dim cd2 As New ColorDialog

        If cd2.ShowDialog = Windows.Forms.DialogResult.OK Then

            'Set text color to selection
            datainputbu.ForeColor = cd2.Color

        End If

    End Sub

    Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click

        datainputbu.Cut()

    End Sub

    Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click

        datainputbu.Copy()

    End Sub

    Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem.Click

        datainputbu.Paste()

    End Sub

    Private Sub SelectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectAllToolStripMenuItem.Click

        datainputbu.SelectAll()

    End Sub

    Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click

        'Create new font dialog
        Dim font As New FontDialog

        If font.ShowDialog = Windows.Forms.DialogResult.OK Then
            'Use font selected by user
            datainputbu.Font = font.Font

        End If

    End Sub
End Class


(The background and text colors can be changed to whatever, the font as well. You can open and save .MIS files. No complex features yet though I have some in mind.

Copyright © 2008 Bullet Magnet. All wrongs reserved.
Reply With Quote
  #2  
Old 01-18-2009, 05:29 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
C# == Better
__________________
Reply With Quote
  #3  
Old 01-18-2009, 09:28 PM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
Yea lol, non-debatable.

I actually plan on starting to learn C# soon after I get fairly good at VB.net if I want to "make it in the real world." It doesn't seem real popular among us Delta Force programmers. Delphi, VB, and a bit of C++ seems to be the most popular.

But anyways, I hope I can learn some C#. Is that what you use?
Reply With Quote
  #4  
Old 01-18-2009, 09:47 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
Yeah C# is pretty easy. I am just starting to learn it. My friend and I made an app for my company. I know java and php so it helps.

I was trying to get my MCPD but school takes too much itme
__________________
Reply With Quote
  #5  
Old 01-19-2009, 09:11 AM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
there may be some difference the deeper you go, but I haven't really found much difference between vb.net or c# - its basically just minor syntax differences.


ie

Code:
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click

        'Create a new dialog
        Dim o As New OpenFileDialog

        o.Title = "Choose MIS"

        o.Filter = "Mission File (*.MIS)|*.MIS"

        If o.ShowDialog = Windows.Forms.DialogResult.OK Then
            'Import dialog selection from user to RichTextBox
            datainputbu.Text = My.Computer.FileSystem.ReadAllText(o.FileName)

        End If
    End Sub
in VB.net translates into

Code:
private void toolStripLabel1_Click(object sender, EventArgs e)
        {
        //Create a new dialog
            OpenFileDialog o = new OpenFileDialog();



        o.Title = "Choose MIS";

        o.Filter = "Mission File (*.MIS)|*.MIS";
        

        if (o.ShowDialog()== System.Windows.Forms.DialogResult.OK)
            {
            //Import dialog selection from user to RichTextBox
            datainputbu.Text = System.IO.File.ReadAllText(o.FileName);

            }
    

        }

Really not that much of a difference, at least at this level of programing. Maybe once you get into structs and types it may be more different.


I regularly bounce between vb.net and c# and delphi, just depends on my mood and project. Any thing vb.net can do c# can do and vice versa so really its more just looks.
Reply With Quote
  #6  
Old 01-19-2009, 04:12 PM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
Yea I don't really want to learn another language's syntax but i'll have a go at it. Delphi/Pascal I work in a little too. Love it because it doesn't require any run-time files or the .NET framework, and it's not just overly hard to learn, lot of similarites with VB.

Anyways good to have someone in the community to still talk programming with.
Reply With Quote
  #7  
Old 01-19-2009, 06:12 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
I like delphi because the windows API functions are built right in, don't have to do any of the clunky load library calls. And as you said, no runtime.

I use c#/vb.net for things that are harder to do in delphi... for example I have a program in mind that I would like to display proper html pages in.

I'm going to use C# for that, as my version of delphi I haven't been able to readily find a way to display html pages... It appears I have to use a 3rd party component to do so, which my version doesn't allow.
Reply With Quote
  #8  
Old 01-19-2009, 06:45 PM
--BulletMagnet-- is offline --BulletMagnet--
--BulletMagnet--'s Avatar
DF2 Forever

Join Date: Jun 2005
Location: USA
Posts: 718

Send a message via MSN to --BulletMagnet--
Hmm to display HTML pages, I always just used a multiline textbox or richtextbox (those things are loevely), and it was very simple to load them in using the read all text method. Easy stuff, but you may wanting to be doing something more complicated.

One other reason I don't use Delphi so much is because it isn't exactly supported that much anymore while VB.net is everywhere. The more VB.net noobies around the better lol.

Oh and I know some very basic ASM lol. Old school.

I'm actually good at writing programs straight from binary :P

So do you have any programs released yet? If so i'd like to see them. Maybe even a bit of source code to learn from lol.
Reply With Quote
  #9  
Old 01-19-2009, 06:49 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
VB is the most different from any language I have come across.

C++, C#, JAVA and PHP all have very similar syntax but VB doesn't.

I need to get into ASP.net, that is where the $$ is
__________________
Reply With Quote
  #10  
Old 01-19-2009, 07:20 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
I wrote cs cache nuke available for download @ dfbarracks.com, clears out the cache folder for BHD.

I have an other program that I haven't released yet that I use to get my public IP.


Most of what I write are small, half written stuff that throw together to quickly help me get something done.

For example, I have one that I used to search the Anaconda server manager logs to see when a particular person or IP was in the server.

Still others are just exploratory stuff, like thanks to Dstructor (author of pinger) I got a sample app that will convert your IP and port into the novakey.


I have looked at assembly, even started reading a pdf file on it, thats as far as I went. I know enough C/C++ that I can understand basically what is going on and convert it to an other programing language. Haven't tried to really write any thing in C/C++ in a few years.


And of course I know html, php, picking up javascript (working on a website that uses AJAX ).


@atholon.. I agree, vb.net does have a unique syntax. And knowing php really helped with picking up c#, which in turn has helped out with javascript lol.


VB's style is almost english, and it is because of that that I learned it first, starting back in quickbasic.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.net Hex Editing --BulletMagnet-- Web design and Programming 2 11-19-2012 02:02 PM
Vb.net!!!! JonM Web design and Programming 16 09-04-2005 06:09 PM
DF-Files.net killer_charge News 8 11-01-2004 07:39 PM
Mis Files dont work Se7eN Delta Force 4 07-16-2002 01:12 AM
BMS / MIS files SSGWarHog Delta Force 2 07-09-2002 04:26 AM


All times are GMT -5. The time now is 11:20 PM.




Powered by vBulletin®