|
Is this C#? I think not.
जय हिंद
|
|
|
|
|
Assuming you are using Visual Studio and know how to do it with the Designer, look at the code Designer creates (it probably is in file myForm.designer.cs) and do something similar either in the form's constructor or its Load handler.
|
|
|
|
|
I have VS 2008 and have 3 different versions of SQL server running in my network. I tried a sample from the MSDN documents for finding server instances running in the network.
http://msdn.microsoft.com/en-us/library/a6t1z9x2.aspx[^]
I added
using System.Data.Sql;
to a simple starter app and a datagridview to the form. In the load event I use this code..
// Retrieve the enumerator instance and then the data.
SqlDataSourceEnumerator instance =
SqlDataSourceEnumerator.Instance;
System.Data.DataTable table = instance.GetDataSources();
dataGridView1.DataSource = table;
dataGridView1.Refresh();
when the apps runs it eventually bring back the 3 db server's PC name but the rest of the data (according to the docs should be ServerName, InstanceName, IsClustered, and Version)is not returned.
Anybody know why??
tia
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
I have just tried your code on my system and it works as per the documentation.
I cut and pasted your code, so provided that the posted code is accurate, I cannot help. Sorry!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks Henry;
So you did get the InstanceName, IsClustered, and Version in addition to the the Server names...right?
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Yes, exactly as the documentation in the link you gave.
I would only add, that both the server instances on my system are Express versions 2005 and 2008. Don't know if that would make any difference though.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have a main form 'frmMain' and another form for tools 'toolBox' owned by the main form. I would like these two forms to always have appearance as if their both titlebars are active simultaneously. Example of such behaviour is in MS Paint: the tools window when it's undocked and the main window. How do i accomplish this?
modified on Saturday, April 18, 2009 11:08 AM
|
|
|
|
|
Have you tried setting the TopMost property of your 'toolbox' window to true ?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I did try, but it's the same. When one form gains focus, other's titlebar fades. And, besides, with topmost property, the form is above all forms, even the ones from other applications, and that is unwanted sideeffect. I did find an example how this could be achieved in VB.NET: http://www.andreavb.com/forum/viewtopic_3772.html, but my attempts to convert it have failed.
|
|
|
|
|
Take a look at this[^]. it uses the same techniques as the VB link you gave but it is in C#. Scroll down to the heading Painting the non-client area
Have a go at it, and come back if you get stuck.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have the solution. Someone on MSDN forum showed me how to do it, and it's amazingly simple:
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x86)
m.WParam = (IntPtr)1;
base.WndProc(ref m);
}
I just placed this function inside both forms and it works. But there is still another problem. The forms are painted as active even when i activate some other application. That is not good. It brings confusion. I need to find a way to bypass these functions in both forms if another application gets activated. Any idea?
|
|
|
|
|
Have a look at this[^]. Perhaps you can make a method from the principle used and then in WndProc do something like:
if ((m.Msg == 0x86) && (this.IsActiveApplication))
{
m.WParam = (intPtr)1;
}
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Im trying to extract albumart from ID3 tags using TagLib Sharp. I am able to get all other info except for the pictures, I cant seem to figure it out. Anyone have any experience with TagLib Sharp?
Heres my trouble:
Everything works fine but the pictures
private void songInfo(string url)
//Sets info for song info pane. The current URL being played
//is passed in; the labels are derived from the ID3 tags.
{
int i = 0;
TagLib.File file = TagLib.File.Create(url);
lblName.Text = file.Tag.Title;
lblArtist.Text = file.Tag.FirstPerformer;
lblAlbum.Text = file.Tag.Album;
lblYear.Text = Convert.ToString(file.Tag.Year);
foreach (TagLib.IPicture pic in file.Tag.Pictures)
{
pboxAlbumArt.Image = pic.Data;
}
}
Heres where I hit trouble, doing this gives me an error saying it cannot convert a bytevector to an image. Firts of all is this the correct way to do this nd if so, how would I go about converting a bytevector to an image?
Thanks
Jon
|
|
|
|
|
If u get the solution,plz post it..
I am in the same need..If i found it,I'll post it.
thanx
I walk in rain ....so that no one can see me crying.
|
|
|
|
|
|
Hey everybody!
I was wondering, is there a way to execute JIT on the whole program at startup?
Lets say I have a small application that I want to be completely compiled before it actually starts running (like a C++ program), is there a way to do that?
Thanks!
|
|
|
|
|
Look for a tutorial on NGEN.EXE
I are troll
|
|
|
|
|
okay, thanks!
|
|
|
|
|
You can try RuntimeHelpers.PrepareMethod . It is in System.Runtime.CompilerServices . Refer to the MSDN documentation before you try it out.
|
|
|
|
|
This[^] article may help.
/ravi
|
|
|
|
|
Dear All,
I have small application where it upload, downloads files into ftp server.
I am using FtpWebRequest class for these features.
in case my file size is too big as (512 MB or 1 GB), i want the download should occur in multiple segement as download managers (FDM,DAP,...).
Is there any features in FtpWebRequest for such thing?
Thanks,
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
missing method expectation was unhandeled.
method not found...,system.object . system.windows.threading.dispatcher,invoke(system.delegate,system.object[])
trouble shooting tips: if a method in a class library has been removed, recompile any assemblers that referrence that library.
general help fo this exception.
can you help me with this?
thanks
|
|
|
|
|
john2313 wrote: trouble shooting tips: if a method in a class library has been removed, recompile any assemblers that referrence that library.
What happened when you tried this tip?
|
|
|
|
|
Thank you for your reply.
I cant follow the tip as im new to C#. thats why im asking for a shortcut if you know something about it.
ok?
|
|
|
|
|
Hello,
I try to read a text whitch on bulgare, but it show ??????, when i debug my project the variable contain the text in correct form but when i show it with Console.write(), it show ??????,
i try to use this :
<br />
<br />
Encoding e1 = Encoding.GetEncoding(21025);<br />
Console.Write(cell_nom,e1);<br />
<br />
But it not work, please help me to resolve this great problem, thank you verry mutch.
|
|
|
|