|
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
|
|
|
|
|
I'am developing a sticker printing software. In my company we have printer with both COM and LPT port. So my software must support both.
For printing,
I create FileHandle to send data to printer. This method works both COM and LPT but I can't learn if printer finished its job.
with this methot printer gives overflow error when I try to print more than 50 sticker.
My code like this...
public const Int32 GENERIC_READ = -2147483648;
public const Int32 GENERIC_WRITE = 1073741824;
public const Int32 OPEN_EXISTING = 3;
public const Int32 FILE_ATTRIBUTE_NORMAL = 128;
public const Int32 NOPARITY = 0;
public const Int32 ONESTOPBIT = 0;
[DllImport ("kernel32", SetLastError = true)]
public static extern IntPtr CreateFile (string lpFileName, Int32 dwDesiredAccess, Int32 dwShareMode,IntPtr lpSecurityAttributes, Int32 dwCreationDisposition,Int32 dwFlagsAndAttributes, IntPtr hTemplateFile);
string port = ""// LPT or COM
IntPtr hParallelPort = CreateFile (port, GENERIC_READ | ENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL, IntPtr.Zero);
FileStream stream = new FileStream (hParallelPort, FileAccess .ReadWrite);
with this I'am send data to printer over LPT or COM
stream.Write(file);
|
|
|
|
|
Actually i have made one application in C# for importing .CSV file.
My program takes file and put all data from .CSV file to database.
It is working properly on localhost,but when i run that on server it gives me error that unable to find taht path of that selected file
what can be the problem?
i am unable to find that one
Please help me
Jayraj
|
|
|
|
|
Does the application get the full path of the file or does it use some kind of relative path. Can you show the code where you open the file for reading? That might help finding the cause of your trouble.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
hi All
I am create Qurey like " SELECT c_EmpFName As Name,c_EmpCode As Code, c_CardCode As CardCode, c_BankName AS BankName ,c_AccountNo AS ACNO, c_qualification AS Qual FROM dbo.t_EMPINFO WHERE (c_Softdelete = '1') ";
and Excute by using "OleDbDataAdapter" and fill the DataSet Object "ds"
now i want to bind this ds to crystal report object how can do it
Is any one Help me !!!!
thank !!
|
|
|
|
|
ReportDocument doc = new ReportDocument();<br />
doc.Load(...);<br />
doc.SetDataSource(ds);
Here ya go.
WM.
What about weapons of mass-construction?
"You can always try to smash it with a wrench to fix that. It might actually work" - WillemM
|
|
|
|
|
Hi
I have a problem of binding a arraylist to a data table. Could you help me please?
ArrayList aList=new ArrayList();
aList.Add("Value1");
aList.Add("Value2");
aList.Add("Value3");
aList.Add("Value4");
I wannt to bind the aList value to a data table in c#. How to do please?
kesavan
|
|
|
|
|
create object of arraylist
ArrayList aList=new ArrayList();
then fill the Arraylist and finally create one object of datatable
and then give the DatSource as Arraylist object ( i.e. aList) and then bind it refer below code;
datatableobject.DataSource = aList;
datatableobject.DataBind();
It will be work !!!!!!!1
|
|
|
|
|
Hi guys,
I think I need some serious painkillers on this!
Short version:
Can anybody explain in details how to expose a C# WinForms Control as ActiveX control. Either via hosting it in a MFC ActiveX control or by implementing it completely in C# (implementing all interfaces, registration/unregistration stuff, events).
Perhaps somebody has a template project for this problem where I just can drop in my Windows Forms Control and is willing to share it with me and the others (sounds like XMas, I know).
Bloody details:
We have a large client application with lots of legacy code that implements an ActiveX container. So you can add e.g. GUI components by providing new ActiveX controls. Since we have almost year 2007 we want to develop new GUI components with Windows Forms instead of the existing MFC/OWL stuff (yes! OWL! ). We recently migrated to Visual Studio 2005 (.NET 2.0).
As far as I can see there are 2 main approaches:
(Approach 1) Use of a MFC ActiveX control for hosting the Windows Forms control and use the new MFC 8.0 template classes CWinFormsDialog[^] or CWinFormsView[^] for adding the WinForms control to a CDialog/CView.
(Approach 2) Implement all necessary COM interfaces completely in C# and make them visible to COM and do the extra COM registration/unregistration stuff as explained here[^]. So the resulting component would be completely written in C# with no other languages involved. Furthermore we have about half a dozen COM interfaces for communication between the client and the ActiveX component. These interfaces must be implemented too. Sounds like very much more work than approach one.
So we decided to follow approach one - hosting a WinForms control within a MFC ActiveX control. What a pain until now!
This is what we did (following the MSDN examples[^]):
(1) Created an "empty" MFC ActiveX control, with all of our COM interfaces, showing an empty CDialog. Works flawlessly when added to the client application or to the ActiveX Control Test Container.
(2) Enabled Common Language Runtime Support (/clr) for the project. After fixing some compiler warnings the project compiles fine to MSIL.
( #1) Here is already the first major problem: When the project is started after '/clr' is activated, Visual Studio 2005 locks up completely while loading the CLR DLLs (e.g. 'mscoree.dll', 'mscorwks.dll'). There is no error message or crash, but VS2005 hangs infinitely and the only thing to do is killing the 'devenv.exe' process. Why is this? But it's possible to start the application regularly! Only when started via VS2005 it hangs. The ActiveX still shows up correctly when the application is not launched via VS2005.
(3) Since I found no solution for this problem I sighed and added a CWinFormsControl member to the "empty" CDialog as described in the MSDN example here[^] (which works by the way perfectly when used in a stand alone dialog application). I tried two variants:
CWinFormsControl<WinFormsCtrl::UserControl1> m_WinFormsCtrl;
CWinFormsControl<System::Windows::Forms::LinkLabel> m_WinFormsCtrl; The result was the same in both cases:
( #2) When the ActiveX is about to be displayed it crashes in 'CWinFormsControl<TManagedControl>::InternalCreateManagedControl' (<VS2005-install-path>\vc\atlmfc\include\afxwinforms.inl). Output window says: A first chance exception of type 'System.AccessViolationException' occurred in <MyActiveX>.OCX
I got this information by attaching to the application process with VS2005 when the application is already running.
I read several threads where members of the Visual Studio Team and MVP's are saying that MFC 7.1/8.0 are officially supported unmanaged hosts for Windows Forms controls, just like Internet Explorer. But it seems not to apply for MFC ActiveX controls!?
P.S.: I already tried it in the C++/CLI board but got no answer at all.
cheers,
mykel
If they give you lined paper, write the other way!
|
|
|
|
|
C'mon... doesn't anybody have experience with hosting WinForms controls inside MFC ActiveX controls?
There must be lots of large "legacy" applications out there which implement an ActiveX container for (GUI) extensions.
Any help is appreciated, even comments like "Careful, you'll likely get burned using this approach, because ..."
cheers,
mykel
If they give you lined paper, write the other way!
|
|
|
|
|
How Can iu have a Msi file with Unicode text like سس is it possible ??
MHF
|
|
|
|