|
please help me,
I want to store and retreave word document in sql server using c#.net
bobin
|
|
|
|
|
Create a BLOB in a table the database, serialize the word document to a byte stream and save it in the database. To recreate it, you would need to deserialize the byte stream and write it to a file. It's probably worth having a column with the original filename of the document in.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi guys
i have a usercontrol which consists on a listview ,and two buttons(ok and cancel).
now i have placed this control on my windows form,
now i want when i press enter key so the event handler of button ok should fire,
like we do on normal
me.acceptbutton = buttonok (e.g)
but i cant do it here because buttonok is private in my user control. i have buttonok event handler which i can handle , but i want to user enter key for that .
any solution
thanks in advance
hello
|
|
|
|
|
Hello,
Add a read property from Type System.Windows.Forms.Button to the UserControl, and return the button instanz.
//UserControl "UCListView" code:
public Button AcceptButton
{
get
{
return okButton;
}
}
//Forms code:
this.AcceptButton = ucListView1.AcceptButton;
Hope it helps!
All the best,
Martin
|
|
|
|
|
thanks this can work, but dear if it is not less secure.
i will give my okbutton publicily to my user which i dont want to do.
coz in this way the user will have full access on this button because he can get
its refderence from
this.AcceptButton = ucListView1.AcceptButton
am i right ?
hello
|
|
|
|
|
hi
With gdi+ we can draw every thing we want, but I want to write a string in a form over all of the control. When I use drawString() method the string is written on form but under the other control. what should I do?
|
|
|
|
|
Mabye the TextRenderer.DrawText can do it better? Please tell me if this works.
|
|
|
|
|
No
this method didn't solve my problem.
|
|
|
|
|
The string is written on the drawing surface of the form, which sits behind all the other controls on the form. AFAIK, no matter what, any drawing you do on the form will always show up behind the controls on it.
|
|
|
|
|
Hi,
This may sound very silly but please do help me to understand…
In C# we write
Textbox1.text=”hello”
My question is regarding the “”DOT”” what is its name and what is its functionality….
Now in this code how does the dot work…
obj.delegateobject = new windowsdelegates.Form2.nameofdelegate(SetText);
is it something that we use to pass values ?????
I am new to prgrmng and need you guys help…
Thanking you
k
|
|
|
|
|
At this point, you really don't know enough to be able to seek help here. I trust you are at school, and not being paid for your efforts. You should buy a book on C# and work through it. There's really no way that forum responses are going to help you much, because every answer you get is just going to raise more questions. Get a book, and work through it in a structured way.
The answer is that Textbox1 is a class, and text is a property of that class. The dot means that you're accessing a property or method of a class instance.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thankyou sir....
i am looking for a book that is simple to understand since this is my fiorst step to pgrmg
C#
|
|
|
|
|
http://www.amazon.com/s/ref=nb_ss_gw/104-7566679-9297512?initialSearch=1&url=search-alias%3Daps&field-keywords=C%23+24+hours[^]
The first two books on this list ( both teach yourself C# in 24 hours ) should be a good starting point ( obviously buy just one ). This site is great if you get stuck on something specific, if something is not clear to you. But, you should start with the book, and use the site when something needs further explanation. That will give you the best result.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well i believe u must be familiar with properties and functions. Every object of any class has some properties and methods. e.g
class MyClass
{
int i;
string j;
void MyClass(){}//this is constructor
Public void MyMethod( int x )//this is member function
{
return x*x;
}
}
Now if i make an object of this class
MyClass obj = new MyClass();//Notice I called the constructor.
Because obj is an instance of MyClass so it must have a cope of i,j and MyMethod(int x) of its own.
So what i should do to access these properties(i,j) or member function of MyClass.............Here is wat i would do.
obj.i=9;//so i m using dot to access the properties of the object.
obj.MyFunction(8);//Here i m calling the member functon.
Now to the code u provided.
obj.delegateobject = new windowsdelegates.Form2.nameofdelegate(SetText);
Look at this in pieces
obj is an object of any class
this class must have some property delegateobject
we are assigning this property(delegateobject) an object of class form2 by setting its name "Set Text". So here is the moral lesson dot is also used to access classes within a namespace.
I will recomend u so hav some good book on C#.NET for beginner level. u will get the answers to most of ur questions.
|
|
|
|
|
well, i just run thru the question, here you declared int i, and string j.. both are private members in class MyClass.
you can keep the cariables as public if you want to access it. If you want to access the private members dotnet provides another techique... "property".. in which you have more control....
like private int i;
public int I
{
set
//
get
//
}
My small attempt...
|
|
|
|
|
sorry sir,is there any relationship between i&I?
just like this:
class Distance
{
float start,finish;
public float Start//can i write it as start?
{
get{return start;}
set{if(start>=0)start=value}
}
...
}
public class MainClass
{
public static void Main()
{
Distance d=new Distance();
d.Start=5
Console.WriteLine(d.start)
}
}
Is there a really value of Start which equals start?which word gives the Start a value?i'm sorry,my english is so bad ,I don't know whether you got my mind or not.
另:祝天天快乐。
|
|
|
|
|
heii dont worry what you wrote was correct....
the thing is simple that, private members cant access from out side the class.. thats why you got error earlier........
now to access that private members, we can use "Property", that is what you exactly did...
usually we declare the member with small letter and Property with Capitol letter
as float start;
and public float Start
{
}
My small attempt...
|
|
|
|
|
yeah,I got lots of things from you,thanks again.
|
|
|
|
|
okie okie..... Just try to get some books of C# and start.. otherwise you will get these kind of questions soon
My small attempt...
|
|
|
|
|
Thankyou Azif
|
|
|
|
|
gud pm sir, im working with my project using c#, theres a slight problem when i view my data with crystal report,im using with date range(date from and date to)and it was supposed to be generating report with the date that i pick,apparently it appears that all my data in my database was view in my crystal report... it just show all my data.... pls help, im working with this with almost a month thank you...
bhebhekoh
laguna,philippines
|
|
|
|
|
Please be specific about your question and make it more clear (don't use textspeak or continual run-on sentences)...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi my task is to change the font,font size, color and style of a label this can be done easily by a font dialog box but here i am using comboboxes and textboxes to set the properties to a label dynamically
as the properties like font,font size are read only type i am getting problem
if anyone know's how to do it please let me know
regards
sindhu tiwari
always wishing to learn
|
|
|
|
|
You have to replace the entire font every time you change a property. The Font property on a label is not read only, is it ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thank u sir now everything is set except the font style
i am unable to set the font style
the code is
lab[foc].Font = new Font(global.font, global.fontsize, FontStyle.Regular, GraphicsUnit.Point);
i am using a label array and global is a class font fontsize are static variables if u have any idea plz tell me how to set the fontstyle ...
i want to use a string at fontstyle
learn before u earn
|
|
|
|