Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSubject message not passing to outlook window from VB6.0 Pin
kk20141-May-14 3:53
kk20141-May-14 3:53 
AnswerRe: Subject message not passing to outlook window from VB6.0 Pin
Dave Kreskowiak1-May-14 5:23
mveDave Kreskowiak1-May-14 5:23 
QuestionNeed help on "Competition Scheduling" Algorithm Pin
N.Wang30-Apr-14 16:43
professionalN.Wang30-Apr-14 16:43 
QuestionTwitter REST API V1.1 Pin
Pete_12328-Apr-14 8:10
Pete_12328-Apr-14 8:10 
AnswerRe: Twitter REST API V1.1 Pin
Richard Deeming28-Apr-14 8:27
mveRichard Deeming28-Apr-14 8:27 
GeneralRe: Twitter REST API V1.1 Pin
Pete_12328-Apr-14 9:20
Pete_12328-Apr-14 9:20 
AnswerRe: Twitter REST API V1.1 Pin
HenryHugo28-Apr-14 21:38
professionalHenryHugo28-Apr-14 21:38 
QuestionVB.Net - Best practice to store paths as relative path Pin
Bart Van Eyndhoven27-Apr-14 23:42
Bart Van Eyndhoven27-Apr-14 23:42 
Hi there,

This is a bit of a complicated question.

I'm building a Windows Form Application. In the database, there are paths to certain external resources. All of these resources are in a pool. In the past, just the absolute paths to the resources were saved, but now, I want to implement the app.config file to define a path to a "resource pool" and save the data as absolute paths from this pool.

All of the resources are on the same server, so I would like to get UNC paths. Problem is: the current paths are stored as normal Windows paths using a mapped network drive.

For example: the resource pool is located at \\fileserver\resx\resources. There's a mappad drive, X:, referring to \\fileserver\resx. In the current database, paths are stored as \\fileserver\resx\resources\img\img1.jpg or as X:\resources\img\img1.jpg (both notations are used randomly across the records).

What I want to achieve is the following. Let's say I've got the following URLs:
VB
Dim strBase as String = "\\fileserver\resx\resources"
Dim strUrlA as String = "X:\resources\img\img1.jpg" 'X: refers to \\fileserver\resx
Dim strUrlB as String = "\\fileserver\resx\resources\img\img1.jpg"
Dim strUrlC as String = "Y:\tracks\track1.mp3" 'Y: refers to \\fileserver\audio
Dim strUrlD as String = "\\fileserver\audio\tracks\track1.mp3"


Is there a method to convert those files as being relative to the pool? In this case, both strUrlA and strUrlB would be converted to img\img1.jpg and both strUrlC and strUrlD would be converted to ..\..\audio\tracks\track1.mp3.

What would be a good way to handle this?

Thanks in advance!

Cheers!
AnswerRe: VB.Net - Best practice to store paths as relative path Pin
Richard Deeming28-Apr-14 2:07
mveRichard Deeming28-Apr-14 2:07 
GeneralRe: VB.Net - Best practice to store paths as relative path Pin
Bart Van Eyndhoven28-Apr-14 2:41
Bart Van Eyndhoven28-Apr-14 2:41 
GeneralRe: VB.Net - Best practice to store paths as relative path Pin
Richard Deeming28-Apr-14 2:48
mveRichard Deeming28-Apr-14 2:48 
Questionhow to combine 3 cells into one cell in datagridview Pin
sensizbenlik26-Apr-14 15:22
sensizbenlik26-Apr-14 15:22 
AnswerRe: how to combine 3 cells into one cell in datagridview Pin
khei-chan00729-Apr-14 20:48
khei-chan00729-Apr-14 20:48 
AnswerRe: how to combine 3 cells into one cell in datagridview Pin
Simon_Whale29-Apr-14 22:14
Simon_Whale29-Apr-14 22:14 
QuestionPrevent clicking on controls inside a groupbox without disabling Pin
dilkonika26-Apr-14 2:38
dilkonika26-Apr-14 2:38 
AnswerRe: Prevent clicking on controls inside a groupbox without disabling Pin
Dave Kreskowiak26-Apr-14 3:07
mveDave Kreskowiak26-Apr-14 3:07 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
dilkonika26-Apr-14 4:06
dilkonika26-Apr-14 4:06 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
Dave Kreskowiak26-Apr-14 13:31
mveDave Kreskowiak26-Apr-14 13:31 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
dilkonika27-Apr-14 3:35
dilkonika27-Apr-14 3:35 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
Dave Kreskowiak27-Apr-14 6:45
mveDave Kreskowiak27-Apr-14 6:45 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
dilkonika27-Apr-14 7:47
dilkonika27-Apr-14 7:47 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
Dave Kreskowiak27-Apr-14 11:13
mveDave Kreskowiak27-Apr-14 11:13 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
dilkonika1-May-14 4:25
dilkonika1-May-14 4:25 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
Dave Kreskowiak1-May-14 5:22
mveDave Kreskowiak1-May-14 5:22 
GeneralRe: Prevent clicking on controls inside a groupbox without disabling Pin
dilkonika1-May-14 6:15
dilkonika1-May-14 6:15 

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.