Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / December 2005

Tip: Looking for answers? Try searching our database.

Width of scrollbar under Pocket PC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon Hart - 23 Dec 2005 21:30 GMT
Anyone know of managed code or P/invoke to do this?

Cheers
Simon.
Alex Feinman (MVP) - 23 Dec 2005 21:52 GMT
> Anyone know of managed code or P/invoke to do this?
>
> Cheers
> Simon.

I assume you are not talking about a standalone scroll bar control,
since that one can be simply resized. Which one? Listview? Edit?
Listbox/Combobox?
Simon Hart - 23 Dec 2005 22:31 GMT
Sorry for not being clear on this. I am using VScrollbar class.

I need to know the system width of a standard scrollbar if one exists. This
is to support hires devices. I have written a UserControl class which
consumes the VScrollbar class and there is no way (to my knowledge) of
knowing whether I am running > QVGA device. Because of this I cannot hard
code with width.

Using ContainerControl.AutoScaleDimensions returns 0 when called within a
inherited UserControl class.

This needs to be supported from WM2003SE and onwards inc WM2005.

Cheers
Simon.

>> Anyone know of managed code or P/invoke to do this?
>>
[quoted text clipped - 3 lines]
> that one can be simply resized. Which one? Listview? Edit?
> Listbox/Combobox?
Daniel Moth - 23 Dec 2005 23:14 GMT
> knowing whether I am running > QVGA device. Because of this I cannot hard
See the Screen.PrimaryScreen.Bounds.Width... For dpi look at the
Graphics.DpiX property...

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

> Sorry for not being clear on this. I am using VScrollbar class.
>
[quoted text clipped - 19 lines]
>> that one can be simply resized. Which one? Listview? Edit?
>> Listbox/Combobox?
Simon Hart - 24 Dec 2005 09:28 GMT
I can't use GDI because this is a OwnerDrawn class which is inherited by
another UserControl which actually does the GDI. This owner drawn classes
takes care of the items, events and scrollbar etc.

However, I could use the Screen class to figure out if running > 96 dpi.
This is how I used to handle DPI aware under CF1.

Cheers
Simon.

>> knowing whether I am running > QVGA device. Because of this I cannot hard
> See the Screen.PrimaryScreen.Bounds.Width... For dpi look at the
[quoted text clipped - 28 lines]
>>> since that one can be simply resized. Which one? Listview? Edit?
>>> Listbox/Combobox?
Graham McKechnie - 24 Dec 2005 01:43 GMT
Simon,

What if you pass in the UserControl's form - you could use
if ( ((Form)owner).AutoScaleDimensions.Width == 192f)

Graham

> Sorry for not being clear on this. I am using VScrollbar class.
>
[quoted text clipped - 19 lines]
>> that one can be simply resized. Which one? Listview? Edit?
>> Listbox/Combobox?
Simon Hart - 24 Dec 2005 09:34 GMT
Graham,

Not quite as easy to do as this particular class is an OwnerDrawn form which
gets inherited from. Thanks for the suggestion. See my above post.
Cheers
Simon.
> Simon,
>
[quoted text clipped - 26 lines]
>>> since that one can be simply resized. Which one? Listview? Edit?
>>> Listbox/Combobox?
Alex Yakhnin [MVP] - 27 Dec 2005 00:22 GMT
You can P/Inovke the GetSystemMetrics:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/ce
refGetSystemMetrics.asp


--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org

> Graham,
>
[quoted text clipped - 32 lines]
>>>> since that one can be simply resized. Which one? Listview? Edit?
>>>> Listbox/Combobox?
Alex Yakhnin [MVP] - 27 Dec 2005 14:51 GMT
Didn't realize that SDF already includes that in the
OpenNETCF.Windows.Forms.SystemInformationEx

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org

> You can P/Inovke the GetSystemMetrics:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/ce
refGetSystemMetrics.asp

[quoted text clipped - 39 lines]
> >>>> since that one can be simply resized. Which one? Listview? Edit?
> >>>> Listbox/Combobox?
Simon Hart - 30 Dec 2005 10:24 GMT
Cool, nor did I, thanks Alex.

Cheers
Simon.

> Didn't realize that SDF already includes that in the
> OpenNETCF.Windows.Forms.SystemInformationEx
[quoted text clipped - 49 lines]
>> >>>> since that one can be simply resized. Which one? Listview? Edit?
>> >>>> Listbox/Combobox?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.