473,803 Members | 3,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Win32API SystemParameter sInfo in VB.NET

Hi All,

I did try by myself and I did search on google but I can't find any info on
how to use SystemParameter sInfo Win32API in VB.NET

Any useful samples, hints, tips & tricks will be greatly appreciated!

TIA,
Shamil
--
Web: http://smsconsulting.spb.ru/shamil_s

Nov 21 '05 #1
3 8846
"Shamil Salakhetdinov" <sh****@users.m ns.ru> schrieb:
I did try by myself and I did search on google but I can't find any info
on
how to use SystemParameter sInfo Win32API in VB.NET


First, I suggest to take a look at 'SystemInformat ion'. In addition to
that, you can p/invoke 'SystemParamete rsInfo'
(<URL:http://www.pinvoke.net/default.aspx/user32.SystemPa rametersInfo>).

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

Nov 21 '05 #2
Thank you, Herfried!

I did check the URL you posted in your answer.
Looks OK but my task is more complicated I think.
I wanted to use SystemInformati on API to get NONCLIENTMETRIC S and logical
fonts information like in VB6 sample here:
http://www.activevb.de/tipps/vb6tipps/tipp0211.html

The problem is that I can't make marchaling working OK with NONCLIENTMETRIC S
class/structure.
Marchal.SizeOf( ...) returns wrong size of this structure - 200 instead of
340 and MarchalStructur eToPtr(...) doesn't work well either with
NONCLIENTMETRIC S class/structure I think (I can be wrong)

So, I may need more advanced samples/hints..
System.Windows. Forms.SystemInf ormation misses some info from
NONCLIENTMETRIC S structure....

Shamil
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:eO******** *****@TK2MSFTNG P10.phx.gbl...
"Shamil Salakhetdinov" <sh****@users.m ns.ru> schrieb:
I did try by myself and I did search on google but I can't find any info
on
how to use SystemParameter sInfo Win32API in VB.NET


First, I suggest to take a look at 'SystemInformat ion'. In addition to
that, you can p/invoke 'SystemParamete rsInfo'
(<URL:http://www.pinvoke.net/default.aspx/user32.SystemPa rametersInfo>).

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


Nov 21 '05 #3
I did find two solutions: the first one doesn't use marchaling, the second
one does use it.
Solutions are simple - they are published here:
http://smsconsulting.spb.ru/.net/tut...vb.net/ncm.htm

Shamil

"Shamil Salakhetdinov" <sh****@users.m ns.ru> wrote in message
news:11******** *******@x-files.mns.ru...
Thank you, Herfried!

I did check the URL you posted in your answer.
Looks OK but my task is more complicated I think.
I wanted to use SystemInformati on API to get NONCLIENTMETRIC S and logical
fonts information like in VB6 sample here:
http://www.activevb.de/tipps/vb6tipps/tipp0211.html

The problem is that I can't make marchaling working OK with NONCLIENTMETRIC S class/structure.
Marchal.SizeOf( ...) returns wrong size of this structure - 200 instead of
340 and MarchalStructur eToPtr(...) doesn't work well either with
NONCLIENTMETRIC S class/structure I think (I can be wrong)

So, I may need more advanced samples/hints..
System.Windows. Forms.SystemInf ormation misses some info from
NONCLIENTMETRIC S structure....

Shamil
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:eO******** *****@TK2MSFTNG P10.phx.gbl...
"Shamil Salakhetdinov" <sh****@users.m ns.ru> schrieb:
I did try by myself and I did search on google but I can't find any info on
how to use SystemParameter sInfo Win32API in VB.NET


First, I suggest to take a look at 'SystemInformat ion'. In addition to
that, you can p/invoke 'SystemParamete rsInfo'
(<URL:http://www.pinvoke.net/default.aspx/user32.SystemPa rametersInfo>).

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


Nov 21 '05 #4

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

Similar topics

3
48227
by: Matt Smith | last post by:
hi all, again.... having another problem with python COMs, I run a python script on a win2000 machine, that uses win32com.client and it runs perfectly, whereas when I come to run it on a win98 machine (the machine that the code, when completed, will be running from in the future) it returns the error: Traceback (most recent call last): File "firsttry.py", line 1, in ?
5
7451
by: Gary Richardson | last post by:
I'm trying to use win32api.SetCursorPos() to position the cursor in a Tkinter canvas window. I.e.: from Tkinter import * import win32api root = Tk() canvas = Canvas(root, width=400, height=300, bg='white') canvas.pack() win32api.SetCursorPos(100,100) root.mainloop()
6
485
by: Mike S. | last post by:
I'm using a SystemParametersInfo call to attempt to manage the screen saver. All I want to do is modify the ScreenSaveActive bit in the registry and have the OS recognize it (and occasionally set it back to -0-). Theoretically this should be easy to accomplish through the call shown below. If I trace the call with SysInternals (si)Registry Monitor I can see the call being made. Unfortunately in the si QueryValue for the key...
2
6043
by: philippe.joliet | last post by:
Hello, I'm currently try to use the SystemParametersInfo function in a c# environnement but I have a problem to use it with the action SPI_SETWORKAREA I've got this definition private static extern int SystemParametersInfo(int uAction, int
2
1818
by: Dwight Trumbower | last post by:
I need to disable the screen saver, due to an Excel "bug". I thought I had the following code working, but now all I get is code 127. I've searched the net and I don't see anything wrong with the following. public static extern int SystemParametersInfo(int uiAction, int uiParam, string pvParam, int fuWinIni);
1
5211
by: David | last post by:
Hi, I'm trying to use SystemParametersInfo to get the desktop work area: Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Integer, ByVal uParam As Integer, ByRef lpvParam As Integer, ByVal fuWinIni As Integer) As Integer Dim rc As Rectangle
0
3819
by: Mike | last post by:
Hi. I have Python 2.4 installed on my local machine in c:\Python24. I have also downloaded the python for windows extensions installer pywin32-208.win32-py2.4.exe and installed this to C:\Python24\Lib\site-packages Trying to run a python script through a C# console app is causing me problems: the last line of code in the following block results in a no module named win32ap error. I'm not sure if this is because there is no
1
2831
by: Michiel Overtoom | last post by:
On Saturday 19 July 2008 21:13:04 Lamonte Harris wrote: What are the actions you do and the commands you give, and what is the precise error you get? Greetings, -- "The ability of the OSS process to collect and harness
0
936
by: limhyeam | last post by:
Hi all, I am trying to look high and low on this issue. I know that we can use DeviceInfo to get the UUID, however, I was also trying to get the UUID using SystemParametersInfo.. I get 1439 Win39Error. I dont know what is wrong with it as the documentation in MSDN on this is only one line. Can anyone point out what is wrong with this line? Thanks. byte UUID = new byte; const uint SPI_GETUUID = 263; SystemParametersInfo(SPI_GETUUID,...
0
9566
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
10317
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
10300
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
9127
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7607
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
6844
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2974
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.