473,587 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ 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 1078
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****@sturmne t.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(re f m);

if (m.Msg == 0x0084 /* WM_NCHITTEST */) {
if (m.Result == (IntPtr) HitTest.HTCLIEN T) {
m.Result = (IntPtr) HitTest.HTCAPTI ON;
}
}
}

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
1713
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: innodb_data_file_path=ibdata1:1024M;ibdata2:64M:autoextend:max:1024M My questions are:
18
1799
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
3418
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 me on this project? It looks to be a simple project, and I will start relearning pearl, but any help appreciated! I need to read and parse a...
27
4599
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 = $doc->loadHTMLFile("./aBasicSearchResult.html"); if ( $res == true ) { $zip = $doc->getElementById('zipRaw_id')->value; if ( 0 != $zip ) {
1
1629
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 here). Its really a very simple stored procedure but I simply can't seem to get it to work. I have a simple table misc_data described as ff: ...
7
2090
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 identify any questions they have missed out and print out a simple error message. It correctly identify which questions have not been filled in but...
1
1306
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 for credit cards. When I formet the cell for a "number" it automatically changes the last number of my entry to 0 and/or it changes the format of a...
1
1175
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 the .NET RichTextBox component. Since the lexing is done in realtime at the time the user is typing/editing on the RichTextBox, it is high time...
17
5799
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: _________________________________________________________________ /* Simple Thread Object ______________________________________________________________*/ #include <pthread.h> extern "C" void* thread_entry(void*);
4
1575
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 page, contains a sequence of questions. Each question is a link to another page which details the answers of the specific question, any user can be...
0
7915
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...
0
7843
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...
0
8205
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. ...
0
8339
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...
1
7967
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...
1
5712
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...
0
5392
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...
1
2347
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 we have to send another system
0
1185
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...

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.