473,473 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Simple GUI questions

I'm making a very simple slideshow application. The issue I'm facing now is
the application (by design) has no menus or max/min/close icons. It's
basically just a rectangle as far as the end user is concerned.

Now, because the standard windows toolbar is suppressed, there's no way to
"move" the window. What I'd like to be able to do is have a transparent
control over my viewable area, so the user can drag anywhere that's visible
and drop it wherever. I have a feeling I'm dramatically over-complicating
this, so alternative solutions would be very much welcomed.

Anyway, are there built in events for handling this functionality, or do I
need to get into MouseDown/MouseUp logic? That could get ugly in a hurry
I'd imagine.

Also, what type of controls support transparency? I set the background
color of a Panel to Transparent, but that just made it the form's background
color. I need true transparency, which I imagine means I'm going to
override whatever method handles background painting?

Thanks in advance!
Dec 16 '06 #1
3 1068
Hello James,

I think you wouldn't need a transparent control to do this. I have only
recently published an old example of how this can be done on my blog at

http://www.sturmnet.org/blog/archive...n-client-area/

Hope it helps!
Oliver Sturm
--
http://www.sturmnet.org/blog
Dec 16 '06 #2
I want the entire form to be clickable/draggable...not just a specific part.
And I need it to involve no additional gui elements (visually). So I think
I'm stuck with a transparent control that goes over the entire viewable
area.

"Oliver Sturm" <ol****@sturmnet.orgwrote in message
news:xn****************@msnews.microsoft.com...
Hello James,

I think you wouldn't need a transparent control to do this. I have only
recently published an old example of how this can be done on my blog at
http://www.sturmnet.org/blog/archive...n-client-area/

Hope it helps!
Oliver Sturm
--
http://www.sturmnet.org/blog

Dec 17 '06 #3
Hello James,
>I want the entire form to be clickable/draggable...not just a specific
part. And I need it to involve no additional gui elements (visually).
Well, that's the easy part of that sample program then :-) You just have
to remove a lot of the code from the WndProc method, so that it looks like
this:

protected override void WndProc(ref Message m) {
base.WndProc(ref m);

if (m.Msg == 0x0084 /* WM_NCHITTEST */) {
if (m.Result == (IntPtr) HitTest.HTCLIENT) {
m.Result = (IntPtr) HitTest.HTCAPTION;
}
}
}

And of course you can remove all the code everywhere else that deals with
the handling of the "sensitive" rectangles on the sample form.

Thinking about it... instead of removing code from my sample, you could
also just create a new form in your own project and add the method above -
that should do it. Oh, and copy over the HitTest enum from my sample. That
should really be all you need
Oliver Sturm
--
http://www.sturmnet.org/blog
Dec 17 '06 #4

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

Similar topics

1
by: yiyun | last post by:
Hi, I am new to mysql and I want to ask a simple questions. I would like to initialize my InnoDB table space and I configure like below: ...
18
by: Geoff Cox | last post by:
Hello, I am trying to print out the array values for a second time but get error on page message? Thanks Geoff <html>
1
by: Proteus | last post by:
Any help appreciated on a small perl project I need to write for educator/teaching purposes. I have not programmed perl for some time, need to get up to speed, maybe some kind souls hrere will help...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
1
by: E.T. Grey | last post by:
I have been busting my nut over this for pretty much most of the day and it is driving me nuts. I posted this to an mySQL ng yesterday and I have not had any response (I'm pulling my hair out...
7
by: javedna | last post by:
Hi guys Ive got a simple problem, im designing an online questionnaire and on submission the coding that I have used to validate whether a user has filled in all the questions is supposed to...
1
by: chelisek | last post by:
I have two simple questions: I am trying to create a document using an excel spreadsheet format. I am trying to create a column that will contain numbers, just plain numbers as in account numbers...
1
by: Itanium | last post by:
Hi all! I'm new to .NET Platform and got some simple questions about efficiency... To put you in situation, to say that I'm involved in the writing of a complex regex based lexer for use over...
17
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /*...
4
by: maheshgupta0248 | last post by:
Hi all, Im a newbie in php, started learning php on my own. I want to create small website using php, that contains links for two simple webpages > C questions > C++ questions C questions...
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
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
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
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...

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.