Hack Forums
[.NET] [TuT] How to use all Dialogs in VB - Font, Color, Open & Save! - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [TuT] How to use all Dialogs in VB - Font, Color, Open & Save! (/showthread.php?tid=247223)

Pages: Pages 1 2 3


* - CustomiZer - Mar 24, 2010

No you did not end the If statement. Check it out.


* - GoldStar - Mar 24, 2010

(Mar 12, 2010 08:37 AM)icyberhack Wrote:  An end if is missed in the end of the first code :

CORRECTED :
Code
Dim OpenMe As New OpenFileDialog
        OpenMe.Filter = "Executable file(*.exe)|*.exe"
        If OpenMe.ShowDialog = Windows.Forms.DialogResult.OK Then
            TextBox1.Text = OpenMe.FileName
        Else
            MsgBox("Error, please select valid file.", MsgBoxStyle.Critical, "Error")
EndIf
            Exit Sub

🤣 Wrong correction xD End If AFTER exiting the sub.


* - Soul Collector - Mar 24, 2010

(Mar 24, 2010 12:47 PM)Miharbi-DoNo Wrote:  ðŸ¤£ Wrong correction xD End If AFTER exiting the sub.


Haha, owned. 🤣


* - CustomiZer - Mar 24, 2010

😊..don't laugh at a beginer guys 😭
I was just trying to learn😵


* - GoldStar - Mar 24, 2010

(Mar 24, 2010 12:55 PM)icyberhack Wrote:  ðŸ˜Š..don't laugh at a beginer guys 😭
I was just trying to learn😵

nah don't worry ^^ didn't mean it that way ^^


* - Soul Collector - Mar 24, 2010

And some douchebag rated this thread with 1 star, lol.


* - TsGh ComPleX - Mar 24, 2010

Wow great overall tutorial soul!


* - Vipermakd - May 28, 2010

Awesome post . helped me alot thanx


* - ★Cooldude★ - May 28, 2010

Hey, thanks for these. What about print dialog?


* - GodWall - May 28, 2010

Very nice, This was helpful learning tut gr8 for beguilers like me, I am having trouble with the SaveFile Dialog, but rest work good 4 me, I changed .exe to .txt I want to be able to save textbox1.text to a .txt file in the resources folder of my app, how can I use this code to do that any ideas?


* - Feather - Jun 17, 2010

This is cool, gonna check this out :) great Tutorial.


* - midwest - Jun 26, 2010

This is great man! Thanks for the help, I hadn't ever known how to save or open files.


* - kVp - Jun 30, 2010

keep posting it's pretty cool!


* - iShockYouu - Jun 30, 2010

another way for the OpenFileDialog is just type

PHP Code

<?php 
OpenFileDialog1
.ShowDialog() 

then you can open what ever you want :)


* - willgtl - Jun 30, 2010

(Jun 30, 2010 05:16 AM)iShockYouu Wrote:  another way for the OpenFileDialog is just type

PHP Code

<?php 
OpenFileDialog1
.ShowDialog() 

then you can open what ever you want :)

Only problem is if you just do .ShowDialog() you don't have any properties nor do you have a statement set for when a file is opened or the dialog is closed.

Awesome tutorial, man.