How can i make button whos load .ini file ?
please help me :rolleyes: :afrog:
Added [RESOLVED] to thread title and green "resolved" checkmark - Hack
Printable View
How can i make button whos load .ini file ?
please help me :rolleyes: :afrog:
Added [RESOLVED] to thread title and green "resolved" checkmark - Hack
Welcome to Forums, GoA_TrancE! :wave:
Can you please be a little more descriptive.
you mean a button that loads an ini file? what would the ini file load into? textbox?, label, table ? please explain more fully
when i click on the button i wana just open a .ini file
i was try with shell "brum.ini", vbNormalNoFocus
but i got "Type Michmash":(
now i think correctly :)
Do you want to launch the file or read it and load settings into your application? You see you have to explain what you want to do clearly.
i'm assuming he wants to open the file and read it
Assumptions and Confirmations don't always match so let him confirm it first. :)
i just wana open the file (launch)
any ideas?
In that case here is the simplest code to begin with:
VB Code:
Private Sub Command1_Click() Shell "notepad c:\test.ini", vbNormalFocus End Sub
In case that doesn't work for you (I can't think about why not) then here is more robust api sample:
VB Code:
Option Explicit Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL = 1 Private Sub Command1_Click() ShellExecute Me.hwnd, vbNullString, "test.ini", vbNullString, "C:\", SW_SHOWNORMAL End Sub
ty very much working perfectly ;) i am happy now
Great! :wave: