I have a form in which I have set the border style to None so that there is
no caption, no close box, etc.
I use this code to be able to click the form and move in the absense of the
caption:
Protected Overrides Sub WndProc(ByRef m As System.Windows. Forms.Message)
Const WmNcHitTest As Integer = &H84
Const HtCaption As Integer = 2
If m.Msg = WmNcHitTest Then
m.Result = New IntPtr(HtCaptio n)
Else
MyBase.WndProc( m) 'THIS IS IMPORTANT!
End If
End Sub
And this works well. My problem comes when I placed a panel on the form
and set it's Dock property to Fill. Now when I click on the form, I am
actually clicking on the panel and so the NCHitTest message is not getting
sent to the form. In fact, I am using a custom panel inherited from the
regular panel in which I am doing all the painting. If override the
WndProc method of the panel, then clicking on the panel MOVES THE PANEL
around the form but does not move the form.
I need to somehow have the form interrupt the message first and process it
if it is an NCHitTest message.
Can anyone provide me with any guidance?
Thanks,
--
Chris
dunawayc[AT]sbcglobal_lunch meat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address. 2 1497
Can't you fire an event from the panel up to the form and handle it there?
"Chris Dunaway" <"dunawayc[[at]_lunchmeat_sbcg lobal[dot]]net"> wrote in
message news:ku******** *************** ****@40tude.net ... I have a form in which I have set the border style to None so that there is no caption, no close box, etc.
I use this code to be able to click the form and move in the absense of the caption:
Protected Overrides Sub WndProc(ByRef m As System.Windows. Forms.Message) Const WmNcHitTest As Integer = &H84 Const HtCaption As Integer = 2
If m.Msg = WmNcHitTest Then m.Result = New IntPtr(HtCaptio n) Else MyBase.WndProc( m) 'THIS IS IMPORTANT! End If End Sub
And this works well. My problem comes when I placed a panel on the form and set it's Dock property to Fill. Now when I click on the form, I am actually clicking on the panel and so the NCHitTest message is not getting sent to the form. In fact, I am using a custom panel inherited from the regular panel in which I am doing all the painting. If override the WndProc method of the panel, then clicking on the panel MOVES THE PANEL around the form but does not move the form.
I need to somehow have the form interrupt the message first and process it if it is an NCHitTest message.
Can anyone provide me with any guidance?
Thanks,
-- Chris
dunawayc[AT]sbcglobal_lunch meat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and replace certain words in my E-Mail address.
On Mon, 18 Oct 2004 20:57:06 +0100, Robin Tucker wrote: Can't you fire an event from the panel up to the form and handle it there?
What event would I fire? This is a Windows Message that occurs when the
mouse is clicked on the non client area. It then "tricks" Windows into
thinking you clicked on the caption.
--
Chris
dunawayc[AT]sbcglobal_lunch meat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brad Tilley |
last post by:
Can Python parse a mbox file and forward each individual message within
that file to someone else?
For example, let's say I have a 10MB mbox file that has 678 messages.
I'd like to send each of the messages to santa.claus@northpole.com...
how might I do that? Also, how might I handle messages that have an
attachment associated with them during the forward process?
Thanks,
Brad
|
by: Binod Nair |
last post by:
Hi All,
I have an ASP.NET appication running on http://xx.xxx.xxxx.xx/aspApplication
and I have a domain http://www.mydomain.com registered at godaddy.com for
this application.I have setup domain forwarding at goDaddy.com to forward to
http://xx.xxx.xxxx.xx/aspApplication. I am using Forms Authentication on the
application.Now the problem i am facing is , when i login to the application
through http://xx.xxx.xxxx.xx/aspApplication...
|
by: Brian Keating EI9FXB |
last post by:
I wonder can anyone reccomment a solution to this problem.
Let me explain, I've services running on my system, my
application receives diagnostic messages from these services, what i want to
do is create an MDIChild window for each service that is sending messages.
Ok so far so good, but I get problems if one service is constantly sending
messages to it's window because, this window is very busy updating it's view,
hence because it's...
|
by: Brian Keating EI9FXB |
last post by:
Would I be correct in saying that the only way to get a user message into a
Windows form would be to use P/Invoke with Message?
Of is there some part of the .NET API that I am totally un aware of?
Thanks for any help
Brian
|
by: Adam Clauss |
last post by:
As the built in interface for forwarding ports in Windows 2003 Routing and
Remote Access has several 'difficiencies' (like the ability to forward a
RANGE of ports), I would like to write an application to do this.
Any ideas on how I would go about accessing and modifying these attributes?
Thanks
--
Adam Clauss
| |
by: nicholas |
last post by:
I use session variables that stores data for a shopping basket.
The site runs at www.mysite.com/france and works fine.
But I also have the domainname: www.mysiteforfrance.com
So, on a Plesk admin, I set a frame forwarding on www.mysiteforfrance.com to
www.mysite.com/france
When a visitor goes to www.mysiteforfrance.com he can visit the whole site,
but in the adres bar he always sees www.mysiteforfrance.com. (in other
words: this is...
|
by: pigeonrandle |
last post by:
Hi,
Does anyone know if there is a way to foward messages that a form
receives to another application form.
I was thinking i could override WndProc, but i don't know how to
forward any messages to another application?!
Any ideas greatfully appreciated (in advance!).
James Randle.
|
by: Ney André de Mello Zunino |
last post by:
Hello.
I have written a simple reference-counting smart pointer class template
called RefCountPtr<T>. It works in conjunction with another class,
ReferenceCountable, which is responsible for the actual counting. Here
is the latter's definition:
// --- Begin ReferenceCountable.h ----------
class ReferenceCountable
|
by: Dave |
last post by:
Hi All,
I'm experiencing problems with sending mail using mail() to forwarded
email accounts. The problem seems to revolve around the optional 4th
argument of mail(), namely 'additional headers'.
It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.
|
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,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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...
|
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...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |