3 Replies - 318 Views - Last Post: 23 October 2019 - 10:44 AM Rate Topic: -----

#1 ruimiguel_17   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-October 19

Open specific folder when pressing a button - Visual Basic

Posted 23 October 2019 - 05:43 AM

Eu criei um software de optimização para a empresa que trabalho em visual basic. Não sou nenhum programador, mas sempre me aventurei a fazer coisas que via na internet em visual basic.

I developed an optimizer software to the company I work in visual basic. I'm not a developer, but I always enjoyed to reply softwares that I used to see online using visual basic.

O meu problema é que quando eu carregar num botão, quero que ele abra uma pasta em específico. Se eu usa-se apenas o meu software no meu computador, poderia criar um link remoto para a localização da pasta e ela abriria sem problema, mas como vai ser usado em outros computadores, essa mesma pasta não abre, aparecendo um erro, pois obviamente, essa pasta não está na mesma localização que o programa procura, porque o link remoto é diferente em todos os computadores.

My problem now is that when I press a button, I want it to open a specific folder. If I could just use this software on my computer, I could just type a code to follow a remote path link and the folder would open, but because is going to be used on other computers, this method does not work.

Este é o código atual, simples, mas que apenas funciona no meu computador.

This is the actual code that I use but only works on my computer.

 System.Diagnostics.Process.Start("C:\Users\Armando\Downloads\Miguel\Oxford Search Engine\DIRECTORY\UNIT 90") 


Sendo assim, eu queria fazer o upload da pasta em questão com os arquivos que necessito nela para o visual studio e depois escrever o código para que o programa abra a pasta.

So, I would like to make upload of that folder with all the files that I need on it to visual studio and then write a code in visual basic to open that specific folder.

Outra solução que seja possível para o mesmo efeito também pode ajudar. Só estou com este problema atualmente. Se fosse para ser usado apenas no meu PC, colocaria o link remoto e o software abriria a pasta imediatamente.

Any other solution to my problem is very welcome. This is my only problem right now.

Sugestões ou alguém que possa ajudar?

Suggestions or anyone who can help?

Preciso do código em Visual Basic.

I need the code in Visual Basic.

Is This A Good Question/Topic? 0
  • +

Replies To: Open specific folder when pressing a button - Visual Basic

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15359
  • View blog
  • Posts: 61,599
  • Joined: 12-June 08

Re: Open specific folder when pressing a button - Visual Basic

Posted 23 October 2019 - 08:02 AM

What are you trying to open up on other people's computers?
Was This Post Helpful? 0
  • +
  • -

#3 ruimiguel_17   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-October 19

Re: Open specific folder when pressing a button - Visual Basic

Posted 23 October 2019 - 10:33 AM

So, I have a folder full of PDF files but I created sub folders to organize those pdf files. So, if I press the button 1, I would want to open the folder that contains all pdf files for unit number 1. My problem is I can't make it work like this
 System.Diagnostics.Process.Start("C:\Users\Armando\Downloads\Miguel\Oxford Search Engine\DIRECTORY\UNIT 90") 
because this path belogs to the computer I'm working on. If I install my software on any other PC, it will pop up an error because C:\Users\Armando does not exist on the other computers.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15359
  • View blog
  • Posts: 61,599
  • Joined: 12-June 08

Re: Open specific folder when pressing a button - Visual Basic

Posted 23 October 2019 - 10:44 AM

Are these folders going to be moving around with your app? If so you can 'Environment.CurrentDirectory' to concatenate with the folder paths to get what you want, regardless of the folder location.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1