Per rilevare da programma o da riga di comando se siamo connessi in una sessione di desktop remoto o terminal server, basta leggere la variabile di ambiente SESSIONNAME creata da windows.
Environ("SESSIONNAME")
Conterrà "Console" se siamo in locale
Conterrà "RDP-Tcp#0" se siamo in una sessione remota (0 può essere qualsiasi numero, dipende dal numero delle connessioni attuali)
;-)
Visualizzazione post con etichetta Visual Basic. Mostra tutti i post
Visualizzazione post con etichetta Visual Basic. Mostra tutti i post
giovedì 17 settembre 2015
martedì 14 dicembre 2010
Installare Visual Basic 6 su Windows 7 a 64 bit
Il seguente articolo è stato tratto da http://forum.html.it/forum/showthread.php?threadid=1367132
1. eseguire una copia del disco d'installazione di Visual Studio 6 sul disco rigido del nostro pc, dove più vi pare,(io ho cerato una cartella sul desktop);
2. aprite la cartella dove avete copiato i dati del disco, entrate nella sottocartella "Setup" e lì cercate un file con estension .stf (il nome esatto del file cambia in base all'edizione di Visual Studio 6 che state installando, ad esempio per la versione Professional è "vs98pro.stf"o "vb98pro.stf", per la versione Enterprise è "vs98ent.stf" o "vb98ent.stf" ecc...), una volta trovato il file, fatene due copie nella medesima cartella e rinominate una copia in "acmsetup.stf" e l'altra in "acost.exe";
3. copiate l'intero contenuto della cartella "Setup" (quella in cui abbiamo lavorato nel punto precedente) nella cartella superiore, quella principale che contiene il file acmboot.exe;
4. infine, lanciate (come amministratore su Vista e Windows 7) il programma "acmsetup.exe", ora l'installazione dovrebbe partire senza problemi.
-------------------------------------------------------------------------------------
Per installare il Service Pack 6 bisogna procedere in modo analogo.
Cioè:
"entra nella cartella SP6 e cerca il file chiamato " sp698ent.stf " fai 2 copie di questo file nella stessa cartella , e rinomina i due file in questo modo :
acost.exe e acmsetup.stf
ora lancia il file acmsetup.exe eseguendolo da amministratore , l'installazione andrà a buon fine senza nessun problema."
Questa procedura l'ho presa da qui http://forum.masterdrive.it/visual-basic-6-17/service-pack-6-in-windows-7-64-bit-43670/
;-)
1. eseguire una copia del disco d'installazione di Visual Studio 6 sul disco rigido del nostro pc, dove più vi pare,(io ho cerato una cartella sul desktop);
2. aprite la cartella dove avete copiato i dati del disco, entrate nella sottocartella "Setup" e lì cercate un file con estension .stf (il nome esatto del file cambia in base all'edizione di Visual Studio 6 che state installando, ad esempio per la versione Professional è "vs98pro.stf"o "vb98pro.stf", per la versione Enterprise è "vs98ent.stf" o "vb98ent.stf" ecc...), una volta trovato il file, fatene due copie nella medesima cartella e rinominate una copia in "acmsetup.stf" e l'altra in "acost.exe";
3. copiate l'intero contenuto della cartella "Setup" (quella in cui abbiamo lavorato nel punto precedente) nella cartella superiore, quella principale che contiene il file acmboot.exe;
4. infine, lanciate (come amministratore su Vista e Windows 7) il programma "acmsetup.exe", ora l'installazione dovrebbe partire senza problemi.
-------------------------------------------------------------------------------------
Per installare il Service Pack 6 bisogna procedere in modo analogo.
Cioè:
"entra nella cartella SP6 e cerca il file chiamato " sp698ent.stf " fai 2 copie di questo file nella stessa cartella , e rinomina i due file in questo modo :
acost.exe e acmsetup.stf
ora lancia il file acmsetup.exe eseguendolo da amministratore , l'installazione andrà a buon fine senza nessun problema."
Questa procedura l'ho presa da qui http://forum.masterdrive.it/visual-basic-6-17/service-pack-6-in-windows-7-64-bit-43670/
;-)
Etichette:
Visual Basic,
Windows 7
mercoledì 3 febbraio 2010
Modifiche a programmi VB6 per farli funzionare in Vista
Tratto da
http://www.vbforums.com/showthread.php?p=2807202#post2807202
;-)
http://www.vbforums.com/showthread.php?p=2807202#post2807202
Modifications Required for VB6 Applications to Work on Vista/7
I have compiled a list of changes required for your VB6 application to work correctly on Vista. If you learn something new please post the information in this thread. Every once in awhile I will edit this first post to keep the list complete. So far this is what is known:
Application Changes
- Remove SendKeys calls and replace them with API code.
- Use the HKEY_CURRENT_USER in the registry for the settings of your application. Do not write to HKEY_LOCAL_MACHINE.
- If you are using ADO use 2.8 and above in your application.
- If you are using XML use XML version 3.0 and above in your application
- If you are using the PlaySound API, if your wave files are not PCM but mpeg layer-3 make sure your mpeg wave files are Stereo and not Mono.
- If you need the Printer Setup dialog either using the Common Dialog Control, or by using the API functions, the dialog will not return the correct number of copies. The dialog will always return 1 on Vista. The way around this bug is to create your own Printer Setup dialog box and when you get the correct number of copies you will have to send to the printer multiple times to print out multiple copies. Here is a link that discusses this issue in details.
- Relocate settings files, data files etc into "Common Files" (C:\Users\Public) instead of "Program Files". You should use the API calls to locate these folders because the folders are in different paths for different machines and OSs. Hereis a link that discusses this issue in details.
- Per-user settings should be in a separate file located under "Application Data" and this should also be requested of the OS in the same manner.
- For "Common Files" ask for ssfCOMMONDATA (or CSIDL_COMMON_APPDATA).
- For "Application Data" ask for ssfAPPDATA (or CSIDL_APPDATA). To properly use these filesystem locations you are supposed to create a subdirectory for your "company name" and under that another for your "application name." Then put your settings or data under that.
- Any working "document" files that are meant to be found and manipulated by the user (i.e. via Explorer) should be placed into CSIDL_PERSONAL ("My Documents") or CSIDL_COMMON_DOCUMENTS ("All Users\Documents").
- DeleteSetting no longer works without a key. e.g. DeleteSetting "Mytestprogram, "General" fails to delete anything and gives an error. but DeleteSetting "Mytestprogram, "General","keyname" works fine. It seems that key is no longer Optional in: DeleteSetting appname, section[, key] as in documentation. Credit: roylow
Setup Package Changes
Administrator Account running your Setup Package
- Require users to "Run as Administrator" directly in your setup package.
- Inform users to right-click the setup package and click "Run As Administrator".
Non-Administrator Account running your Setup Package
- Remove the VB6 Runtime files, MDAC and any of these files from your setup package.
Visual Basic IDE Changes
- If you are using Visual Basic 6.0 on Vista, you will notice a latency in speed. This can be solved by using "Windows Classic Theme" or "Windows Vista Basic theme" instead of the new Vista Theme with the Aero effect.
Useful Links
- Teach Your Apps To Play Nicely With Windows Vista User Account Control
- Understanding and Configuring User Account Control in Windows Vista
Credits
- Thanks to RobDog888 for his links and knowledge on VB6 / Vista issues from several of his posts.
Etichette:
Visual Basic
Visual Basic runtime DLLs and Controls
Come riparare ad errori di installazione per programmi scritti in Visual Basic.
http://www.angelfire.com/biz/rhaminisys/vboledll.html
;-)
http://www.angelfire.com/biz/rhaminisys/vboledll.html
;-)
Etichette:
Visual Basic
Iscriviti a:
Post (Atom)