473,385 Members | 1,535 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,385 software developers and data experts.

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.flatstyle 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 1146
"Aussie Rules" <so*****@somewhere.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.flatstyle 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=xpvisualstyles&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.manifest, 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_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"

"
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****************@TK2MSFTNGP09.phx.gbl...
"Aussie Rules" <so*****@somewhere.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.flatstyle 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=xpvisualstyles&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*****@somewhere.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.manifest, 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**************@TK2MSFTNGP14.phx.gbl...
"Aussie Rules" <so*****@somewhere.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.manifest, 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*****@somewhere.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.EnableVisualStyles()
Application.DoEvents()
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****************@TK2MSFTNGP12.phx.gbl...
"Aussie Rules" <so*****@somewhere.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.EnableVisualStyles()
Application.DoEvents()
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*****@somewhere.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*****@somewhere.com> wrote in message
news:Oe**************@TK2MSFTNGP10.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****************@TK2MSFTNGP12.phx.gbl...
"Aussie Rules" <so*****@somewhere.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.EnableVisualStyles()
Application.DoEvents()
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.EnableVisualStyles()

Application.DoEvents()

Dim aKey As RegistryKey

Dim bgConnection As String

aKey = Registry.CurrentUser.OpenSubKey("software\XXXX")

Dim frmSPlash As New frmSplash

Dim ObjLoginDetails As New clsLogin

Try

frmSPlash.txtServer.Text = "windows2003e"

ObjLoginDetails.strLoginServer = frmSPlash.txtServer.Text

ObjLoginDetails.strLoginUserID = frmSPlash.txtUserID.Text

ObjLoginDetails.strLoginUserPWD = frmSPlash.txtPwd.Text

ObjLoginDetails.ConnectToDB()

frmSPlash.ShowDialog()

If SetUpUserSecurity(ObjLoginDetails.strLoginUserID,
ObjLoginDetails.strLoginUserPWD) Then

End If

Catch

MsgBox(Err.Description)

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.State.Closed Then

MsgBox("No SQL Connection")

End

End If

Try

SetUpconstDatasets()

Application.Run(New frmMain)

Catch ex As Exception

MsgBox(Err.Description)

End Try

End Sub


Nov 21 '05 #10
"Aussie Rules" <so*****@somewhere.com> schrieb:
So I have gone back to my project and rechecked everything, and it seems
fine.


I feel sorry, but I don't have an idea what can be causing the problem. Are
you using any 3rd-party controls (maybe ActiveX controls) on the specific
form?

--
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 #11

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

Similar topics

16
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
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...
4
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...
2
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...
3
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...
6
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...
0
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...
11
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...
3
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.