|
VS2008 gives you the option of using 2.0, 3.0 or 3.5 for all project types including Pocket PC if that helps at all with question 2?
|
|
|
|
|
hi
i have database in SQL server and i want to bind picture
to my database (no link to picture)
how i do this ?
example will be great
thank's
|
|
|
|
|
hi ,
here is the code for sql database
---- I have a table (myTable) with columns (ID (int32) , photo (image))
---- ID Field is auto incearsment
SqlParameter SqlPR;
SqlCommand SqlCmd = new SqlCommand();
SqlCmd.Connection = ValidConnection;
SqlCmd.CommandText = "INSERT INTO myTable (Photo)VALUES ( @photo)"
byte [] ImageByte = ReadImage2ByteArray (PhotoPath);
SqlPR = SqlCmd.Parameters.Add ("@Photo",SqlDbType.Binary,ImageByte.Length ,"Photo");
SqlPR.Value = ImageByte;
SqlCmd.ExecuteNonQuery();
--------- Convert Image to byte array
public static byte[] ReadImage2ByteArray(string fileName)
{
using(Bitmap image = new Bitmap(fileName))
{
MemoryStream stream = new MemoryStream();
Image.Save(stream,System.Drawing.Imaging.ImageFormat.Bmp);
return stream.ToArray();
}
}
-------- if you want to retrive image from db then here is a hint
SqlDataReader DataRD;
SqlCmd.CommandText = "SELECT * FROM myTabe";
DataRD = SqlCmd.ExecuteReader () ;
byte[] content = (byte[])DataRD["Photo"];
MemoryStream stream = new MemoryStream(content);
Bitmap image = new Bitmap(stream);
picture1.Image = image;
------------ P.s
this code didn't proccess Sql Connections strings
you have to write your own connection strings ( I GUESS you know how to do it )
Kind regards
|
|
|
|
|
hi.. used to do splitContainer1.Panel1Collapsed = true;
splitContainer1.Panel2Collapsed = false;
for the splitcontainer..
but i cannot do that in wpf .. i cannot find the splitcontainer ..huhh
|
|
|
|
|
Many, many controls are missing. You can use winforms control if you must, but they really slow down animations, etc, I'd avoid it if you can
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 )
|
|
|
|
|
so how do i solve that?? i still need to use wpf.. no choice for me.. so how do i get the splitcontainer fucntion.. ? /pls help
|
|
|
|
|
Hi,
Is it possible to use/call windows form from windows service application during installation?
My requirements are sent in the previous mail.
With Regards,
Abraham Chethuvelil
|
|
|
|
|
Hi,
I need a help:
In the Crystal Report , there’s a box object which is filled with color .I need to extend this box object till at the end of the page.
I am suppressing the page header and page footer of that page where this box object is showing.
Now there is a gap is coming at the end of the page.
Thanks in Advance
f
|
|
|
|
|
How do you setup a DataTable with a set number of rows when instantiated.
Michael
|
|
|
|
|
Can you post your problem more presizly
Best Regards,
Chetan Patel
|
|
|
|
|
I want to setup table BSD with 100 rows when the object is created.
public class DataSetsCS
{
public DataSet_I dsI;
public DataSet_I.BSDDataTable BSD;
public DataSetsCS()
{
this.dsI = new DataSet_I();
this.BSD = new DataSet_I.BSDDataTable();
}
}
Thanks,
Michael
|
|
|
|
|
I have a requirement to create windows service. the requirement is to call a windows form while installing the service and to set some configuration parameters. Iam not able to call objForm.ShowDialog() or Application.Run(frmOptions) from the main() method of the service defined in Program.cs
My another requirement is to use command line parameters and check it while installation. The parameters will be like,
install show=true / uninstall show=true / debug show=true / install / uninstall / debug
if install show=true is passed while installation, then from the main it should check whether the service is already installed and based it either install should work or not.
The same thing should happen for uninstall. And for debug we must be able to debug the code by putting the break points.
show=true is used to show the windows form i mentioned top.
Anybody give a immediate response on this
Thanks and regards
Arun Jose
With Regards,
Abraham Chethuvelil
|
|
|
|
|
Hi
I can describe this in detail.
The service which I created should be installed in to the system using installshield. Then in Start-> Programs we should get the option to "install or uninstall the service".
If we are clicking on install service, it should show a windows form by using which we are setting some config parameters into a config file. After exiting the form, it should check the service is already installed or not. If installed it should say, service is installed already otherwise install the service.
Then by going to Services.msc, we have to start the service and the statements written in OnStart() should be executed.
In VB this install is done by NTService1.install method.
Can you suggest a solution to this?
I got stuck in this for the last one week.
With Regards,
Abraham Chethuvelil
|
|
|
|
|
When I am using
System.Diagnostics.Process.Start(@"C:\WINDOWS\system32\mspaint.exe",
@"C:\Dokumente und Einstellungen\a\b\1-1b69f6823fcbd047.jpg"));
It throws an Error that "C:\Dokumente\" was not found.
What am I doing wrong?
Thanks for your answers
|
|
|
|
|
I don't have the problem, but, try surrounding the argument by quotes, like this:
System.Diagnostics.Process.Start(@"C:\WINDOWS\system32\mspaint.exe",<br />
"\"C:\\Dokumente und Einstellungen\\a\\b\\1-1b69f6823fcbd047.jpg\""));
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Thank you its working now!
mybe i should got to sleep, I cant work well anymore
|
|
|
|
|
Hello everyone,
I have added a Web Browser Control to the my Windows Application using the following code:
this.webBrowser1.Navigate("http://yahoo.com");
As I am navagating the web using the WebBroweser Control, I have noticed that if the web-page contains Flash the mouse click works only ONCE. If I click the second time, nothing happens. I have noticed that I can get the mouse click working only for ONE click if I click on a button/tab or anything which is placed in Windows Application but it is not contained in WebBrowser Control.
Can someone be kind enough to tell me what is going on and how I can sort this problem?
Thank you very much and have a great weekend.
Khoramdin
|
|
|
|
|
I can't seem to reproduce the problem. I created a new form, added in the browser control, navigated to the page, and everything works fine.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Hello,
Thanx for taking the time and trying to reproduct the problem. After my extensive search I found that is a known problem with VS2005. Please see the link http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2311412&SiteID=1[^]
I am not sure why you were not able to reproduct the problem. It could be that you are using VS2008 as it has been suggested that the it doesn't suffer from the problem.
For the time being suggestion to solve this issue is to use VS2008 or using AxWebBrowser control.
Thank you very much and have a great weekend.
Khoramdin
|
|
|
|
|
Or it could be that i'm using SharpDevelop
Still, i'm glad you figured out what it was.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Hi!
I have bitmap with text on it and I want to get only the text and make the background transparent. I've tried MakeTransparent on the background color.
It returns the text but there are pixel fragments around the text with color of the background.
tnx.
|
|
|
|
|
Yup antialiasing for ya. I don't think you will be able to get just the text, without the slightly coloured pixels around the edge.
Unless you had some way of reading the text from the bitmap, and then re-drawing it or something. I'm not entirly sure what you want to do.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
I'm using webbrowser control with drawtobitmap method to get the image of the html page.
When I call MakeTransparent(backcolor) i get text with artifacts(The halo effect).
How do i get rid of these artifacts?
|
|
|
|
|
Err... okay then.
The way i see it is then, the only colour you KNOW is the original colour of the text, so if the text was white, somehow make every colour that ISN'T white transparent. How you'd go about making every coour in the image transparent except white? You can figure that out.
Or perhaps you could make the text transparent, and do something with that... does GDI+ have masks or anything? I don't know.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Course Instructor’s View:
Course Instructor should be able to Add/Edit/Delete the Content. i.e.
Add/Remove Course outline document.
View All /Add/Edit/Delete Assignments
View All /Add/Edit/Delete Quizes.
View All /Add/Edit/Delete Lecture Slides.
View All /Add/Edit/Delete Handouts.
View All/Add/Edit/Delete Announcement.
1. You have to save the information related to these documents in the SQL Server Database.
Course Outline: Date Given, DateUploaded.
Assignment : Title, Description, DateGiven, DueDate, UploadedDate, FileLocation.
Quiz : Title, Description, DateGiven, UploadedDate, FileLocation
LectureSlides : Topic, Description, DateDelivered, DateUploaded, FileLocation.
Handouts: Topic, Description, Date Given, DateUploaded, FileLocation.
Announcement: Text, AnnouncedDate, Priority(Low/Medium/High)
{“DateUploaded” should be inserted by the program itself, using DateTime.now property.}
{“FileLocation” is the full path of the uploaded file.}
2. In the datagridview, if the user clicks a row, another screen should be opened for a detailed view of that particular Quiz/assignment/test, where he/she would be able to edit the information. He also can Upload a file here.
3. All these content files can be of .doc/.pdf/.html/.ppt/… format. Teacher should be able to browse the file using “fileOpenDialog”. The selected file should then be uploaded/saved to the respective location.
{Hint: see “fileopendialog” and “System.IO.File” or “filestream” class methods, for saving these files}
4. Output Path(where all the course files are to be saved) is not to be hardcoded, rather it should be read from “app.config” file. See this link for help.
http://www.codeproject.com/csharp/SystemConfiguration.asp
5. Course Information has to be maintained in proper folder hierarchy. E.g. the hierarchy of Visual Programming course folders should be like this.
? Visual Programming
? Assignments
? Quizes
? Handouts
? Tests
e.g When the first Quiz is to be added, your program should create a folder named “Quizes” and add the quiz file at this location.. OutputPath\CourseName\Quizes\QuizFileName.doc , You have to do the same for Assignments, Handouts and Tests.
6. Create a table having CourseInfo, where each row corresponds to a course. This table should have CourseCode, Title, Instructor, CourseProfilePath.
can anybody help me in this problemm..........
|
|
|
|