|
I want to know how to do it, because i will get login to a website with username and pass, but design my own interface
|
|
|
|
|
On a new windows form app, I have this code:
public Form1()
{
InitializeComponent();
this.AutoScroll = true;
for (int i = 0; i < 500; i++)
{
Button btn = new Button();
btn.Text = i.ToString();
btn.Height = 100;
btn.Dock = DockStyle.Top;
this.Controls.Add(btn);
}
}
so I should get 500 buttons, 100px height each on a scrollable form. However I don't, I get the following:
http://img204.imageshack.us/img204/2564/22179761.png[^]
however, if my scroll bar is NOT at the top, and I resize the form a little bit, everything shows up. Any ideas? Thanks.
edit: the height before the form cuts off controls is around ~32 800px.
|
|
|
|
|
Long ago, parts (or all?) of GDI was using 16-bit integers, limiting Form height to 32767. Seems like some of that is still in there somewhere. Anyway, you should not have huge Forms, nor hundreds of Controls, it will never be an attractive GUI.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Luc Pattyn wrote: Anyway, you should not have huge Forms, nor hundreds of Controls, it will never be an attractive GUI.
This is the critical point!
And while we're at it, let's stop making interfaces that load all twenty thousand rows into a datatable before the page displays and the user can perform a search... it's kind of silly to spend all those resources and make the user wait when with this much data it is virtually guaranteed that the user *will* need to search and thus discard the expensively-obtained results immediately.
Just a sigh... I see this all the time, unfortunately.
That having been said, if MS Word had only 500 buttons it would have been a lot easier to use....
|
|
|
|
|
i found my problem
my problem is the application is not read the connection string in app.config so when i start with debugging, it is all write but when start without debugging the exception is thrown
another thing
when i clear the comming from machine.config as the following code
<configuration>
<clear/>
<connectionStrings>
<add name="ConnectionString"
connectionString="Data Source=.;Initial Catalog='Computer Sales System';Integrated Security=True"/>
</connectionStrings>
</configuration>
the exception is thrown in both sides
so
i understand that the connection string in app.config is not read by application
so i want to know why???????? and what is the solution for this problem
thanks
|
|
|
|
|
Don't use app.config -- write your own configuration file.
|
|
|
|
|
<clear/> should appear between <connectionStrings> and </connectionStrings>
|
|
|
|
|
hi
i have some C# and Windows 7 question
1. is all my C# program will work ?
2. is the color of my C# program will change ?
3. what i need to know about iis7 ? is my WebService will work good ?
thank's in advance
|
|
|
|
|
Wow. I honestly assumed someone had posted this as a joke.
Yes, Windows 7 means we need to rewrite all our programs in F#, and all our program windows will go a horrible shade of green. This is a dumb question. Why would Microsoft release a new platform on which our existing programs would not work ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: Why would Microsoft release a new platform on which our existing programs would not work ?
Because they've done it six or seven times already?
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Really?!?!?
I think they have a much better record at backward compatibility than, say, apple....
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
That may or may not be the case, but it's certainly the case that some programs have certain compatibility issues with W7.
In my case, Visual Studio 2008 is one of them. With UAC enabled I cannot launch it as Administrator (i.e. with Administrator as the process identity, as opposed to simply launching it while being logged on as Administrator). To log on to IIS locally I must run it as Administrator, so I eventually had to disable UAC after finding that no compatibility modes made any difference. That in turn led to some programs no longer finding the correct data that had been saved per-user, although I don't really understand *why* that happened (since I do not run these other programs using the admin as process identity).
SQL Server Management Studio express also refuses to install, and I get messages that warn me "this program has known compatibility issues" so presumably MS is well aware of the problem(s) with it.
Otherwise the dev tools have worked fine and my code works fine, or at least no worse than on other platforms , although Edit-and-continue is not supported for 64-bit apps - but that was probably the same on XP/Vista in 64-bit editions.
|
|
|
|
|
mm.... ok, maybe there are a few compatibility problem after all....
but I managed to swim around them gracefully, so I kind of forget about them!
and I also wonder why there is no edit and continue in 64bit mode?! but ha well, I'm not too miffed, as I still remember the printf debugging experience not so long ago!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
The reality is, no software manufacturer has a good record of backward compatibility
|
|
|
|
|
i am making text to sign language converter software & want to play continious videos(pre recorded hand movment animations) . the videos are short and many. i used the windows mediaplayer refernce file to play the video files. but the videos dont look continious( gap between 2 videos is no acceptable). so is there any other method to play the files rapidly
tnx in advance
|
|
|
|
|
I think Media player stops a certain second before staring another file. This is just because of buffering.
I think you need to create your own player in Flash and use them to avoid this situation...
|
|
|
|
|
plz can you be more specific . . .
|
|
|
|
|
No, he can't. He's told you exactly what he thinks you need to do. Another solution would be to create playlists in WMP, and if that still gives you a gap, then perhaps you can create two WMP controls and jump between them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
tnx i like the idea of jumping b/n 2 WMPs
|
|
|
|
|
The player can play from streams, so it must be possible to assemble what to WMP would be one clip dynamically from the parts on the fly. I don't know how difficult this would be to do though.
|
|
|
|
|
Hi,
I use the windows apis a lot and often I have to to give a parameter with the DWORD type. From my understanding the equivalent in c# is int... So when I have a parameter like "DWM_TNP_RECTDESTINATION" it's int value is 0x1.
But I only know that since I found an example where they used the code. But now I have another parameter (DWMWA_EXTENDED_FRAME_BOUNDS) from the dwmapi.dll and I don't know how to get the int value since I can't find an example where it is used :S
Isn't there an easier way to get the value instead of finding someone who knows? :P
$?
|
|
|
|
|
TheDudeJuan wrote: Isn't there an easier way to get the value instead of finding someone who knows?
These values are generally stored in the C/C++ header files associated with the API. So you need to look up the tag in the MSDN documentation and at the bottom of the page there is usually a reference to the associated C++ header file (see this link[^]). Open this file (stored in the SDK directory) to fnd the values. This may mean that you will need to download the Windows SDK from Microsoft.
|
|
|
|
|
Google says its 9. Just type the symbol in the search box and read the first 20 excerpts.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
hi
how to open program through C# program and give this program focus ?
thank's in advance
|
|
|
|
|
E_Gold wrote: how to open program through C# program and give this program focus ?
You mean, you want to run one application. You can easily do it using Process.Start[^]Process.Start
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|