473,796 Members | 2,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XP look on buttons etc

Hi,

For some reason my App has stopped displaying buttons and other such
controls with the XP style.

They have all reverted back to the standard style button.

I have the buttons.flatsty le set to = system, but they are the same as
standard.

I have the Windows XP Style set in my display properties (properties of the
desktop), and the color scheme set to silver, and all the buttons in other
applications look as they should.

How do I get my buttons back to the XP style.

Thanks
Nov 21 '05 #1
10 1177
"Aussie Rules" <so*****@somewh ere.com> schrieb:
For some reason my App has stopped displaying buttons and other such
controls with the XP style.

They have all reverted back to the standard style button.

I have the buttons.flatsty le set to = system, but they are the same as
standard.

I have the Windows XP Style set in my display properties (properties of
the desktop), and the color scheme set to silver, and all the buttons in
other applications look as they should.


Enabling Windows XP Visual Styles for Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=xpvisualsty les&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Hi,

Thanks for this.

I have created a manifest file as described. I hope i did this correct as
all i did was add a text file, rename it to the projectname.man ifest, and
changed the details within the xml I pasted from the site into the manifest
file

The bit that is confusing is that last bit that makes reference to adding in
the details to the referneces:

"
1.. Add the manifest to your application's resource file as follows:
CREATEPROCESS_M ANIFEST_RESOURC E_ID RT_MANIFEST "YourApp.exe.ma nifest"

"
I have no idea what this means or how to do it. I tried to add a reference
to my project to the manifest file, but it didn't like that very much.

Thanks

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
"Aussie Rules" <so*****@somewh ere.com> schrieb:
For some reason my App has stopped displaying buttons and other such
controls with the XP style.

They have all reverted back to the standard style button.

I have the buttons.flatsty le set to = system, but they are the same as
standard.

I have the Windows XP Style set in my display properties (properties of
the desktop), and the color scheme set to silver, and all the buttons in
other applications look as they should.


Enabling Windows XP Visual Styles for Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=xpvisualsty les&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
"Aussie Rules" <so*****@somewh ere.com> schrieb:
I have created a manifest file as described. I hope i did this correct as
all i did was add a text file, rename it to the projectname.man ifest, and
changed the details within the xml I pasted from the site into the
manifest file


Am I right that you are using .NET 1.0?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4
No,

VS.net 03 with .net 1.1
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:OD******** ******@TK2MSFTN GP14.phx.gbl...
"Aussie Rules" <so*****@somewh ere.com> schrieb:
I have created a manifest file as described. I hope i did this correct as
all i did was add a text file, rename it to the projectname.man ifest, and
changed the details within the xml I pasted from the site into the
manifest file


Am I right that you are using .NET 1.0?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
"Aussie Rules" <so*****@somewh ere.com> schrieb:
VS.net 03 with .net 1.1


Then you don't need the manifest stuff. Instead, add the following code to
a code file:

\\\
Public Module Program
Public Sub Main()
Application.Ena bleVisualStyles ()
Application.DoE vents()
Application.Run (New MainForm())
End Sub
End Module
///

In the project properties, select 'Sub Main' as startup object.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #6
Hi,

Thanks for you help, I added that in, but i still don't have the XP look on
all my buttons on all my forms

Any other tricks to try?

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Aussie Rules" <so*****@somewh ere.com> schrieb:
VS.net 03 with .net 1.1


Then you don't need the manifest stuff. Instead, add the following code
to a code file:

\\\
Public Module Program
Public Sub Main()
Application.Ena bleVisualStyles ()
Application.DoE vents()
Application.Run (New MainForm())
End Sub
End Module
///

In the project properties, select 'Sub Main' as startup object.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7
"Aussie Rules" <so*****@somewh ere.com> schrieb:
Thanks for you help, I added that in, but i still don't have the XP look
on all my buttons on all my forms


Create a Windows Forms project from scratch, add the code I posted, add a
button to the form and set its 'FlatStyle' to 'System'. Then run the
application. Is it shown with Visual Styles applied?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #8
and all the button .style is set to system, so it should pick up the style

do i have to do something within each form in my project ?

"Aussie Rules" <so*****@somewh ere.com> wrote in message
news:Oe******** ******@TK2MSFTN GP10.phx.gbl...
Hi,

Thanks for you help, I added that in, but i still don't have the XP look
on all my buttons on all my forms

Any other tricks to try?

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Aussie Rules" <so*****@somewh ere.com> schrieb:
VS.net 03 with .net 1.1


Then you don't need the manifest stuff. Instead, add the following code
to a code file:

\\\
Public Module Program
Public Sub Main()
Application.Ena bleVisualStyles ()
Application.DoE vents()
Application.Run (New MainForm())
End Sub
End Module
///

In the project properties, select 'Sub Main' as startup object.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Nov 21 '05 #9
Yes that works fine.

So I have gone back to my project and rechecked everything, and it seems
fine.

I have added a empty form to the proper project, and tested it. It works
fine, as long as none of my other code is with the code you posted.

It doesn't seem to make sense.

My propery project has a global.vb file, and the project startup property is
set to that(sub main).

I have attached the sub main below, where you can i see how i have put the
code in.

Something here is stopping it from working, but i can not see what it could
be.

Thanks

---------------
Public Sub Main()

Application.Ena bleVisualStyles ()

Application.DoE vents()

Dim aKey As RegistryKey

Dim bgConnection As String

aKey = Registry.Curren tUser.OpenSubKe y("software\XXX X")

Dim frmSPlash As New frmSplash

Dim ObjLoginDetails As New clsLogin

Try

frmSPlash.txtSe rver.Text = "windows200 3e"

ObjLoginDetails .strLoginServer = frmSPlash.txtSe rver.Text

ObjLoginDetails .strLoginUserID = frmSPlash.txtUs erID.Text

ObjLoginDetails .strLoginUserPW D = frmSPlash.txtPw d.Text

ObjLoginDetails .ConnectToDB()

frmSPlash.ShowD ialog()

If SetUpUserSecuri ty(ObjLoginDeta ils.strLoginUse rID,
ObjLoginDetails .strLoginUserPW D) Then

End If

Catch

MsgBox(Err.Desc ription)

End

End Try

Try

intSiteID = aKey.GetValue(" SiteID")

strAgentName = aKey.GetValue(" LastGoodID")

If intSiteID <> "0" Then

strConnection = aKey.GetValue(" BackgroundConn" )

Else

MsgBox("no Site ID")

End If

Catch

End Try

If SqlConnection.S tate.Closed Then

MsgBox("No SQL Connection")

End

End If

Try

SetUpconstDatas ets()

Application.Run (New frmMain)

Catch ex As Exception

MsgBox(Err.Desc ription)

End Try

End Sub


Nov 21 '05 #10

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

Similar topics

16
1781
by: John Rivers | last post by:
http://www.15seconds.com/Issue/030812.htm?voteresult=1 poor guy worked his heart out, just to make a page control and then they published it ha ha ha ha ha to "help" others
4
2254
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms application that is going to be used to extract data from a legacy system (VSAM based mainframe file structure), and output data in pipe-delimited record layouts, multiple record types per file, one file per chosen client. I have been working on...
4
3711
by: Ivan Weiss | last post by:
Hey all, I am looking for some tutorials on how to make an app actually look good. I am writing an app that is coming along nicely but microsofts basic controls to be honest are quite boring and dull (everything be gray). I am not a graphic designer and am unfamiliar with how to create custom buttons etc.. that look good but am writing this app on my own so hoping that someone knows of some tutorials out there or has any suggestions! ...
2
3873
by: John Salerno | last post by:
I'm a little confused. I was under the impression (perhaps incorrectly) that Tkinter will create GUI widgets that are native to your OS, so I should have an XPish looking application. But when I create buttons (and even the text fields look a bit different), they are not the 'fancy' Windows buttons that are rectangular with rounded edges and have a blueish border around the active button, but instead are just square buttons. Is this normal...
3
1376
by: Pascal Cloup | last post by:
Hi, all the installers that i create with VS2005 (with deployement projects) have a flat look and feel under windows XP (flat rectangle buttons). Even the installers created with VS2003 (and which have a correct appearance) have a flat look once updated with VS2005. Someone have an idea?
6
2204
by: =?Utf-8?B?TWFuaXNoIEJhZm5h?= | last post by:
Hi, I am using ASP.NET 2.0.So is it possible to give windows XP Look and Feel to my ASP.NET AJAX Website irrespective of operating system in which browser of end users are running.I want to do this without using third-party component. I have searched high and low on the internet but i am not able to find any solution without using third-party component. Any insights on this would be highly appreciated. Thanks in advance for replying(as...
0
4385
by: Oswald Otte | last post by:
Hello How can I change the look of a disabled JButton? I have made a boardgame with a brown background and brown buttons. I have also put an imageicon on the buttons that has a colored image on it. When I disable the buttons, the colored image is turned into grey which screws up the look of my game. Can I change the grey color on a disabled button? Or do I have to keep it enabled, and attach another imageicon with different color to...
11
3388
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem to work out how to start on a solution. I have of course used a varienty of componets, mostly radio buttons with "button" appearence.
3
1864
by: Kevin | last post by:
With VS2005 the look and feel of dialogs created with MFC and Windows Forms is different. E.g. still of checkboxes, buttons, etc. Is it possible to achieve the same look and feel with both MFC and Windows Forms? TIA, KK
0
9679
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10453
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9050
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, 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...
0
5441
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...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
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
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.