|
Hi Justin. I hate your music.
Can you better describe your problem? You said the same file is updated in the database -- is that a problem? When do you want the file to be updated in the database? Only when it changes?
|
|
|
|
|
I have a JPEG file with the standard tags that i want to show the picture in C#.net. Does .Net support this kind of format? How?
|
|
|
|
|
You should be able to use a PictureBox control for it.
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
I think I couldn't explain my problem in a good way. I mean I have a binary file which contains the information of a jpeg file (with its header and everything). How can I show it in a picture box in C#.NET? I mean how can I convert it to a file with JPG extension in order to be able to assign it to the image property of a picture box?
|
|
|
|
|
Image.FromStream or Image.FromFile will take care of many formats, including JPEG.
Luc Pattyn
|
|
|
|
|
I think I couldn't explain my problem in a good way. I mean I have a binary file which contains the information of a jpeg file (with its header and everything). How can I show it in a picture box in C#.NET? I mean how can I convert it to a file with JPG extension in order to be able to assign it to the image property of a picture box?
|
|
|
|
|
Bitmap bm = new Bitmap(filepath);
should do it. Then, you can assign that bitmap to a picturebox ( which is good for limited showing of bitmaps ), or you can handle your paint event and draw it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I think I couldn't explain my problem in a good way. I mean I have a binary file which contains the information of a jpeg file (with its header and everything). How can I show it in a picture box in C#.NET? I mean how can I convert it to a file with JPG extension in order to be able to assign it to the image property of a picture box?
|
|
|
|
|
Hi all !
I have a NHibernate question and really need your help.
i have 2 tables with one-to-many relation like this :
-tblCategories with these fields:
catID int primary key ( reference category field of tblItems)
catName nvachar(30);
catDesc nvarchar(100);
-tblItems with fields
itemID int primary key
category int
itemName nvarchar(50);
itemPrice double;
Now i create a IQuery like this
IQuery q=session.CreateQuery("Select item.ItemID,item.Name,item.Price
from Item as item,Categories as cat
where item.Category.catID = cat.catID and
cat.ID=:_inputID ");
This query executes OK but the problem is that i don't know how to get the result as the datasource of a datagrid ( for example ). Can anyone help me???. I need it very much.
Thanks in advance
Merry chrismas and happy new year!!!
|
|
|
|
|
I don't think too many people here have experience with NHibernate, or at least, not enough experience to solve your problem. Perhaps you should ask this question in an NHibernate-specific forum.
|
|
|
|
|
I am coding my own webbrowser and downloader. From the browser, if I request a download like "www.domain.com/download.aspx?blabla.zip", the browser wants to re-navigate. But I could not get the next URL from "webBrowser1_Navigating" and either from "webBrowser1_FileDownload" eventhandlers. What is the solution of getting the 2nd URLs. Is it possible? I know many of you will say "YES". But I don't know HOW???
Thanks in advance.
hU
|
|
|
|
|
Have a look at this CP article[^] that talks about extending the WebBrowser to include some of the information you require.
|
|
|
|
|
I will describe the situation I have encountered with narrative text. I am working on an application that implements a drag and drop event handler. In the drag and drop event handler, there is a dragOver() event and a paint() event. In the DragOver event there is a refresh() method called that I believe calls the paint event to be called again to repaint the control.
The problem is that the control does not repaint the entire control when the control is dragged. It only repaints the top portion of the control when it is dragged. Is this because the control cannot repaint the amount of area required fast enough before it is redrawn?
How do I get the entire control to be repainted when it is refreshed or invalidated? How would the clipping rectangle or the region properties be utilized to solve this issue? Do I need to break the control up into regions to be repainted so that all of it could be repainted or could the entire control be implemented with a clipping rectangle so that all of it could be repainted? Would appreciate some insights as to how to approach this issue.
-- modified at 20:42 Saturday 23rd December, 2006
|
|
|
|
|
When you call Invalidate, it notifies the control that it should be repainted at the next available time. A call to Update actually stops processing and repaints the control immediately. Typically, Invalidate is the right one to call.
IIRC, the Invalidate method has some overloads that let you specify which region of the control you can redraw. Have you played with those at all?
|
|
|
|
|
hi,
can any1 provide me d code for wave playback and DTMF code identification using TAPI in c#.net.
i will be highly thankful
i need it urgently
pllllllllllaaaaaaaaa help me
Lets hope 4 d best
|
|
|
|
|
A quick search for "C# TAPI" reveals some possible hits. Have you tried searching?
|
|
|
|
|
yeah i tried but did not find anything help full.
my problem is i can detect and answere incomming call..
i wanna play a wav file and detect d digit pressed by user in response...now m stuck in d code
ITBasicCallControl2 bcc=(TAPI3Lib.ITBasicCallControl2)ici;
ITTerminalSupport ts =(ITTerminalSupport) ia[line];
ITTerminal fpbt = ts.CreateTerminal(TAPI3Lib.TapiConstants.CLSID_String_FilePlaybackTerminal, TAPI3Lib.TapiConstants.TAPIMEDIATYPE_MULTITRACK, TAPI3Lib.TERMINAL_DIRECTION.TD_CAPTURE);
ITMediaPlayback mp = (ITMediaPlayback)fpbt;
object[] audiofile=null;
audiofile[0]=Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Welcome.wav";
mp.PlayList=audiofile;
//because it requires objet array.
bcc.SelectTerminalOnCall(fpbt);
TAPI3Lib.ITMediaControl mc=(ITMediaControl)fpbt;
mc.Start();
MessageBox.Show("playing wav file");
//will start playing the audiofile
can anyone pin point d error....
m really woried
plllllllllzzzzzzzzzz help me
|
|
|
|
|
Hello
i am working on a c# desktop application with mdi form.
i have added two images and a label to the mdi form.
its looks fine in the start. But when a child form is loaded the child form comes below the image and text box only
can anyone tell a solution for this
Regards
Hari
|
|
|
|
|
hi
i want to send and recive fax from my VC# 2005 app,but how to do??
thanks
|
|
|
|
|
A quick Google search for C# fax brings up some possible hits. Have you tried searching yet?
|
|
|
|
|
Hi,
I would like to get help on designing a .net 2.0 winform.
One or more Users should be able to be assigned to one Assignment. A percentage of the Assignment is allocated to the selected user(s). Each assignment can have one or more users assigned to it.
For example:
A manager opens the form. Selects an assignment (AssignmentNo 5) from a combo box. From a Listbox control he then selects one or more users (User1, User2,...) to be assigned to that selected Assignment (AssignmentNo 5). AND then somewhere and somehow each selected user has to be given a percentage of the assignment (i.e. User1 to be given 80%, User2 to be given 20%) of AssignmentNo 5. Later on the manager may want to add User3 to the same assignment and to give the user3 10% of AssignmnetNo 5.
Please note that there is no need to limit the percentages to add up to 100%.
I can select the users from the listbox but not sure how to design the interface to allocate percentages for each user.
Thanks
|
|
|
|
|
a solution can be like, while entering the assignment into the system, also get the questions in that assignment to store them.
so when the assignment will be divided into two or three different users in percentages, get the percentage based on the number of questions and then divide the assignment according to no of questions. like of u have 10 questions in an assignment, 80% will b 8 questions and 20% will be 2 questions. so then u can assign user1, 80% of the assignment, and user2 20% of the assignment.
Regards
Saqib
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
I am using the Datagrid form control in C#.net environment. I have no problem binding the datagrid to the datasource and displaying the table I want to display. But I am having a problem changing some of the grid elements using code after I have displayed the control.
For example, there are some columns that need the width changed. I have not been able to change any of the grid elements/properties at all.
Here is the code that displays the grid and its data:
------------------------------------------------------------------------------
DataSet aDataSet = new DataSet();
OleDbDataAdapter aAdaptor;
aSqlQuery = "SELECT * From Employee";
aConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID='Admin';Data Source=CSharpDataGrid.mdb;";
aConnection = new OleDbConnection(aConnectionString);
aAdaptor = new OleDbDataAdapter(aSqlQuery, aConnection);
aAdaptor.Fill(aDataSet);
this.dgEmployee.DataSource = aDataSet.Tables[0];
--------------------------------------------------------------------------
As I said, this code brings up the control with the data loaded. Now I am trying to change the width of one column:
--------------------------------------------------------------------------
DataGridTableStyle EmployeeTableStyle = new DataGridTableStyle();
EmployeeTableStyle.MappingName = "Employee";
DataGridColumnStyle ColumnFullName = new DataGridTextBoxColumn();
ColumnFullName.MappingName = "Name";
ColumnFullName.HeaderText = "Full Name";
ColumnFullName.Width = 5;
EmployeeTableStyle.GridColumnStyles.Add(ColumnFullName);
-----------------------------------------------------------------------
This code has no effect on the displayed grid. I would expect the DataGridTableStyle to be associated with the Employee table in the grid dataset. And then I would expect the column “Name” would change as per the above code. But nothing happens.
Would appreciate any tips on how to change row and column properties (width, color, selection status, etc) using C# code.
Thanks, Vern
Vern
|
|
|
|
|
hi,
the default name of your table in aDataSet is 'Table'. this should match with your EmployeeTableStyle.MappingName which is 'Employee'.
set the aDataSet.Tables[0].TableName='Employee'.
if you are not skipping any code, then add styles in following order and THEN BIND.
DataGridColumnsStyle(s) --> DataGridTableStyle --> TableStyles
regards
|
|
|
|
|
You really identified the problem. Once I set the aDataSet table name to "Employee", everything suddenly works.
I spent days working on this problem and got so frustrated. I am so thankful for your tip. Such a little detail can make such a difference.
Thanks again for your help.
Vern
|
|
|
|