|
There is string in the statement.
For example, SQL statement in C#.
strSQL="Select * "
" from TB1";
|
|
|
|
|
strSQL="Select * " +
" from TB1";
|
|
|
|
|
Another way is
strSQL="Select * ";
strSQL+=" from TB1";
|
|
|
|
|
strSQL = @"Select *
from TB1";
works as well. It's useful for putting long formatted strings in code.
|
|
|
|
|
Hallo comunity,
i create litle tool with Visual Studio .Net 2005 and with Framework 2.0 Beta and it works good, but is a beta version of framework!, but not all of systems have a Framework version 2.0, most of them have a 1.1 framework version, can i make a configuration witch framework to use when my tool is installed, or when i compile the aplication they should use the 1.1 framwork and not the 2.0, so i can install the application on everey system with 1.1 framwork, i have 3 versions of Framework, 1.0 , 1.1 and 2.0???? Maybe in a Solutionsettings or preferences or properties???
thanx for help!
mirso
|
|
|
|
|
You can specify the version of the runtime required by your application in configration file in requiredRuntime element you can specify which versions of the common language runtime that your application supports in supportedRuntime
elment look at startup Element[^]
requiredRuntime Element[^]
supportedRuntime Elemnent[^]
MCAD
-- modified at 9:17 Friday 2nd September, 2005
|
|
|
|
|
Hallo mcad,
thax for help, i have do this!
mirsad
|
|
|
|
|
and this solved the problem or what?
MCAD
|
|
|
|
|
i ansver later, i dont have yet testing the application!
that what i make:
<br />
<configuration><br />
<startup><br />
<supportedRuntime version="v1.0.3705" /><br />
<supportedRuntime version="v1.1.4322" /><br />
<supportedRuntime version="v2.0.50215" /><br />
</startup><br />
</configuration><br />
I take all 3 Framework versions to support my application, i message you the result!
mirsad
|
|
|
|
|
hallo comunity,
my idea dont work now, hmm, this configuration file dont take result by the installation, the installer search framework 2.0 again, i should insert a
required tag element maybe in the configuration file, like this:
<requiredRuntime version="v1.1.4322" safemode="true">
maybe works now!? any idea for me?
regards
mirso
|
|
|
|
|
hi,
this dont work with this statement in the confiturations file, the installer takes only the framework 2.0!?
I think that my config file is wrong kreatet!!! Witch name must have a configuration file for an projekt, and i have 5 projekts included in my projekt solution!! and in every project him own config file! is that right???
regards
mirso
-- modified at 6:57 Monday 5th September, 2005
|
|
|
|
|
I'm importing a COM interface definition into C#, and I came across a method that has a parameter:
[out, iid_is(riid)] void **ppvInterface
This parameter is used to pass a COM interface reference out to the caller, which in this case will be managed code. The use of void** , is, I believe, due to the fact that the interface reference passed to the caller may be either IDispatch or IUnknown .
I know how to deal with cases where the base interface (between the two) that the interface is derived from is known - make the argument be of type object , and then add a MarshalAs attribute, specifying either UnmanagedType.IUnknown or UnmanagedType.IDispatch . But what should be done when the interface could be derived from either one?
TIA!
|
|
|
|
|
Recently I design a custom comboBox control,this control includes two forms.The one of the forms is inherit from the namespace that System.Windows.Forms.ComboBox,When active DropDownEvent,The second form will be shown.But the focus is moved on the new form.
However,I want keep the focus still on the main form.
Will you help me,please? Thanks.
MSN:tomatoboy78@hotmail.com ,you can email to me.;)
|
|
|
|
|
From what I understand you have two forms : a mainForm, and a "dropDownForm". When you press the drop down button you wish to show the dropDownForm but keep focus on the mainForm. If you do that the dropDownForm will not be visible (only if you make it allways on top, whitch is not a good thing, let's say you switch to an other aplication...in this case you will see the dropDownForm). I recommend you to forward all the focus actions you wish to keep onto the mainForm from the dropDownForm.
I hope you understand...because is a rough world out there...
|
|
|
|
|
Is there anyone can help???
I am trying to get and set the content of some page items those have
a particular associated xml element. And this is what I tried:
InDesign.Application indesign;
Type t = Type.GetTypeFromProgID("InDesign.Application", true);
indesign = (InDesign.Application)Activator.CreateInstance(t);
InDesign.Document doc = indesign.ActiveDocument;
InDesign.PageItems items = doc.PageItems;
System.Collections.IEnumerator enu = items.GetEnumerator();
while (enu.MoveNext())
{
// this is ok, giving System.__ComObject
// which is useless information
MessageBox.Show(enu.Current.ToString());
// but this is not, giving InvalidCastException
// What object type is it meant to be ????
PageItem i = (PageItem)enu.Current;
MessageBox.Show(i.Id.ToString());
}
I also tried doc.AllPageItems, but it gave me the same exception.
Thank you for any help.
Ha
|
|
|
|
|
I have Visual C++ lib file, but I also want to use C# to write my program. How can i do? Can I use Visual C++ *.lib into C#?
Second problem:
Is it same the writen methods with Visual C++.NET & Visual C++?
|
|
|
|
|
Nop, you can't use .lib on c#, but, you can use Interop and call functions in a DLL.
Second, Visual C++.Net can compile projects made with Visual C++, but Visual C++.Net can compile managed C++ programs also.
Eduardo Diaz
site | english blog | spanish blog
|
|
|
|
|
The best you can do is to write a mixed-mode wrapper around the classes in the library and then use that wrapper from C#.
uumeme wrote:
Is it same the writen methods with Visual C++.NET & Visual C++?
No, VC++ .NET generates IL, VC++ code is compiled to machine code.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
Hi All,
I Have two RichTexBoxes on a form vertically one above the other.
Now i want to draw a rectangle on the Richtextbox like we draw in MS-WORD.
This rectangle should allow the user to enter text within it.
and if the rectangle is dragged by holding one of it's end the size of the rectangle should increase. if the size of the rectangle increases more than the Richtextbox's size the rectangle should be continued on the next Richtextbox.
What i want to achieve is the same that we do in MS-WORD.
I dont know whether it is possible or not.
Please help me out,
Waiting for reply
Rgards,
Pramod
|
|
|
|
|
Nope, you can't do it. A richtextbox is a box for text only. You'll need to create your own control to draw text and graphics, and to control the input area like this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Christian,
I would also like some more help from u.
can i paste any object on the Richtextbox i.e. if i paste a form or a panel on a richtextbox and enter text on the Richtextbox the text should not go behind that panel / form. Is that possible .
OR is there any way to insert a table on the RichTextBox as we insert the table in MS-WORD.
Waiting for Reply.....
Regards,
Pramod.
|
|
|
|
|
No, in every case, you're talking about a control you will need to create yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Now i have a Main richtextbox placed on a form and i try to create a table using forms and placing Richtextbox on the Forms. Each form looks like the cell of the table,
Now the problem is that i have to print the contents of the Richtext in each forms in the tabular form
|
|
|
|
|
you can insert table in the same way i told you in draw rectangle or if you want more elegant way you must deal with RTF syntax and i think this way Ms word work -Not sure- RichTextBox have Rtf Property which you can set to rtf for example the following code will draw table with one row and three cells
{\rtf1\fbidis\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
\viewkind4\uc1\trowd\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx2952\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx5904\clbrdrt\brdrw15\brdrs\clbrdrl\brdrw15\brdrs\clbrdrb\brdrw15\brdrs\clbrdrr\brdrw15\brdrs \cellx8856\pard\intbl\ltrpar\lang3073\f0\fs24 Cell 1\cell Cell 2\cell Cell 3\cell\row
\pard\ltrpar\fi-108
\par }
this things you see are rtf syntax of the table
for its Specificationlook at Rich Text Format (RTF) Specification, version 1.6[^]
to see this things in action create new appliction put rRichTextBox and textbox or hardcoded this syntax in string variable in somewher in your application write
<br />
richTextBox1.Rtf=textBox1.Text;<br />
or richTextBox1.Rtf=yourStringVariable;
this will draw the table
i hope this help you but i think that if you make your application automate MS-Word may it will be easier
NOTE SORRY FOR THE WIDTH OF TEXT BUT I DIDN"T NOW HOW TO CONFIGURE IT
MCAD
-- modified at 20:05 Friday 2nd September, 2005
|
|
|
|