473,412 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Are associated file loactions dynamic?

I am having a problem!

I am using the Task Pane control which MS gave out in their VBPowerPack.

If I add an image to the task frame I have to use a physical path e.g.
c:\connected.bmp as opposed to a more dynamic path such as
System.Environment.CurrentDirectory & "\Images\Connected.bmp".

With a picture box for example I would generally leave it blank and then add
the image at runtime using something like :

image.fromfile(System.Environment.CurrentDirectory & "\Images\Connected.bmp")

thereby allowing the user to have control as to where they can save the
application as the image path is dynamic and the image directory added by the
installer.

I tried editing the VS designer generated code to use a path like the one
above and it works at runtime but I lose the design time view of the image.
It also causes the task frames to render the wrong size being slightly too
short.

Does anyone have any ideas (or better controls) which would help.

P.S. I hope some of that made some sense!
--
If at first you don't succeed... Hide the evidence that you tried!
Nov 21 '05 #1
1 1098
"Director - Minvent" <Di*************@discussions.microsoft.com> schrieb:>
If I add an image to the task frame I have to use a physical path e.g.
c:\connected.bmp as opposed to a more dynamic path
such as System.Environment.CurrentDirectory & "\Images\Connected.bmp".
Always use 'System.IO.Path.Combine' to combine two paths!
With a picture box for example I would generally leave it
blank and then add the image at runtime using something
like :

image.fromfile(System.Environment.CurrentDirectory &
"\Images\Connected.bmp")

thereby allowing the user to have control as to where they can
save the application as the image path is dynamic and the
image directory added by the installer.


Set the images in your form's constructor directly after the call to
'InitializeComponent'. You can check the form's 'DesignMode' property to
see if the form is in design mode.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vagabond Software | last post by:
I'm writing an application where then end-user will want to view and print (not edit) TIFF and JPEG images. For now, I simply use the System.Diagnostics.Process.Start method to open the desired...
5
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the...
2
by: Doug Bell | last post by:
Hi, Recently I asked how to write code to open an App from its associated file. I got assistance from Ken show me the Process.Start command. I would now like to start the App that I have built...
1
by: Sasie7679 | last post by:
We have a requirement to display all registered file extensions and there associated exe path. I can retreive the registered file extensions using "RegEnumKey" API by enumerating "HKEY_CLASSES_ROOT"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.