473,419 Members | 1,541 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,419 software developers and data experts.

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 1424
1. © copy paste or ALT 0169
2. System.Environment.OSVersion.ToString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirectoryName(System.Reflection.Assembly.G etExecutingAssembly.Location())
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.StartupPath
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.management and a
multiline textbox called txtWindows for this to work:

Dim moReturn As Management.ManagementObjectCollection
Dim moSearch As Management.ManagementObjectSearcher
Dim mo As Management.ManagementObject
moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_OperatingSystem")
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("ServicePackMajorVersion")) & vbCrLf
txtWindows.Text &= "Version: " & String.Format("{0}", mo("Version")) &
vbCrLf
txtWindows.Text &= "Producent: " & String.Format("{0}",
mo("Manufacturer")) & vbCrLf
txtWindows.Text &= "Serialnumber: " & String.Format("{0}",
mo("SerialNumber")) & 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******@discussions.microsoft.com> schreef in bericht
news:00**********************************@microsof t.com...
1. © copy paste or ALT 0169
2. System.Environment.OSVersion.ToString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirectoryName(System.Reflection.Assembly.G etExecutingAssembly.Locati
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.Environment.OSVersion.ToString
3. Friend Shared ReadOnly Property Assemblypath() As String
Get
Return
Path.GetDirectoryName(System.Reflection.Assembly.G etExecutingAssembly.Location())
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_chezjeff_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.Reflection
..
..
..
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetEntryAssembly().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
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...
1
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...
30
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...
193
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...
50
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...
24
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...
7
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! ...
0
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...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
1
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.