|
how i can use crystal reports in C#?
aayzgroup
|
|
|
|
|
A@YZ wrote: how i can use crystal reports in C#?
Try Google[^]?
|
|
|
|
|
how i can generate Reports in C# applicatoin programmatically?
aayzgroup
|
|
|
|
|
use SELECT EXPERT in crystal report
add parameters and set them from your code in application
|
|
|
|
|
Hi,
When I'm compiling an idl file in a project in VC8 2005 on x64 configuration I'm getting the error. The operation could not be completed. Unspecified Error. Any comments on the same. How do I rectify it. Does it require some settings to be done. I have the same error pop up when I try to get the Properties of the project but could not do so.
Thanks
|
|
|
|
|
Does any guru know how to get the file attributes i.e. subject, title, author, for a file that is not a microsoft office document. There is no information on the web or with Microsoft on how to do this.
|
|
|
|
|
Are you looking something like this ? :
http://www.codeproject.com/cs/files/detailedfileinfo.asp
|
|
|
|
|
Luk @
FileInfo Class of
System.IO Namespace
|
|
|
|
|
Hi,
I encountered a problem in using tab control in VS studio 2005.
If I set the tab control "Alignment" property to "Left" or "Bottom",
so that the tab page strip appear on the left or bottom of the pages, the problems arised. For "Left" alignment, the text on the tab strip didn't show up. For "Bottom" alignment, the tab strip appearance look strange. How can I solve it ?
Thanks
|
|
|
|
|
I would recommend posting this on the Microsoft forums so that it has a chance to get back to the developers.
|
|
|
|
|
hi
i want to know how to write programs fo yahoo (like booters or antibooters or ...) in c#.net ..
Please give a resource for tools and tutorials .. thanks ,,
|
|
|
|
|
I have only a link for Yahoo Messenger SDK in C++.
http://developer.yahoo.com/messenger/
You must use DllImport to use it.
|
|
|
|
|
Hi friends
i've dataviewgrid with data from sql server db. our select can multi select on the grid.
my question is ,users may sometime forget to hold Ctrl key and they loose all previous selections. and they have to redo all those selections again.
am just wondering is it possible to have checkbox for selection (like in listbox) in grid ?
Thanks for ur ideas
Cheers
|
|
|
|
|
Why not!!! Just like list box u can have check box also in ur grid. u can add check box to the item template of the grid. and at the end of the grid give a submit button so that u can do the rest of the process with the selected items.
Vipin
|
|
|
|
|
hey, i'm writing an application which uses a WebBrowser control to navigate a database of sites and do stuff with it.
i know i better use http request but i can't for the specific thing i wanna do.
anyway, my architure is:
WindowForm which creates a single thread, and the thread creates few threads which do all the work.
My problem is, that after an unspecific time, the application hangs... i have no idea why, i've created a message pump inside the small thread with the webbrowser and all threads hang at "DispatchMessage" while teh main thread hangs at m_Smallthread.Start();
This is the code for the main thread:
{
// Fill first the list.
m_lvListView.Invoke(UpdateTheListView, m_dsMyURLs);
// No threads are running.
m_nCurrThreadsRunning = 0;
// This goes over sites.
int nSiteCounter = 0;
// Go over sites
while (nSiteCounter < m_dsMyURLs.Tables[0].Rows.Count)
{
// Check the curr thread num, that is no longer than max boz
if (m_nCurrThreadsRunning < m_nMaxNumberOfThreadsBoz)
{
// Create wanted manual event.
m_StopChildThreads = new ManualResetEvent(false);
m_eSmallThreadStopped = new ManualResetEvent(false);
// Gets real url.
string url;
if (m_dsMyURLs.Tables[0].Rows[nSiteCounter].ItemArray[2].ToString() != "")
{
// Add site name
url = m_dsMyURLs.Tables[0].Rows[nSiteCounter].ItemArray[2].ToString();
}
else
{
// Add site name
url = m_dsMyURLs.Tables[0].Rows[nSiteCounter].ItemArray[1].ToString();
}
try
{
// Create new single getter.
SingleSiteGetter sgSingleGetter =
new SingleSiteGetter(url,
nSiteCounter, EndSingleThreadFunc, m_lvListView,
m_uaArguments, m_StopChildThreads, m_eSmallThreadStopped,
m_nSecsToNavigateWait, m_bDoChilds, ref m_bIsDoEventsLocked);
// Create the thread.
Thread trSingleGetThread = new Thread(sgSingleGetter.StartSmallThread);
trSingleGetThread.Name = "SmallBrowserThread number " + nSiteCounter.ToString();
// Specify it as STA
trSingleGetThread.SetApartmentState(ApartmentState.STA);
Interlocked.Increment(ref m_nCurrThreadsRunning);
// Lock thread, and add it.
Monitor.Enter(m_hThreads);
m_hThreads.Add(m_StopChildThreads, trSingleGetThread);
Monitor.Exit(m_hThreads);
trSingleGetThread.Start();
++nSiteCounter;
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
else
{
// Continue if all ok.
Thread.Sleep(300);
}
// Check for canceling
if (ClosureThreadFunc())
{
return;
}
}
// Check that all small threads are done.
while (m_hThreads.Count > 0)
{
// Continue if all ok.
//Application.DoEvents();
Thread.Sleep(500);
// Check for canceling.
if (ClosureThreadFunc())
{
return;
}
}
// Make asynchronous call to main form
// to inform it that thread finished
m_frmPirsumon.Invoke(m_frmPirsumon.m_delegateThreadFinishedEvent, null);
}
* In the above code, we always check if number of threads is not at maximum allowed.
this is the code for small thread:
************************
// Says that its initilizing.
m_lvListView.Invoke(SingleUpdatingProc, m_nSiteIndex, "Starting...", ListViewColums.STATUS);
// Init the web browser (new webbrowser + events).
InitilizeWebBrowser();
// Handle navigation.
int nNavigateResult = Navigate(m_strUrl);
*********
**** This navigates into site: *********
private int Navigate(string strSite)
{
int nResult = ALL_OK;
// Navigate to the wanted url.
m_wbMyBrowser.Navigate(strSite);
DateTime dtNavigatePressTime = DateTime.Now;
m_lvListView.Invoke(SingleUpdatingProc, m_nSiteIndex, "Surfing...", ListViewColums.STATUS);
// Wait till the navigate is completed.
while (nResult == ALL_OK &&
m_wbMyBrowser.ReadyState != WebBrowserReadyState.Complete)
{
// Get how much time passed sience navigation.
TimeSpan tTimeSpent = DateTime.Now.Subtract(dtNavigatePressTime);
// check if time expired.
if (tTimeSpent.TotalSeconds >= m_nSecsToWait)
{
// Stop browser.
// m_wbMyBrowser.Stop();
// Update list
m_lvListView.Invoke(SingleUpdatingProc, m_nSiteIndex, "Error", ListViewColums.STATUS);
m_lvListView.Invoke(SingleUpdatingProc, m_nSiteIndex, "Site did not respond after specified time.", ListViewColums.COMMENTS);
nResult = TIME_ELAPSED;
}
// Check stop event.
else if (m_rsStopIt.WaitOne(0, true))
{
// Stop browser.!
// m_wbMyBrowser.Stop();
m_rSmallIsStoppedNow.Set();
nResult = STOP_PRESSED;
}
else
{
// Handle events.
DoEventsSux();
Thread.Sleep(50);
}
}
return (nResult);
}
My while is checking the state of browser, if time exceeds or stop pressed, it stops it. otherwise, it pumps messages.
my DoEventsSux is a simple peek -> get -> translate -> dispatch that i took from "user32.dll"
thats it, it just hangs everything at some point.
Maybe i did something wrong with the "STA" programming?
i'm at dead end and i'm actually thinking of dropping this project off.. and i've been writing it for a month and a half.
Help!
thanks!!
Ariel.
|
|
|
|
|
Is your main thread the UI thread (the thread on which Application.Run is called)? If so, you're blocking the main thread with the while (m_hThreads.Count > 0) loop. The main thread cannot pump anymore, so any synchronous Invoke would cause the calling thread to hang.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Please help to make a simple chat application using Asp.net C# and XML or SQLserver
|
|
|
|
|
|
Hi,
I have the following code, how can I get the value of the stream into byte array (the response contains binary data and using the readToEnd() fails)
HttpWebResponse response = request.GetResponse()
System.IO.Stream responseStream = response.GetResponseStream()
Thanks in advance,
Hung.
Hung
-- modified at 12:02 Sunday 9th July, 2006
|
|
|
|
|
|
I have the problem with binary data (Ex: image) not the textual data!
Thanks anyway,
Hung.
Hung
|
|
|
|
|
You are right. Sorry.
This is what you need to do:
// Prepare web request...
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("http://www.noviway.com");
// We use POST ( we can also use GET )
myRequest.Method = "GET";
// Assign the response object of 'HttpWebRequest' to a 'HttpWebResponse' variable.
HttpWebResponse myHttpWebResponse= (HttpWebResponse)myRequest.GetResponse();
// Display the contents of the page to the console.
Stream streamResponse = myHttpWebResponse.GetResponseStream();
MemoryStream memStream = new MemoryStream();
byte[] readBuffer = new byte[256];
// Read from buffer
int count = streamResponse.Read( readBuffer, 0, 256 );
while (count > 0)
{
memStream.Write(readBuffer, 0, count);
// Read from buffer
count = streamResponse.Read( readBuffer, 0, 256);
}
byte[] originalBuffer = memStream.ToArray();
// Release the response object resources.
streamResponse.Close();
// Close response
myHttpWebResponse.Close();
Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
|
|
|
|
|
Hello
Try this:
HttpWebResponse response = request.GetResponse()
System.IO.Stream responseStream = response.GetResponseStream()
byte[] input = new byte[responseStream.Length];
responseStream.Read(input, 0, (int)responseStream.Length - 1);
Regards
|
|
|
|
|
Although the stream has data, the length of responseStream is -1. This is the main problem I facing !!
Thanks anyway!
Hung.
Hung
|
|
|
|
|
According to the MSDN[^] documentation, Read returns the number of bytes actually read. So you could always create a buffer of some arbitrary size, say 512 bytes, and then loop till Read returns less than 512 bytes. Something like.
ArrayList finalBuffer = new ArrayList();
byte []buffer = new byte[512];
int bytesRead = 0;
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
{
for (int i = 0; i<bytesRead; ++i)
{
finalBuffer.Add(buffer[i]);
}
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|