|
Hello everyone,
I was wondering if it is possible to create a window application with rather personalized window. What I mean is that I wish to have a different graphic rather than usual window from.
Thanx in advance for your help.
Khoramdin
|
|
|
|
|
Yes, but you shouldn't; people expect windows to look a certain way. I detest odd-looking windows. If I had to choose between two applications with similar functionality and one was non-standard I'd choose the other.
|
|
|
|
|
Hello PIEBALDconsult,
Thanx for sharing your valuable opinion. The reason I asked about the personalized window was that I have this Window application which I wish to add a floating menu to it. As the result I didn't want it to look like a normal Window Form.
This is a medial player application that I have and wish to place its control buttons in a separate window.
Maybe you can tell me if there is a better way to deal with something like this.
Thanx in advance for your input, mate.
Khoramdin
|
|
|
|
|
Hi,
This is really frustrating me. I know it should be simple but I'm darned if I can get my mind around it.
psuedo code:
datetime = aDate
string xyz = aDate.ToString("MMM dd, yyyy");
I know I can Stringbuild what I want but surely there is a simpler way. Someone please kick me in the head
Thanks.
Glen Harvy
|
|
|
|
|
You can use ToShortDate(), or you can pass a format string to ToString, although I'm not sure it looks like what you posted ( it might )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
G'day,
Thanks for your help - I played around with the .ToShortDate() but I still couldn't then format that into MMM dd, yyyy.
Ed.Poore's suggestion has done the trick though .
Cheers,
Glen Harvy
|
|
|
|
|
Could use CG's suggestion or string xyz = string.Format("{0:MMM dd, yyyy}", aDate);
|
|
|
|
|
G'day,
Great stuff - works well
I just knew that I had seen/read this somewhere and hence knew there was a simpler way.
Much appreciated.
Cheers
Glen Harvy
|
|
|
|
|
Not a problem
|
|
|
|
|
Is there an inherent limitation to the amount of available memory for a 32bit .NET application? For a simple test I'm running out of memory at around 1.4 to 1.6gb.
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.Windows.Forms;
namespace MemoryTest
{
class Program
{
static void Main(string[] args)
{
int count = 0;
int size = 1024 * 1024 * 100;
byte[][] buffer = new byte[1024][];
try
{
do
{
buffer[count] = new byte[size];
Array.Clear(buffer[count], 0, buffer[count].Length);
Console.Out.WriteLine("count={0} size={1}", count.ToString(), buffer[count].Length.ToString());
MessageBox.Show("Click Ok to continue", "Got RAM?", MessageBoxButtons.OK, MessageBoxIcon.Question);
count++;
} while (true);
}
catch (Exception e)
{
Console.WriteLine("{0} Exception caught (count={1})", e, count.ToString());
}
}
}
}
Todd Smith
|
|
|
|
|
There is an inherit amount of memory available on your specific computer, that's for sure. I've run apps over the 1.4 gig mark, but I fixed them
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
haha, thats pretty much what i was thinking when reading the first post.
--
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
|
|
|
|
|
Todd Smith wrote: Is there an inherent limitation to the amount of available memory for a 32bit .NET application? For a simple test I'm running out of memory at around 1.4 to 1.6gb.
That has little to do with .NET vs native. See my blog entry on the topic[^]
|
|
|
|
|
I was under the assumption that the available heap was closer to 2gb per applicaiton without the /3gb hack. What is Windows doing with that extra 400-500mb?
Todd Smith
|
|
|
|
|
Am retrieving data from my databese engine to read the data, but encountering an error at dr.Read(), con.close().
public string constring = @" ";
SqlConnection con = new SqlConnection(constring);
SqlCommand cmd = new SqlCommand("select * from emp",con);
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
con.Close();
"Invalid token '(' in class, struct, or interface member declaration", what could be the reason for this?
-- modified at 18:59 Friday 9th February, 2007
|
|
|
|
|
This should be posted in the SQL Database section.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
sreecahitu wrote: new SqlConnection(" ");
How is that a connection string ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I indicated the connection string correctly with source,user name and pwd, but i didnt mention here.
string constring=@"source, user="",password="" ";
SQLConnection con=new SqlConnection("cosnstring");
|
|
|
|
|
OK, I think we've found the problem.
sreecahitu wrote: string constring=@"source, user="",password="" ";
When you use @, you need two " to make *one* quote. So, it's user=""name""
sreecahitu wrote: SQLConnection con=new SqlConnection("cosnstring");
Because you put it in quotes, you're passing in the value cosnstring, instead of the value of the variable with that name.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
If i write as follows,
string constring=@"source, user=,password= ";
SQLConnection con=new SqlConnection(cosnstring);
still am getting an error.
|
|
|
|
|
This may seem like a stupid question, but which database engine are you using? SQL Server, MySQL, Access, Oracle, ... ?
You can find the correct format for your connection string at http://www.connectionstrings.com[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
That doesn't look like a valid connection string to me.
Did you post the actual code in the first instance ? Or did you change it in other ways ? This does not account for your actual error, really, which makes no sense to me, right now.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ya, thank you all,
i modified wrongly.
I got the problem, the problem is with declaring the declaration of string.
|
|
|
|
|
Just remove the @ character
Dabsukol
|
|
|
|
|
I have problem I use Northwind database to build some prototype application in C#.
Thing is when I set on Orders to display me EployeeID and CustomerID as listbox, I can select data source so they show only Name instead of ID, but Value is indeed ID of those 2.
However when I do this Datanavigator have no effect on those 2?
Wonder why since doing same thign on column in data grid work just fine.
Any idea?
Not exactly ado question I guess so I hope it's right room...
|
|
|
|