|
Thanks
Hi,
Thanks, if u think it's good.
otherwise sorry.
|
|
|
|
|
Managed Debugging Assistant 'ContextSwitchDeadlock' has detected a problem in 'D:\Project1\Project1\bin\Debug\Project1.vshost.exe'.<br />
Additional Information: The CLR has been unable to transition from COM context 0x1b1c30 to COM context 0x1b1da0 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
I got this error...?
Im scared
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
This[^] is how I deal with unusual errors.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am using Visual Studio 2005 Professional Edition.
I have added a CrystalReport(.rpt) file to the project. I want to increase the width of this report at design. How can i do that?
Thanks.
|
|
|
|
|
yalaka pakher...pa designer ke right click ka. ow ogora settings mettings kana yar....da kho ado sa tapos na wo...
ihtesham
|
|
|
|
|
There is nothing about changing the width of report.
But i dont remember. Who are you?
|
|
|
|
|
Hi All,
I want to load a page using WebBrowser Control (see code below). I try to get the page content through DocumentText property in "DocumentCompleted" event handler, but it seems that the event won't be triggered. The "Navigated" event won't be triggered either. However, the "Navigating" event does.
I used to use HttpWebRequest/HttpWebResponse to grab webpage content, however, the drawback is that I can't get the full loaded page through it. What I mean by this is that maybe some javascript will execute to modify elements on the page after it's loaded, I call this page as full loaded page. I think using WebBrowser Control can overcome this drawback. It's just like a browser, and it'll execute those javascript after loading the page. But I can't make this control work correctly. Could anyone help me? I'm very appreciate.
Thanks
Jie
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace ConsoleApplication1
{
class Program
{
static WebBrowser wb;
[STAThread]
static void Main(string[] args)
{
Go();
}
private static void Go()
{
wb = new WebBrowser();
wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted);
wb.Navigating +=new WebBrowserNavigatingEventHandler(wb_Navigating);
wb.Navigated += new WebBrowserNavigatedEventHandler(wb_Navigated);
wb.Navigate("http://www.google.com");
Console.ReadLine();
}
static void wb_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
Console.WriteLine("Navigating");
}
static void wb_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
Console.WriteLine("Navigated");
}
static void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
Console.WriteLine("DocumentCompleted");
Console.WriteLine(wb.DocumentText);
}
}
}
-- modified at 10:06 Thursday 14th September, 2006
|
|
|
|
|
I need to start and stop certain windows services via a form application? How do I do that? I have to code to load all services in a list box but I need to load only certain ones and control them?
|
|
|
|
|
Hi,
To manage windows services you need to add a reference to
System.ServiceProcess in your application.
Then you can use the
ServiceController.GetServices() method to access all the windows services on your system.
To get the driver services that are installed on your system use
ServiceController.GetDevices() method.
Do your best to be the best
|
|
|
|
|
how draw icon on each item in list box ??
Palestine
|
|
|
|
|
Hello
This would take some effort. Better is to make a ListView instead, and associate it with an ImageList.
Regards
|
|
|
|
|
ok do u have example ..
Palestine
|
|
|
|
|
Hello
1- Make an ImageList control from your ToolBox, and fill it with images
2- Make a ListView from your Toolbox and set the view mode to details or whatever suits you
3- Fill it with your items
4- Use the following code sample to associate an item with a certain image:
MyList.Items[X].ImageList = MyImageList;
MyList.Items[X].ImageIndex = Y;
Replace X, and Y with appropriate numbers.
Regards
|
|
|
|
|
i have this error
'System.Windows.Forms.ListViewItem.ImageList' cannot be assigned to -- it is read only
when i make
listView1.Items[0].ImageList = imageList1;
listView1.Items[0].ImageIndex = 0;
Palestine
|
|
|
|
|
|
You don't assign an ImageList to every ListViewItem , but to the ListView itself.
Each ListViewItem only gets the index of the icon from its parent's ImageList .
By the way, since I've seen so many of your questions here dealing with very basic information, may I suggest that you read through the appropriate tutorials in MSDN? There really are a lot of examples out there showing you the concept behind things so that you don't have to ask every detail here...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hello Nader Elshehabi
when i make this i have message that say this proprity is read only ...
why plz replay me ......
Palestine
|
|
|
|
|
Hello
Sorry I didn't go online for sometime!!
About the property I gave you, it was a mistake:->. You should do the following instead:
1- Make a ListView, for example MyListView
2- Make an ImageList, for example MyImageList
3- MyListView.View = View.List;
4- MyListView.SmallImageList = MyImageList;
... and now you can set each item's image by the index
MyListView.Items[1].ImageIndex = 3; //For example
Regards
|
|
|
|
|
The following functions are suppose to print multi page Tiff images but they don't. If I have a 2 page tiff it prints 2 copies of page one. I can't figure out how to get to the next page. The code is adapted from http://en.csharp-online.net/index.php?title=Graphics%2C_Multimedia%2C_and_Printing_Recipes%E2%80%94Recipe_8_15[^]
<br />
public class TiffDocument : PrintDocument<br />
{<br />
private string _Tiff;<br />
private int _PageNumber=0;<br />
private int _NumberOfPages=0;<br />
<br />
public string Tif<br />
{<br />
get { return _Tiff; }<br />
set { _Tiff = value; }<br />
}<br />
<br />
public int PageNumber<br />
{<br />
get { return _PageNumber; }<br />
set {_PageNumber = value;}<br />
}<br />
<br />
public int NumberOfPages<br />
{<br />
get { return _NumberOfPages; }<br />
set { _NumberOfPages = value; }<br />
}<br />
<br />
public TiffDocument(string tif)<br />
{<br />
this._Tiff = tif;<br />
if(File.Exists(tif))<br />
{<br />
Image i = Image.FromFile(tif);<br />
FrameDimension myFrame = new FrameDimension(i.FrameDimensionsList[0]);<br />
_NumberOfPages = i.GetFrameCount(myFrame);<br />
}<br />
}<br />
}<br />
private void doc_PrintTiff(object sender, PrintPageEventArgs e)<br />
{<br />
TiffDocument doc = (TiffDocument)sender;<br />
using(Image i = Image.FromFile(doc.Tif))<br />
{<br />
e.Graphics.DrawImageUnscaled(i,0,0);<br />
doc.PageNumber++;<br />
if (doc.PageNumber < doc.NumberOfPages)<br />
{<br />
e.HasMorePages = true;<br />
}<br />
else<br />
{<br />
e.HasMorePages=false;<br />
}<br />
<br />
}<br />
}<br />
<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
PrintDocument doc = new TiffDocument(@"C:\test.tif");<br />
doc.PrintPage +=new PrintPageEventHandler(doc_PrintTiff);<br />
printDialog1.Document= doc;<br />
doc.Print();<br />
}<br />
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
Hello
Try to debug your code and go through the first and second excutions of the print event. does the doc.PageNumber actually increases the second time?
Regards
|
|
|
|
|
Hello All,
I have a problem where an application I use prints a receipt to a thermal printer with a cutter mechanism to cut the paper after it's done printing. Unfortunately, the application sends RAW output directly to the printer and doens't end the page with a cut command so the cutter doesn't fire but I obviously want it to cut.
What I was thinking I would do is install a Generic Text oNly printer that listens on a certain port, then create a .NET app (C#) that listens on that port. Then, it could accept the input, append a cut command to the input and send it out to the receipt printer as a normal job.
Does that sound feasible or is there a better way to accomplish this? And yes, I have worked with the manufacture of the printer (Star) to find out if there are any other ways to make this happen and they have been unable to help me. Also, I have explored other programs (it's a Telnet program talking to a UNIX business server) that would do this and I haven't found any either.
As always, I really appreciate any help.
Eric
|
|
|
|
|
i finsh makeing my project now i want to make setup file
how add .Net framwork 2.0 to my application
how can install .Net framework 2.0 if not instaled in the machine
Palestine
|
|
|
|
|
There isn't a merge module, but some installer programs let you mark the requirement, and they will download it.
I wrote a C++ program that installs the framework from CD then runs the MSI ( and does some other stuff, but that's irrelevant )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello
1- Open your project.
2- File => New => Project
3- Other Projects types => Setup and deployment => Setup project
4- Include the primary output of your project
5- Setup Project's properties => Prerequisites => Check on the folowwing
a- .Net framework
b- Windows Installer
c- Below that list check "Download prerequisites from the same location as my application"
NB.
Check other prerequisites as you may need more than just .Net framework depending on your project. eg. SQL Express or MSDE
Regards
|
|
|
|
|
I am coming from VB6. I looked up NET database examples for MS Access and find there are several ways to do the same thing. I saw one example use a OleDb provider, one used a ADO provider, and one used a SqlClient. My quesiton is- what should i be learning? Which should i use? What do most programmers use? My program philosophy is KISS. I think OleDb provides generic access? But i am not sure. Some advice from experienced programmers would be helpful.
|
|
|
|