|
if you hav ur icons on the resource manager, it is easy to pic the icons. VS hav some built in functions for that
use the following code.. (not tested)
statusbar.Icon = global::namespace.Properties.Resources.icon;
namespace - give your name space name.
icon - name of the image added in the resource manager.
hope this helps
|
|
|
|
|
Hello everyone!
My VS crashed for the first time like 2 or 3 days ago when I was working. I got the Microsoft error reporter and everything. I reopened VS and it crashed again. I opened it a third time and it said it skipped document loading because last time there were errors.
So I had a rest from that project. Today *, I re-opened it, and everything seemed to work fine. However, when I tried to open Form1.cs in design mode, the program disappeared... No error, no nothing, just showed my desktop... I noticed a little icon in the system tray, but it went away as soon as I hovered it with the mouse...
Everything else works, code view for that same file doesn't have any problems, I can open another form in both modes and it works fine too... I tried excluding the file from the project and re-adding it, doesn't work...
The app closes so fast that it surprised me... You know like, it always takes a while to show the error before it crashes...
Anyone know what's wrong? Thanks!
* I'm not sure if this is relevant or not... But, after the "rest" I had from this project, I moved it to my new flash drive.
Windows Calculator told me I will die at 28.
|
|
|
|
|
Lord Kixdemp wrote: I noticed a little icon in the system tray, but it went away as soon as I hovered it with the mouse...
A NotifyIcon that does not get Disposed() acts exactly like that.
I have had some trouble when using two versions of Visual working inside the same folder,
when I tried to develop and share code for both .NET 1.1 and 2.0
I frequently have to delete the entire obj folder (when trying to use Visual 7.1 after
Visual 8.0 did a build).
And sometimes I have to explicitly "Rebuild Solution" when a small mistake ends up in
dozens of error messages, that otherwise dont go away when the error got fixed.
So my suggestions: delete obj, and Rebuild solution.
Luc Pattyn
|
|
|
|
|
|
Nevermind, my custom control was broken...
Windows Calculator told me I will die at 28.
|
|
|
|
|
hi,
i want to know how a universal conection can be built so that my programe with a small dataBase
file can be opened on the others pcs as well without giving a new connection string.giving connection string at every other pc ,i want to avoid this.
|
|
|
|
|
You need the physical address of the database file to open the connection, but if you place the database file at the same relative position to the executable all the time, you can create the path by getting the path of the executable and add the relative path to the database.
---
Year happy = new Year(2007);
|
|
|
|
|
here is my app.config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
</configSections>
<dataConfiguration defaultDatabase="SqlConnection" />
<connectionStrings>
<add name="SqlConnection" connectionString="server=Developer;database=MSPetShop;Integrated Security=true;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
first i m getting these two errors:
Message 1 Could not find schema information for the element 'dataConfiguration'.
Message 2 Could not find schema information for the attribute 'defaultDatabase'.
and when i try to call the from my DAL layer i got exception
i m using this funcion
Database db=DatabaseFactory.CreateDatabase();
I hope any one there will reply me many thanks,
adnan
|
|
|
|
|
Hi,
Please make sure that the assembly and the project name specified in the configSections of the app.config is same as what you have in your project.
Thanks
Rakheesh
|
|
|
|
|
Why in .NET 2.0 framework an instruction as under brought back SHOW the millisecond and in framework .NET 2.0 CF (same function, identical code) the millisecond do not SHOW? I have tried also with the Application.DoEvents but nothing ... why?
Es..
private long m_lInitialTick;
private void StartCrono()
{
m_lInitialTick = DateTime.Now.Ticks;
timerTmp.Interval = 1;
timerTmp.Enabled = true;
}
private void StopCrono()
{
timerTmp.Enabled = false;
}
private void timerTmp_Tick(object sender, EventArgs e)
{
label.Text = Convert.ToString((DateTime.Now.Ticks - m_lInitialTick) / 10000) ;
}
|
|
|
|
|
What is the timerTmp that you are using? Is it a timer control?
You are using an awfully short interval. If you update the label a thousand times a second, you are updating it somewhere between ten and twenty times as often as the screen is able to show it.
How do you call the code? If the main thread is busy after you have started the timer, it won't handle the tick events.
---
Year happy = new Year(2007);
|
|
|
|
|
You are both up for a big disappointment:
the system normally is not able to run a timer periodically with a period as small as
1 millisecond. Actually the following code runs for more than 15 seconds:
public class CPTest_FastTimer: CPTest {
System.Windows.Forms.Timer timer=new System.Windows.Forms.Timer();
int count=0;
DateTime start;
public override void Run(int arg) {
start=DateTime.Now;
log("start = "+start.ToString("HH:mm:ss.fff"));
timer.Interval=1;
timer.Tick+=new EventHandler(timer_Tick);
timer.Start();
}
private void timer_Tick(object sender, EventArgs e) {
count++;
if (count>=1000) {
log("got "+count+" ticks between "+start.ToString("HH:mm:ss.fff")+
" and "+DateTime.Now.ToString("HH:mm:ss.fff"));
timer.Stop();
}
}
}
On my system this generates the line
CPTest.log: got 1000 ticks between 15:12:47.140 and 15:13:02.953
What goes on is a timer creates a delay which tries to equal the smallest possible delay
equal to OR larger than what was asked for; since the system clock normally ticks at 64
Hz, this means all intervals shorter than 15 msedc get enlarged to that number !
BTW: there is a way to set the system clock in a "higher accuracy" mode, but I do not
recall how, and MS does not set it by default to preserve CPU resources and power ...
Luc Pattyn
|
|
|
|
|
This has absolutely no relevance, but:
class UglyClass {
public UglyClass() {
if (true) {
DoThis();
DoThat();
}
if (true) DoSomethingElse();
}
}
class PrettyClass
{
public PrettyClass()
{
if (true)
{
DoThis();
DoThat();
}
if (true)
{
DoSomethingElse();
}
}
}
|
|
|
|
|
bobsugar222 wrote: This has absolutely no relevance
I agree. I would add, your way wastes more space.
Luc Pattyn
|
|
|
|
|
Easier to read and maintain though... on top of being prettier
|
|
|
|
|
Splitting things into separate lines does not add beauty.
class
UglyClass
{
public
UglyClass
()
{
if
(true)
{
DoThis
();
DoThat
();
}
if
(true)
DoSomethingElse
();
}
}
If you want the extra space, add the extra space. Then it's intentional and worth something.
class PrettyClass {
public PrettyClass() {
if (true) {
DoThis();
DoThat();
}
if (true) {
DoSomethingElse();
}
}
}
---
Year happy = new Year(2007);
|
|
|
|
|
Once more I agree
Luc Pattyn
|
|
|
|
|
|
Hi,
I have just finished an article on timers, I trust it may well solve your problem.
I expect it will appear on CP in a matter of days.
Luc Pattyn
|
|
|
|
|
|
Hi,
this dialog seems very good, but is there a way to make it run under .NET 1.1? Or in other words, what makes it only compatible for 2.0?
BR
Alexander
|
|
|
|
|
What dialog?
---
Year happy = new Year(2007);
|
|
|
|
|
Oops, I must have posted my question in the wrong forum, but perhaps someone here can also help me with that. I mean the OpenDialogEx:
http://www.codeproject.com/cs/miscctrl/OpenFileDialogEx.asp
(I clicked "New Message" on the bottom of that page, now I am confused (about this forum), and there might be a cross-post somewhere else here... )
|
|
|
|
|
I Want Last Version OutlockBarApp Simular Visual Studio.Net 2005
Thank you
Send (Dll File) ...
|
|
|
|
|
im actually trying to make a player that can stream audio over the network in real time using Microsoft DirectX particularly direct sound.can anyone help me out with this problem please..im a newbie when it comes to audio programming..please i really need help as soon as possible...
mei
|
|
|
|