Click here to Skip to main content
15,915,603 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDropdownList Pin
macca2411-Nov-05 3:03
macca2411-Nov-05 3:03 
QuestionHow to paint VS.Net ToolBar control Pin
Anindya Chatterjee11-Nov-05 2:12
Anindya Chatterjee11-Nov-05 2:12 
QuestionThumbnails to Word thru VB6 Pin
dsrahul11-Nov-05 1:45
dsrahul11-Nov-05 1:45 
QuestionWindow Form like Google Desktop ??? Pin
faviochilo11-Nov-05 1:33
faviochilo11-Nov-05 1:33 
QuestionGeneral failure in component GDI+ Pin
Me.MyBase11-Nov-05 0:38
Me.MyBase11-Nov-05 0:38 
QuestionWhatsThisHelp Click Event Pin
Jottum11-Nov-05 0:34
Jottum11-Nov-05 0:34 
Questionfile permission in vb Pin
uktrips00710-Nov-05 23:40
uktrips00710-Nov-05 23:40 
AnswerRe: file permission in vb Pin
Jottum11-Nov-05 2:43
Jottum11-Nov-05 2:43 
Disable File Sharing for your App folder and it can only be xecuted
from the local computer. However, if the user has sufficient permissions they can share it anyway and still launch your App from the network.

I can't check the below code right now, no network. So forgive me if it doesn't work.

- Create a new project
- Add two labels next to each other on form one.

<br />
Private Sub Form_Load()<br />
<br />
   Label1.Caption = "Path:"<br />
<br />
   'If you only want one instance of your app<br />
<br />
   If App.PrevInstance Then<br />
      MsgBox "You are not allowed to start more then one instance of My App.", vbExclamation + vbOKOnly, "My App"<br />
      Unload Me<br />
   End If<br />
<br />
   Label2.Caption = App.Path 'Display path.<br />
   <br />
   ' Check if excuted from network<br />
   <br />
   If InStrB(Label2.Caption, "\\") <> 0 Then ' Double slash is network path<br />
      MsgBox "You are not allowed to start My App from a remote computer.", vbExclamation + vbOKOnly, "My App"<br />
   Unload Me<br />
   End If<br />
<br />
End Sub<br />


Compile the code and run the exe. Run it again while the other is still open and see what happens. Close the exe. Now start it from a different computer on your network and see if it starts or displays the message.

HTH

Jottum

-- modified at 8:45 Friday 11th November, 2005
AnswerRe: file permission in vb Pin
Dave Kreskowiak11-Nov-05 3:29
mveDave Kreskowiak11-Nov-05 3:29 
QuestionExecuting MS-Acess queries from a text file Pin
sarah_chandran10-Nov-05 19:30
sarah_chandran10-Nov-05 19:30 
AnswerRe: Executing MS-Acess queries from a text file Pin
DA_Loring10-Nov-05 20:52
DA_Loring10-Nov-05 20:52 
QuestionDifference in Constructor and Page_Init() Pin
RSNSI10-Nov-05 17:32
RSNSI10-Nov-05 17:32 
QuestionDisplay Images in Dropdown Pin
RSNSI10-Nov-05 17:30
RSNSI10-Nov-05 17:30 
QuestionHow to create a Visual Browser Pin
charmkid10-Nov-05 12:44
charmkid10-Nov-05 12:44 
AnswerRe: How to create a Visual Browser Pin
Christian Graus10-Nov-05 12:46
protectorChristian Graus10-Nov-05 12:46 
QuestionSelecting a path only using CommonDialog control Pin
TAlvord10-Nov-05 7:05
TAlvord10-Nov-05 7:05 
AnswerRe: Selecting a path only using CommonDialog control Pin
KaptinKrunch10-Nov-05 8:28
KaptinKrunch10-Nov-05 8:28 
AnswerRe: Selecting a path only using CommonDialog control Pin
rwestgraham10-Nov-05 8:36
rwestgraham10-Nov-05 8:36 
GeneralSolution: Pin
TAlvord14-Nov-05 5:44
TAlvord14-Nov-05 5:44 
AnswerRe: Selecting a path only using CommonDialog control Pin
dsrahul11-Nov-05 1:51
dsrahul11-Nov-05 1:51 
QuestionNeed Help from a real programmer!!! Pin
alexvw10-Nov-05 6:18
alexvw10-Nov-05 6:18 
AnswerRe: Need Help from a real programmer!!! Pin
Christian Graus10-Nov-05 12:45
protectorChristian Graus10-Nov-05 12:45 
GeneralRe: Need Help from a real programmer!!! Pin
alexvw24-Nov-05 1:41
alexvw24-Nov-05 1:41 
AnswerRe: Need Help from a real programmer!!! Pin
Steve Pullan10-Nov-05 12:58
Steve Pullan10-Nov-05 12:58 
GeneralRe: Need Help from a real programmer!!! Pin
alexvw24-Nov-05 1:42
alexvw24-Nov-05 1:42 

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.