|
In this case, I think you can get away without having to use them. Check out my comments above for more info.
|
|
|
|
|
Once you have the delegate vs event thing straightened out, here are some articles on accessing Forms from non-UI threads.
http://www.csharphelp.com/archives2/archive375.html
http://msdn2.microsoft.com/en-us/library/ms171728(VS.80,d=ide).aspx
http://weblogs.asp.net/justin_rogers/articles/126345.aspx
|
|
|
|
|
Hello all,
I've been looking into what is required to write a custom tool for Visual Studio 2005. Specifically, what I want to do is write a tool that can take an XML file containing a connection string and generate a strongly-typed wrapper around the database. Basically, the idea here is to make it so that I have easy intellisense access to the names of tables, views, fields, stored procedures, parameters, etc. so that I will stop misspelling them and to reduce the problems caused by changing the database schema. That and I want to play with the CodeDOM in a useful fashion.
So, my question is: Has anyone here implemented a custom tool and had it work in Visual Studio 2005? I know I could use a custom build provider, but I intend to be using this in business layer code. My understanding is that build providers don't work in anything other than ASP.NET.
|
|
|
|
|
Err....
I meant to say non-web code. It will actually be the data access layer, not the business layer.
|
|
|
|
|
hello Everyone,
i wrote an application with MDI Forms and have a problem which didn't know it's reason ,
which is delaying time when navigating between forms and thats all .
thanx
-- modified at 12:58 Tuesday 13th June, 2006
|
|
|
|
|
.NET 2.0
I am using the Tooltip control to notify user's of input error. The tooltip is set as a bubble tip. When a call the the Show method, the tooptip bubble does not display correctly. The buble pointer will be offset from the control.
Now if I call the show method twice in a row with the same control passed then it will display correcty.
What is causing the tooltip to not be displayed correctly when in bubble form?
|
|
|
|
|
Hi, can anyone tell me what's the difference between console.write and trace.write ?
I'm currently facing problem to trace the output of the Class file. Other than try catch, any other way to easily see the whole process log ?
Help, I'm not able to trace the class output... Am using visual webdev2005, thnks.
|
|
|
|
|
By default the Listeners collection associated with the Trace class contains only one TraceListener. That listener writes to the standard output stream (the same stream that Console writes to). You can add in different TraceListener objects to the Listeners property, which will allow your trace messages to be redirected to whatever backing stores you desire.
Josh
|
|
|
|
|
Trace class is part of the System.Diagnostics namespace which provides classes that allow you to interact with system processes, event logs, and performance counters
Trace.WriteLine: writes information about the trace to the trace listeners in the Listeners collection.
Console: represents the standard input, output, and error streams for console applications
Console.WriteLIne: Writes the specified data, followed by the current line terminator, to the standard output stream
Source: Microsoft Visual Studio Documentation
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hello,
I have 2 forms. once i make my choice of the application i wanna run Form1 is hidden and form2 is showing up. if i want to terminate my program in Form2, Form is still running. I don't wanna instantiate Form1 again in Form2 to close Form1. it's gonna create a new Form1 right?
what is the best way to terminate both forms from Form2?
Thank you
Donkaiser
|
|
|
|
|
|
What i mean is that when i do application.exit() on Form2, the IDE still running in debugging mode.
Is it because of Form1 which is hidden and i didn't close it?
Donkaiser
|
|
|
|
|
Really? Application.Exit() should have closed the application, not just Form2. Hiding Form1 should not make a difference. Form2 isn't a separate application that you are spawning from the Form1 application, is it?
Roy.
|
|
|
|
|
Hi. Im writing a windows application in C# and it has to be able to send the contents of a textbox to the printer. I'm using a StringReader to do this.
My only problem right now is the textox does not send tabs to the printer. I use \t to format the data the way I like and it displays fine on screen but when it gets sent to the printer its like the \t is ignored and all the data is crunched together.
Any ideas?
Thanks
|
|
|
|
|
I am working with a dataset in which I need to access about 11 tables with lots of child/parent relations. I was going to do one large SQL statement but would using Relations.Add be better? Is one considered better than another?
|
|
|
|
|
I'm writing Browser Helper Object (IExplorer plug-in) in C#, Microsoft VS 2005, Framwork 2.0.
1. I implement interface IObjectWithSite and add event handler for events SHDocVw.DWebBrowserEvents2_Event.DocumentComplete and SHDocVw.DWebBrowserEvents2_Event.OnQuit in function SetSite :
[System.Runtime.InteropServices.ComImport, System.Runtime.InteropServices.Guid( "FC4801A3-2BA9-11CF-A229-00AA003D7352" ), System.Runtime.InteropServices.InterfaceType( System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown )]
public interface IObjectWithSite
{
void SetSite( [System.Runtime.InteropServices.In, System.Runtime.InteropServices.MarshalAs( System.Runtime.InteropServices.UnmanagedType.IUnknown )] object pUnkSite );
void GetSite( [System.Runtime.InteropServices.In] ref System.Guid riid, [System.Runtime.InteropServices.Out] System.IntPtr ppvSite );
}
[System.Runtime.InteropServices.ComVisible( true ), System.Runtime.InteropServices.Guid( "C06B3B91-769A-42d5-8BCD-CF70F8589FBA" ), System.Runtime.InteropServices.ClassInterface( System.Runtime.InteropServices.ClassInterfaceType.None )]
public class DOMPeek : IObjectWithSite
{
void IObjectWithSite.SetSite( object pUnkSite )
{
if(m_IUnkSite != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject( m_IUnkSite );
}
m_IUnkSite = pUnkSite;
try
{
SHDocVw.DWebBrowserEvents2_Event WebBrowserEvents = (SHDocVw.DWebBrowserEvents2_Event)m_IUnkSite;
WebBrowserEvents.DocumentComplete += new SHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler( OnDocumentComplete );
WebBrowserEvents.OnQuit += new SHDocVw.DWebBrowserEvents2_OnQuitEventHandler( OnQuit );
}
catch // cast or no such interface exception
{
}
return;
}
void IObjectWithSite.GetSite( ref System.Guid riid, System.IntPtr ppvSite )
{
}
2. Implement event handlers OnQuit and DocumentComplete
void OnQuit()
{
System.Windows.Forms.MessageBox.Show( "OnQuit" );
}
void OnDocumentComplete( object pDispatch, ref object VariantURL )
{
System.Windows.Forms.MessageBox.Show( "OnDocumentComplete : " + VariantURL );
}
3. I register the object DOMPeek as Browser Helper Object in windows register.
Then I run IExplorer and see the messageBox "OnDocumentComplete : about:blank". Then I close IE window and see the messageBox "OnQuite".
The problem consist in that I take this result only in MSWindosw2003sp1 (server) with MS VS2005 installed. In MSWindowsXPsp2 without any updates, without MS VS2005, but with all Framework installed I didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit". What's problem??? What updates need for correct working in MSWindowsXPsp2???
Then I try to install all updates for MSWindowsXPsp2 from Microsoft site and again didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit". Then I try to install MS VS2005 but didn't install all updates for MSWindowsXPsp2 and again didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit". Finally I install all updates for MSWindowsXPsp2 from microsoft site and then MS VS2005 then I see the messageBox "OnDocumentComplete : about:blank" and "OnQuit". But if I install MS VS2005 and then all updates for MSWindowsXPsp2 then not woking (didn't see the messageBox "OnDocumentComplete : about:blank", but see the messageBox "OnQuit").
What's problem??? What specifically updates need for correct working in MSWindowsXPsp2???
|
|
|
|
|
i have 5 checkboxes check1,check2,check3,ckeck4,check5,a textbox txt1 in my Form
if (check3.checked == true)
txt1,text ="Good morning "
if(check3.checked && check1.checked || check2.checked || ckeck4.checked || check5.checked)
{
txt1.text="good afternoon"
}
if(!check3.checked && !check1.checked && !check2.checked && !ckeck4.checked && !check5.checked)//non are checked
{
txt.text="good evening"
}
my textbox must automatically display the values,how do i do it,which events do i use
regards paula
|
|
|
|
|
On each of the check boxes register to the CheckChanged event, and register this method -> the same method.
|
|
|
|
|
is there a possibility to convert an argb value to rgb? I have to conform with a file information format where i have to write only rgb values... thanks!
|
|
|
|
|
Can you not just drop the a?
|
|
|
|
|
how can i do it? because the C# Color is auto-ARGB ... thanks a lot...
|
|
|
|
|
The .NET Color struct provides these instance properties: A, R, G, and B. You can use the last three to get the values you need.
Josh
|
|
|
|
|
That depends on how you want to convert it. The alpha channel (A) contains transparency information.
If you don't use transparency you could just drop that information. If there is transparency information you should draw the image on a solid background so that you get an image without transparency.
An ARGB value is a 32 bit value. You can mask off the top 8 bits to get the 24 bit value for the RGB channels:
int rgb = argb & 0x00ffffff;
---
b { font-weight: normal; }
|
|
|
|
|
Hi.
How do I draw a graphic with C# on .net (like excel)?
My datas are in database. I will take them to dataset or an array.
Thanks.
|
|
|
|
|
Have you thought about using a DataGridView?
|
|
|
|