Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB] Opening a HLP file

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Aug 02, 2007 11:18 am    Post subject: [VB] Opening a HLP file Reply with quote

I've tried to open a HLP file using a command button in VB. I tried the code below...


Command1_Click() wrote:
Call Shell(C:/WINDOWS/Administrator/desktop/New Folder/Help.hlp)


I gave my friend a copy but his computer is not maned Administrator, so he cannot open the Help.hlp file. Any solutions?

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Thu Aug 02, 2007 11:25 am    Post subject: Reply with quote

Code:

TCHAR tszDesktop[MAX_PATH];

if (SUCCEEDED(SHGetSpecialFolderPath(NULL, tszDesktop, CSIDL_DESKTOPDIRECTORY, 0))
{
      PathAppend(tszDesktop, TEXT("New Folder\\Help.hlp"));
      if (GetFileAttributes(tszDesktop) != INVALID_FILE_ATTRIBUTES)
      {
            ShellExecute(NULL, TEXT("open"), tszDesktop, NULL, NULL, SW_SHOW);
      }
}



oh wait you can't do this because you're using VISUAL BASIC and VISUAL BASIC SUCKS.
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Aug 02, 2007 12:11 pm    Post subject: Reply with quote

I get the point! I'm just learning it so I can get a hold on programing before I learn C++.
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Thu Aug 02, 2007 12:20 pm    Post subject: Reply with quote

Start with C++ right away instead of learning VB first, or if you absolutely have to learn a language before C++, go Delphi.
Back to top
View user's profile Send private message MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Thu Aug 02, 2007 12:34 pm    Post subject: Reply with quote

HornyAZNBoy wrote:
I get the point! I'm just learning it so I can get a hold on programing before I learn C++.


That defeats the purpose. VB will ruin your head. It lessens your grip on programming, because programming was not meant to be like the english language.
Back to top
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Fri Aug 03, 2007 7:24 am    Post subject: Reply with quote

why do you use call shell????
use
Shell(C:/WINDOWS/Administrator/desktop/New Folder/Help.hlp)
call is not needed
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Fri Aug 03, 2007 9:57 am    Post subject: Reply with quote

masterkert3 wrote:
why do you use call shell????
use
Shell(C:/WINDOWS/Administrator/desktop/New Folder/Help.hlp)
call is not needed


Does it matter, I use Call Shell all the time.? I'm trying to open it with out the Shell function.

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
atlantis
Advanced Cheater
Reputation: 0

Joined: 16 Jun 2007
Posts: 69

PostPosted: Fri Aug 03, 2007 11:17 am    Post subject: Reply with quote

Call Shell(Environ("homepath") & "\desktop\New Folder\Help.hlp)
if u understand.. but he must same language
lookup environ("homepath")
or if your app is in same folder use:

Call Shell(App.Path & "\" & "Help.hlp")
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Aug 03, 2007 11:24 am    Post subject: Reply with quote

atlantis: that's shameful. You shouldn't try dangerous hacks to extend the language into something more than it is- you should be encouraging the OP to learn a real, useful language that will help him solve nontrivial problems with speed and ease.
Back to top
View user's profile Send private message
Ksbunker
Advanced Cheater
Reputation: 0

Joined: 18 Oct 2006
Posts: 88

PostPosted: Sat Aug 04, 2007 12:17 am    Post subject: re: Reply with quote

No need for shell or ShellExecuteA, Windows provides API in user32.dll to acheive this very easily.

Google "WinHelpA" (*.hlp) and "HtmlHelpA" (*.chm)

For VB Specific information visit: http://www.xtremevbtalk.com/archive/index.php/t-93651.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites