|
This has been a common problem, usually fixed by calling Application.DoEvents after calling Application.EnableVisualStyles , and calling both before instantiating a single Control (usually before calling Application.Run ).
For example:
public class AppForm : Form
{
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new AppFrm());
}
}
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i tried that before but didn't have any luck.
this is for EnableVisualStyles() from the msdn docs: "Note This call will have no effect for controls in the browser."
i guess i'll have to wait for whidbey :/
|
|
|
|
|
If you have control over the HTML, include the following meta element within your pages:
<meta http-equiv="MSThemeCompatible" content="yes"/>
- Nick Parker My Blog | My Articles
|
|
|
|
|
doesn't work either.
when set to "no", that meta tag doesn't seem to have any effect whatsoever even in a regular ie session
|
|
|
|
|
Read Using Windows XP Visual Styles[^] on MSDN and go to the "Using Visual Styles with HTML Content" section. See if any of the rules they specify are being broken by your HTML to improperly render the visual style.
- Nick Parker My Blog | My Articles
|
|
|
|
|
this should theoretically be possible according to the docs, don't understand why it's not working.
anyway, i'll look into it some more one day. thanks for all the tips.
|
|
|
|
|
hello guys,
I was wondering if its possible to load Form into a Panel that is located on a main Form??
I am in the process of creating an application that have multiple views that for now have 20+ Panels. But its getting out of hand as its impossible to get a view of them all. Therefor i was wondering if its posible to create forms to be placed into another form - either inside a panel or some other means?
any sugestions and code examples would be welcome.
|
|
|
|
|
No, it's not possible. Use MDI instead.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hey Heath,
Not sure if you check out the ASP.NET board at all, but I'd really appreciate your take on a question I threw up there, considering you've basically committed the .NET framework to memory and all...
Jeremy Kimball
I have traveled the gutters, lo these many days, with no signs of life. Well met.
-brianwelsch
|
|
|
|
|
I try to steer clear - there's far too many questions about client-side stuff, and the majority of people just don't understand what ASP.NET is. I typically spend more time explaining why you can't popup a window using pure ASP.NET than anything.
I'll check it out, though.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath Stewart wrote:
I typically spend more time explaining why you can't popup a window using pure ASP.NET than anything.
You've got to be kidding me...
Heath Stewart wrote:
I'll check it out, though.
And that is why "You Da Man"...thanks
Jeremy Kimball
I have traveled the gutters, lo these many days, with no signs of life. Well met.
-brianwelsch
|
|
|
|
|
Urgh.
Ok thanks for the fast reply.
Btw. is there anyway using MDI forms to remove the borders, and then show the form in full size so its not possible to see that its MDI?
I have only played around with alittle so its only a thought before i look closely at it.
cheers
|
|
|
|
|
Not easily, no. For that you really have to understand the Windows messaging system, styles, P/Invoke in .NET to use all that, and dialog resources in Win32.
I would suggest re-designing your controls. You could, for example, use a UserControl or some other Control derivative and just dock it (using DockStyle.Fill ). If the UI and implementation is already in a form, then abstract them to a UserCotrol (or something) and use that in both forms.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi all,
I'd just like the souce code to get a timestamp from a terminal.
example program:
standard form, with a command button on it. When you click the button, it gets the time from the terminal and displays it on the form!
I just need the code behind the button
Thanx 4 your help
|
|
|
|
|
Stuggo wrote:
gets the time from the terminal
What do you mean by "terminal"?
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
Hi people, hope you can help me.
I have the following code
public class TestDS : System.Data.DataSet
{
}
public class DataSupplier : dalBase
{
public DataSet GetSupplierList()
{
HybridDictionary parms = new HybridDictionary();
return Factory.GetDataSet("GetSupplierList", parms);
}
public TestDS GetSupplierList()
{
HybridDictionary parms = new HybridDictionary();
return (TestDS)Factory.GetDataSet("GetSupplierList", parms);
}
}
The first method works fine and returns a normal dataset. However, I need to create a strongly typed dataset hence the casting in the 2nd method to my own subclassed dataset. Trouble is when I run this I get a the dreaded 'Specified cast is not valid' error.
I was sure that I should be able to do this but it just doesn't work. Any ideas anyone?
Cheers
Paul
|
|
|
|
|
First, it is not CLS-compliant to have more than one method with the same name that differs only by the return type. Instead, rename one or both of your methods, such as GetTestSupplierList or something more suitable.
Second, your DataAdapter (or however you're filling your TestDS ) should actually fill an instance of that TestDS class. So, perhaps add a Type parameter to your Factory.GetDataSet method, something like this:
public static DataSet GetDataSet(string storedProc, IDictionary parms, Type dsType)
{
if (dsType != typeof(DataSet) || dsType.BaseType != typeof(DataSet))
throw new ArgumentException("Not a valid DataSet type.", "dsType");
DataSet ds = (DataSet)Activator.CreateInstance(dsType);
} You should be able to cast it, since the return of GetDataSet still returns a DataSet . Such a method works fine in our enterprise application.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
My first C# development at work needs to connect to a unix box and transfer files (both directions) using SSH (secure shell) and SCP (secure copy). Can anyone recommend a product/component/code to do this? I've come across Putty and SSHActiveX etc but I'd like a .NET solution if at all possible. Thanks.
Gavin
|
|
|
|
|
IP*Works![^] has such products for several different platforms including .NET.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi,
i wanna set one of the columns to be read only,
i use DataGridColumnStyle and set the read only property to true, but i still can edit the table, how to solve this?
thanks
|
|
|
|
|
|
I bind a arraylist to a datagrid which works fine. However when I modify data directly in the datagrid it isn't updated automatically to the ArrayList.
QUESTION
How can I force that a modification/update to a datagrid field will update the ArrayList immediately?
Regards,
Uyen Chi
|
|
|
|
|
Data is committed when the column is committed. This is the way that the DataGrid works. There have been many discussions about this in this forum before if you care to search. Just click "Search comments" directly above the message board.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Please look at the snippet
-----------------------------------
1 RichTextBox rtf = new RichTextBox();
2 Bitmap img = new Bitmap(@"c:\myImage.bmp))
3 Clipboard.SetDataObject(img);
4 rtf.Paste();
------------------------------------
when the program control passes line number 3 and if I copy some other text/image in the Clipboard using "Control + C", the earlier image 'img' gets vanished. Is there any way to lock the clipboard for other operations till I paste the image 'img' in RichTextBox?
Please Guide
|
|
|
|
|