|
Hi Guys,
I'm working on a C# form which hosts a Flash movie. That works fine.
I want to run this as the Flash Player can do in full screen mode. I've got as far as hiding the task bar and stretching my form beyond the bounds of the screen so that only the Flash movie is visible... nearly. Although I can hide the taskbar (using InterOp and ShowWindow(SW_HIDE)) my form simply will not stretch into the area where the hidden taskbar once sat!
My fall-back is to auto-hide the taskbar but this is not really an acceptable solution. Does anyone know a way to create a form which truly runs full screen?
Many thanks,
Simon
|
|
|
|
|
srev wrote: Does anyone know a way to create a form which truly runs full screen?
Have you looked at Managed DirectX? I know that can do it pretty easily.
|
|
|
|
|
Thanks for the thought, but unfortunately I can't use Flash with DirectX.
|
|
|
|
|
NO, just use directx for the full screeen functionality.
/\ |_ E X E GG
|
|
|
|
|
I'm not sure if I should be using this forum or the SQL Server forum, but I'll start here. I have been tasked with writing a project that, as part of its duties, will attach to a SQL Server database (2000 now, 2005 in the near future), and retrieve the columns that a stored procedure will return. I'm using the OleDB provider on purpose, as opposed to System.Data.SqlClient, because of the possible future need to support other systems. Currently, I'm doing the following:
<br />
private DataTable GetFields()<br />
{<br />
DataTable tbl = new DataTable();<br />
<br />
using (OleDbConnection conn = new OleDbConnection(txtConnectionString.Text))<br />
{<br />
try<br />
{<br />
conn.Open();<br />
<br />
using (OleDbCommand cmd = new OleDbCommand())<br />
{<br />
cmd.Connection = conn;<br />
if (cmbStoredProcedures.SelectedIndex > 0)<br />
{<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
cmd.CommandText = cmbStoredProcedures.GetItemText(cmbStoredProcedures.SelectedItem);<br />
}<br />
else<br />
cmd.CommandText = txtQuery.Text;<br />
<br />
using (OleDbDataAdapter adapter = new OleDbDataAdapter(cmd))<br />
adapter.FillSchema(tbl, SchemaType.Source);<br />
}<br />
}<br />
catch (Exception Ex)<br />
{<br />
MessageBox.Show(Ex.Message);<br />
}<br />
finally<br />
{<br />
if (conn.State == ConnectionState.Open) conn.Close();<br />
}<br />
}<br />
return tbl;<br />
}<br />
My question is this: Is there a better/more efficient way of doing this, or is this really the best way?
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
Perhaps a slightly more efficient way would be to command.ExecuteReader().GetDataTypeName on each column. But I think it would be hardly distinguishable from your FillSchema. I see no reason to change your existing code.
p.s. for large code blocks, next time use <pre> tags instead of <code> tags.
|
|
|
|
|
Thanks for the ingo, Judah. I think part of my problem is that we use a ton of linked servers here and calls made with OpenQuery, which I'm sure affect the call to FillSchema, since many SQL statements are actually in varchar variables, and executed using exec.
Judah Himango wrote: p.s. for large code blocks, next time use <pre> tags instead of <code> tags.
I always forget about that until it's too late. :->
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
Hey got a few problems with an auto popup calendar im trying to get working. Here's the deal.
Asp textbox with an Onfocus command jammed in it. When the textbox is clicked on it succesfully calls the Javascript required to set a div's display property to "block". It was previously set to "none". Ok so that bit works fine and the div appears, sat nicely next to the textbox with the calendar controls inside it.
The problem occurs when you click on the calendar to change the date because, of course, this causes a postback, and alas sets the div's display setting back to none.
How can I prevent this from happening??? I only want the calendar to hide when a date is selected.
If you really need to see the code the site is online here http://www.thepinesbroseley.co.uk/Bookings.aspx[^]
Bigup nuff respect
|
|
|
|
|
Any ideas on what functions I need to use to retrieve a handle from an active window and edit that window (drawing, outputting text, etc..) maybe for a game or other form?
Thanks....
|
|
|
|
|
You cannot achieve this with the .NET framework alone; you'll need to P/Invoke some Win32 API calls to get the device context of another window and begin drawing on that. Thus, I recommend you ask this question in the Visual C++ forum; those guys have a better knowledge of what you'll need to do.
|
|
|
|
|
Hey,
just a quickie, is there an actual difference between Model View Controller, and Model View Presenter?
Or are they just the same thing?
Regards
Mark
|
|
|
|
|
They're not quite the same thing. MVP is a fresh take on the old MVC. Perhaps this article[^] will explain better than I can.
|
|
|
|
|
Thanks for the link Judah, I shall have a read.
|
|
|
|
|
I think the main difference is that in MVP there is a greater seperation of view and model. The view and model are exclusive; they have no knowledge of each other in MVP, whereas that is not the case in MVC.
|
|
|
|
|
|
Hi!
This dont seem to work, any ideas? (Im sure you have lots of ideas, but remember Im a newbie)
label1.Text += ".";
string k = label1.Text;
int r;
r = label1.Text.IndexOf(k);
if (r > 0)
{
MessageBox.Show("bla");
}
so, r is never above 0 despite that the string contains a "."
Newbie untill I die!
|
|
|
|
|
IndexOf returns a 0 based index. "." is not in position 1, it is in position 0. If nothing is found -1 is returned. Your code should be
if( r != -1 )
|
|
|
|
|
hi, and thanks for your fast answer. Im trying to program a calculator and you should not be able to hit "." multiple times in a row. So if I take this code:
string k = label1.Text;
int r;
r = label1.Text.IndexOf(k);
if (r != -1)
{
label1.Text += ".";
MessageBox.Show("bla");
}
And paste in under, for example, the button 9, I still get the msgbox! That should not happend, shouild it? Because now, there are no "." in the string...or Im missing someting here?
Newbie untill I die!
|
|
|
|
|
hristo1977 wrote: string k = label1.Text;
int r;
r = label1.Text.IndexOf(k);
Wait, you take the contents of your textbox (k) and test (IndexOf(k)), if it exists? This will always return the index 0.
What you probably want is IndexOf(".")
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hristo1977 wrote: Im trying to program a calculator and you should not be able to hit "."
Here's a simple way to determine if the period character exists multiple times in a string:
string text = label1.Text;
int periodCount = 0;
foreach(char character in text)
{
if(character == '.')
{
periodCount++;
}
}
if(periodCount > 1)
{
}
|
|
|
|
|
Thanks a lot, Himango!
Newbie untill I die!
|
|
|
|
|
Does anyone know how to insert a line break character within the <summary> or <remarks> section of an xml comment / description associated with a method / property / class so that the printout in intellisense or HTML documentation includes this line break?
Thanks.
|
|
|
|
|
It is just slightly extended XHTML with some additional tags such as "summary", "remarks", "see", "param" etc. Putting paragraphs between <p> & </p> or putting <br/> for simple linebreaks should work.
|
|
|
|
|
funny, I've tried both but neither create a line break in the intellisense helptab. I couldn't recall the codes but you've reminded me and I believe they do work with, e.g., NDoc.
Thanks.
|
|
|
|
|