473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Creating inputless Button

I'm trying to create a button that will take no focus (it's for a
dialog designer app).

I've tried sub-classing the button control and overriding the WndProc()
function to trap button messages. This method doesn't seem to be
working, and it's doing my head in. The only other suggestion I can
come across is to draw the control using GDI+ code, which I'd prefer
not be able to do.

Is there anyone out there who has any ideas.

Thanks,
Keith

Jun 26 '06 #1
2 1194
Keith,

If it doesn't take focus, then what is the point?

Also, have you looked at the WM_SETFOCUS message? It is sent to your
window when you get focus. You can just shift the focus to another control
at that point.

Although, it sounds like you might be better off just painting a button
on the screen, since it's not going to do anything.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<ke************@gmail.com> wrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
I'm trying to create a button that will take no focus (it's for a
dialog designer app).

I've tried sub-classing the button control and overriding the WndProc()
function to trap button messages. This method doesn't seem to be
working, and it's doing my head in. The only other suggestion I can
come across is to draw the control using GDI+ code, which I'd prefer
not be able to do.

Is there anyone out there who has any ideas.

Thanks,
Keith

Jun 26 '06 #2
On 26 Jun 2006 04:12:10 -0700, ke************@gmail.com wrote:
I'm trying to create a button that will take no focus (it's for a
dialog designer app).

I've tried sub-classing the button control and overriding the WndProc()
function to trap button messages. This method doesn't seem to be
working, and it's doing my head in. The only other suggestion I can
come across is to draw the control using GDI+ code, which I'd prefer
not be able to do.

Is there anyone out there who has any ideas.

Thanks,
Keith


Set up a button looking like the one you want in Designer. Use
Ctrl-PrintScreen to copy everything to the clipboard. Paste into your
favourite picture editor and extract just the bitmap of the button
that you want. Display the bitmap on your final form and it should
look just like the original button.

rossum

Jun 26 '06 #3

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

Similar topics

2
by: PK | last post by:
Hello, I am looking for help on the following. I'm trying to create a custom browser toolbar button that will do a few things. One that I'm trying to do at the moment is just simply return the...
1
by: dave | last post by:
I first started using HCW.exe to compile .rtf filew created with MS Word a couple of weeks ago. I used the file | new menu then selected New project in the dialog box and everything worked as...
24
by: jonathon | last post by:
Hi all, I have a web app with a popup window for entering data. I don't want to access the web every time this window is opened, as most of the app is AJAX. But I can't figure out how to open...
2
by: DaWoE | last post by:
Hi all, I'm fairly new to ASP.NET. What i want to do is creat a online registration form. On the first step is getting the users details and the number of people he wants to register. Based on...
1
by: thechaosengine | last post by:
Hi all, Can anyone tell me what I need to do to create a 3 stage rolloever button out of an asp.net image control. I don't know too much about javascript or creating user controls. I'm really...
10
by: Tor Inge Rislaa | last post by:
Creating Control Array How to create an array of buttons, with common procedures based on the index of the control. How would this Example from VB 6.0 be in VB.NET? Private Sub...
2
by: epigram | last post by:
I'm dynamically creating a number of radio buttons on my aspx page based upon data read from a db. Each radio button has autopostback turned on. I'm experiencing two problems. 1) I am reading...
7
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
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,...

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.