|
Convert it to an RTF first.
Seriously, if you could do that, why would there be all these people selling PDF libraries on the web ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
You cannot open a PDF in RichTextBox control. RichTextBox is not a PDF viewer control.
Calin
|
|
|
|
|
i want to change this xXrFnUlCk to oriya in c#.net windows application is it possible .if it's possible wat's the steps n code .
|
|
|
|
|
What the hell do you mean ? You're syaing this string is encrypted ? You need to know how, in order to decrypt it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i think you have to take some basic lessons on globalisation. Please do some homework yourself or atleast google and get some basic idea about what it is... before posting it here.. or if you are stuck with a real problem the state it clearly
|
|
|
|
|
hello,
i am using WMI to trap PrintJobs.
when a PrintJob arrives - the event HandleEvent is triggered nicely.
in the Event i wish to open a Form with the form.show()
the Form is opened but remains frozen with the Not Responding message.
if i use the form.showdialog() it looks ok but not sure what dimends hides behind...
i tested the trigger mechanism by using a timer which fires the same event.
in this case there is no problem with the form.show()
at first i thought it was a problem with my form itself but it was not so
because i changed the form to a simple form with nothing inside and it responded the same way.
i also tried hiding the form and showing it but the same problem accured.
then i went and created a different WMI , with timer. same problem.
when i look at the processes in the window task manager i see
both my form and another application with the same name.
maybe this can give a hint?
can anyone tell me what am i doing wrong ?
my fingers are acing for a solution...
here's a piece of my code :
this is what i use to trap the event :
--------------------------------------
WqlEventQuery query = new WqlEventQuery(@"Select * From __InstanceCreationEvent Within 3 Where TargetInstance ISA 'Win32_PrintJob'");
ManagementEventWatcher watcher = new ManagementEventWatcher(query);
watcher.EventArrived += new EventArrivedEventHandler(this.HandleEvent);
PrintJobCollection.ResetMyPrintJobCollection();
watcher.Start();
this is what needs to be done when the event arrives:
-----------------------------------------------------
public void HandleEvent(object sender, EventArrivedEventArgs e)
{
Form OpenCountMaxForm = new PaperCountMaxForm();
OpenCountMaxForm.Show();
}
thanks in advance,
avi
|
|
|
|
|
Have you tried to create PaperCountMaxForm into a new Thread ?
Calin
|
|
|
|
|
no, haven't yet.
But can you please explain what is the nature of this behaviour ?
i mean if a new thread will solve the problem what will happen
with the memory management ?
i am afraid there is something hidden here that might cause memory leak
i read somewhere that using WMI too much will cause the OS to hang...
thanks,
Avi
|
|
|
|
|
hi i need help
im doing drag drop to listview imagelist images....selected images.my drag drop part cannot work...i tried so many type of coding but could't now im tring....creat another image list in listview 2 and add those selected items images in to that list view...i can add item text but cannot add image....anyone if can pl help me.....
thanks a lot here is my code...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace Project_import_1
{
public partial class ImportForm : Form
{
public ImportForm()
{
InitializeComponent();
}
OpenFileDialog dlg = new OpenFileDialog();
private void import(object sender, EventArgs e)
{
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(100, 80);
imageList.ColorDepth = ColorDepth.Depth32Bit;
int i = 0;
string[] files = dlg.FileNames;
string[] pathes = new string[files.Length];
foreach (string file in files)
{
pathes[i] = file;
i++;
}
foreach (string path in pathes)
{
imageList.Images.Add(Bitmap.FromFile(path));
FileInfo fileInfo = new FileInfo(path);
String strDir = fileInfo.Name;
listView1.Items.Add(strDir);
listView1.TileSize = new System.Drawing.Size(100, 80);
}
for (int j = 0; j < pathes.Length; j++)
{
this.listView1.Items[j].ImageIndex = j;
}
this.listView1.View = View.LargeIcon;
this.listView1.LargeImageList = imageList;
}
private void btnImport_Click(object sender, EventArgs e)
{
dlg.Filter = "All Image Files|*.bmp;*.ico;*.gif;*.jpeg;*.jpg;" +
"*.jfif;*.png;*.tif;*.tiff;*.wmf;*.emf|" +
"Windows Bitmap (*.bmp)|*.bmp|" +
"Windows Icon (*.ico)|*.ico|" +
"Graphics Interchange Format (*.gif)|*.gif|" +
"JPEG File Interchange Format (*.jpg)|" +
"*.jpg;*.jpeg;*.jfif|" +
"Portable Network Graphics (*.png)|*.png|" +
"Tag Image File Format (*.tif)|*.tif;*.tiff|" +
"Windows Metafile (*.wmf)|*.wmf|" +
"Enhanced Metafile (*.emf)|*.emf|" +
"All Files (*.*)|*.*";
dlg.InitialDirectory = @"C:\Documents and Settings\All Users\Desktop\";
dlg.Multiselect = true;
try
{
if (dlg.ShowDialog() == DialogResult.OK)
{
import(sender, e);
}
dlg.Reset();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void listView1_ItemDrag(object sender, ItemDragEventArgs e)
{
this.listView1.DoDragDrop(this.listView1.SelectedItems[0], DragDropEffects.Copy);
}
private void listView1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(ListViewItem)))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void listView2_DragDrop(object sender, DragEventArgs e)
{
ListViewItem item = e.Data.GetData(typeof(ListViewItem)) as ListViewItem;
this.listView2.View = View.LargeIcon;
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(100, 100);
imageList.ColorDepth = ColorDepth.Depth32Bit;
int i = 0;
foreach (ListViewItem each in listView1.SelectedItems)
{
listView2.Items.Add(item.Text, item.ImageIndex);
listView2.TileSize = new System.Drawing.Size(100, 80);
}
for (int j = 0; j < listView1.SelectedItems.Count; j++)
{
this.listView1.Items[j].ImageIndex = j;
}
this.listView2.View = View.LargeIcon;
this.listView2.LargeImageList = imageList;
}
modified on Friday, February 27, 2009 2:01 AM
|
|
|
|
|
Have you set AllowDrop = true ?
Calin
|
|
|
|
|
|
You try to assign empty image list in your code. That's why items in the second list view have no images.
I think the simplest way to solve it is to assign the same image list for the second ListView in the "import".
private void import(object sender, EventArgs e)
{
...
this.listView2.LargeImageList=this.listView1.LargeImageList = imageList;
}
...And remove strings where you assign empty image list
private void listView2_DragDrop(object sender, DragEventArgs e)
{
...
this.listView2.LargeImageList = imageList;
}
...And in conclusion the folowing loop is meaningless
foreach (ListViewItem each in listView1.SelectedItems)
{
listView2.Items.Add(item.Text, item.ImageIndex);
listView2.TileSize = new System.Drawing.Size(100, 80);
}
|
|
|
|
|
thanks 4 ur reply but it didn't work......
|
|
|
|
|
any idea.....actually is there any way to add image to image list ....by using item....bcz item contain image....when i debug i can c...image image index and sub item....
|
|
|
|
|
hi am doing my mca final year,now am doing my project on .net my project name is two way sms thru modem .please tell me is it suitable project or not to my course?
|
|
|
|
|
No - because the only way to do SMS is to use an external library, which means you won't really write much code.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Nope: 'two way sms thru modem ' doesn't look as an acceptable project name.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
if you want to make SMS gate way then its good. other wise there are many gateways that expose api to send message by using there api you can easily make. but its not for Mca Project
|
|
|
|
|
hi all,
i have a string
string date= "09/02/27, 12:23:04"
the above string is in yy/mm/dd format, i want to convert it into a DateTime variable. When i convert i am getting the output as 9/2/2027, 12:23:04 PM which is wrong. I have tried the below code:
DateTime dt = Convert.ToDateTime(date);
so i suspect its not the way, i think there are something to do with the Globalization namespace? any help will be much apreciated.....thanks..........
|
|
|
|
|
Yes.. Datetime objects acts according to your globalisation settings in yout machine/Application. The easiest way is to use Datetime.Tostring(yy/mm/dd) whenever you want ot display it
|
|
|
|
|
DateTime.ParseExact() is what you need.
Cheers,
Vıkram.
I've never ever worked anywhere where there has not been someone who given the choice I would not work with again. It's a job, you do your work, put up with the people you don't like, accept there are probably people there that don't like you a lot, and look forward to the weekends.
- Josh Gray.
|
|
|
|
|
i will be gratefull if u can provide me a sample code, what are the values inside parseExact()??
|
|
|
|
|
Gosh, those buggers at Microsoft have been hiding that in the documentation[^] again havent they.
|
|
|
|
|
for cross thread communication i use a delegate and the method registered with the delegate takes a parameter.how can i pass this parameter to the method through the delegate?
|
|
|
|