473,782 Members | 2,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

some miscellaneous questions ...

hi, i have some questions about programming with visual basic .net ...

1) how do i display the Copyright icon properly? (the letter 'C' enclosed by
a circle)
2) how to detect the operating system of the computer using the class
library of .net framework 1.1?
3) how to determine the installation location of the executable file? (tits,
if the exe file is installed at C:\Program Files\vb program\vbasic. exe, how
do i determine the 'C:\Program Files\vb program\' within the program)

thanks a lot!

--
Xero

http://www.chezjeff.net
My personal web portal
Nov 23 '05 #1
4 1446
1. © copy paste or ALT 0169
2. System.Environm ent.OSVersion.T oString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirecto ryName(System.R eflection.Assem bly.GetExecutin gAssembly.Locat ion())
End Get
End Property
hth

Michel Posseth [MCP]

"Xero" wrote:
hi, i have some questions about programming with visual basic .net ...

1) how do i display the Copyright icon properly? (the letter 'C' enclosed by
a circle)
2) how to detect the operating system of the computer using the class
library of .net framework 1.1?
3) how to determine the installation location of the executable file? (tits,
if the exe file is installed at C:\Program Files\vb program\vbasic. exe, how
do i determine the 'C:\Program Files\vb program\' within the program)

thanks a lot!

--
Xero

http://www.chezjeff.net
My personal web portal

Nov 23 '05 #2
Hi to add to Michel,

If it's a winapp you can also use Application.Sta rtupPath
And if you want some more information abouyt the windows you're running you
can also use wmi, you need to add a reference to system.manageme nt and a
multiline textbox called txtWindows for this to work:

Dim moReturn As Management.Mana gementObjectCol lection
Dim moSearch As Management.Mana gementObjectSea rcher
Dim mo As Management.Mana gementObject
moSearch = New Management.Mana gementObjectSea rcher("Select * from
Win32_Operating System")
moReturn = moSearch.Get
For Each mo In moReturn
txtWindows.Text &= "Name: " & String.Format(" {0}", mo("Caption")) &
vbCrLf
txtWindows.Text &= "Service Pack: " & String.Format(" {0}",
mo("ServicePack MajorVersion")) & vbCrLf
txtWindows.Text &= "Version: " & String.Format(" {0}", mo("Version")) &
vbCrLf
txtWindows.Text &= "Producent: " & String.Format(" {0}",
mo("Manufacture r")) & vbCrLf
txtWindows.Text &= "Serialnumb er: " & String.Format(" {0}",
mo("SerialNumbe r")) & vbCrLf
Next

hth Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"M. Posseth" <MP******@discu ssions.microsof t.com> schreef in bericht
news:00******** *************** ***********@mic rosoft.com...
1. © copy paste or ALT 0169
2. System.Environm ent.OSVersion.T oString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirecto ryName(System.R eflection.Assem bly.GetExecutin gAssembly.Locat i
on()) End Get
End Property
hth

Michel Posseth [MCP]

"Xero" wrote:
hi, i have some questions about programming with visual basic .net ...

1) how do i display the Copyright icon properly? (the letter 'C' enclosed by a circle)
2) how to detect the operating system of the computer using the class
library of .net framework 1.1?
3) how to determine the installation location of the executable file? (tits, if the exe file is installed at C:\Program Files\vb program\vbasic. exe, how do i determine the 'C:\Program Files\vb program\' within the program)

thanks a lot!

--
Xero

http://www.chezjeff.net
My personal web portal

Nov 23 '05 #3
thanks again
--
Xero

http://www.chezjeff.net
My personal web portal
"M. Posseth" wrote:
1. © copy paste or ALT 0169
2. System.Environm ent.OSVersion.T oString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirecto ryName(System.R eflection.Assem bly.GetExecutin gAssembly.Locat ion())
End Get
End Property
hth

Michel Posseth [MCP]

"Xero" wrote:
hi, i have some questions about programming with visual basic .net ...

1) how do i display the Copyright icon properly? (the letter 'C' enclosed by
a circle)
2) how to detect the operating system of the computer using the class
library of .net framework 1.1?
3) how to determine the installation location of the executable file? (tits,
if the exe file is installed at C:\Program Files\vb program\vbasic. exe, how
do i determine the 'C:\Program Files\vb program\' within the program)

thanks a lot!

--
Xero

http://www.chezjeff.net
My personal web portal

Nov 23 '05 #4
"Xero" <jeff_at_chezje ff_dot_net> schrieb:
3) how to determine the installation location of the executable file?
(tits,
if the exe file is installed at C:\Program Files\vb program\vbasic. exe,
how
do i determine the 'C:\Program Files\vb program\' within the program)


\\\
Imports System.IO
Imports System.Reflecti on
..
..
..
Private Function ApplicationPath () As String
Return _
Path.GetDirecto ryName([Assembly].GetEntryAssemb ly().Location)
End Function
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #5

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

Similar topics

7
1896
by: Irma | last post by:
Hi, Could you please help me? I have a problem with my page and I really can't find where is the error. I have a iframe in the middle of the page, everything is fine but at the moment I minimize everything in the frame is messed up. I don't know if I have to work with the frame or the problem is the docs. I show in the frame.
1
1816
by: Tony Johansson | last post by:
Hello Experts! I have some questions about inheritance that I want to have an answer to. It says "Abstract superclasses define a behavioral pattern without specifying the implementation" I know that an abstract class doesn't have any implementaion even if a default implementatiion can be supplied for pure virtual methods. What does it actually mean with saying that an Abstract superclasses define a behavioral pattern?
30
9854
by: btober | last post by:
Whenever I create a temporary table, with something like CREATE TEMPORARY TABLE temptable1 AS SELECT * FROM paid.ad_hoc_query; New schemas appear, with names like "pg_temp_1". I guess the appearance of these schemas with "temp" in the name indicates that they are "temporary" schemas and related to the temporary table creation, but the schemas persist even after the end of the session in which the temporary table was created.
193
9648
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I speak only of features in the spirit of C; something like object-orientation, though a nice feature, does not belong in C. Something like being able to #define a #define would be very handy, though, e.g: #define DECLARE_FOO(bar) #define...
50
4375
by: Jatinder | last post by:
I 'm a professional looking for the job.In interview these questions were asked with some others which I answered.But some of them left unanswered.Plz help. Here are some questions on C/C++, OS internals? Q1 . What is the use of pointer to an array? Q2 . What is the use of array of pointers? Q3 . What is the use of pointer to function ? Q4 . How to print through serial port? What is Flow Control(Xon,Xoff) ?
24
1719
by: Kevin | last post by:
Hey guys. I'm looking to get together some VB programmers on Yahoo messenger. I sit at a computer and program all day. I have about 3 or 4 people already, but it would be really cool to have a much larger list of people (for all of us to benefit). I have found it to be an invaluable resource to answer those hard or weird programming questions that come up. If you are interested, please reply, or send me an email at imgroup@gmail.com
7
2358
by: changs | last post by:
Hi, all I have a asm code, I suspect it sort of socket programming. Can anyone here give some instructions on how to determine the function or give the psudo-code in C? Thanks in advance! Tony
0
9267
Ganon11
by: Ganon11 | last post by:
The Miscellaneous Discussions forum is for any technology related question, comment, concern, or discussion. However, we encourage you to look at the full list of forums before deciding this is the best place for your thread. For instance, a question about C/C++ technically fits into this forum, but it would be much better in our C/C++ forum. Just browse quickly through the list to see if we have a forum that would be more relevant to your...
0
9639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10308
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10143
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.