|
ItexrSharp and SharpPDf are all external references only. As for us there is not inbuilt references for PDF in .Net
Regards,
Satips.
|
|
|
|
|
Thank you so much Mr. Satips.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi All,
I am been stuck with Drag-Drop operation in C#.I wanna to click on picture1,move it with cursor and dropped on picture2 when user make mouse_up event.
But Drag_Enter event for picture2 does not fired at all.As i wanna to know in picture2_DragEnter that wich is the picture box wich entered my area.
I am using DoDragDrop() in picture1_Mousemove with DragEffect.Move. I have seek many topics but not got any any idea!!. I m bit confus with DoDragDrop().Pls tell something about DragEffect Enum. Picture ctrl does not have AlloDrop prty. I am been stuck with my project. from last 3 days. pls pls help me!!!
Below is my code snippet.it will give u some info.
private void picturebox1_MouseMove(object sender, MouseEventArgs e)
{
DagDropEffects ddEffect = picturebox1.DoDragDrop(picturebox1, DragDropEffects.Move);
if (ddEffect == DragDropEffects.Move)
//then move the mouse else dont move it
}
//Code in target picture box Drag_Enter event
private void picturebox2_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Bitmap))
//then it is valid control, so take its name
else
//not valid so dont allow to drop on target picture box
}
Help wud be appreciated !!!
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
hi chintan
this is a good example for you
http://www.codeproject.com/cs/combobox/LarryDragAndDrop.asp
regards
|
|
|
|
|
thanx it will help me a lot.this for u
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
Hi, I am using Interop to gain access and make editions to an excel file and I am able to make it to individual cells. However I cannot seem to figure out how to make changes to an object like a textbox and checkbox programmatically using C# in the Excel file.
|
|
|
|
|
I assume here that you can get the Excel, Workbook and Worksheet objects...
String sFileName = <full path to file>;
Microsoft.Office.Interop.Excel.Application oApp =
new Microsoft.Office.Interop.Excel.Application();
Workbook wkb = oApp.Workbooks.Open(sFileName, .....);
Worksheet sheet1 = wkb.Worksheets["Sheet 1"] as Worksheet;
Microsoft.Office.Interop.Excel.CheckBox cb = sheet1.CheckBoxes("Check Box 101");
...the rest should be obvious. For example, cb.Value = true;
That's the code. The non-obvious part to me was the name - in this case "Check Box 101". In the upper left corner of Excel, as you click from cell to cell, it shows the name of the cell. For example, A1, A2, etc... If you RMB on the CheckBox it will show the name of the CheckBox in this very same location. You can change the name to whatever you want. That's the name you use in code to access the CheckBox from the list. Excel will auto-name them so there is some predictability. But I've received spreadsheets where the names are all over the map.
Good luck!
|
|
|
|
|
c#:
THE dataset or (datatable) have much items.
when I click the button(button.text=next) ,how can I get the next item from the dataset or(datatalbe)?
please help me!
By the way :follow method could not get the right answer,allways get the inital value:
private void method1(object sender, EventArgs e)
{
i=(i+1);
}
|
|
|
|
|
lockepeak wrote: i=(i+1);
Wow.
You named a member variable 'i', and you incremented it. How would this get any item ?
Where is the data set ? Are you showing it's contents on screen ? where do you hope to get this data from, and to ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I wrote a Windows Winform App in C# and laid out the standard widgets on the form namely the menustrip, statusstrip and a tablelayoutpanel docked filled in the center of the form, and set the AutoScroll property true as I have controls that will fill up the table downwards (row direction).
While it looks decent when I dropped a number of controls programmatically into the tablelayoutpanel at runtime, however, I created a toolstripstatuslabel (at design time) on the statusstrip and attempt to update the text periodically through a timer event handler (run time), the tablelayoutpanel will repaint itself on every update. This has caused a lot of flickering.
My question is, is there anyway I can periodically update the statusstrip label text as well as prevent the tablelayoutpanel from repainting unless I scroll it.
Thanks.
|
|
|
|
|
|
Here it is...
<code>
using ...;
namespace BigOExt
{
public partial class MainForm : Form
{
private System.Threading.Timer timer;
private TableLayoutPanel tlp;
private List<WorkstationTrackerControl> workstationTrackers;
private Point lastPos;
public MainForm()
{
InitializeComponent();
timer = new System.Threading.Timer(new TimerCallback(TimerHandler));
tlp = new TableLayoutPanel();
tlp.ColumnCount = 1;
tlp.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
tableLayoutPanel1.Controls.Add(tlp, 0, 1);
tlp.Dock = DockStyle.Fill;
tlp.AutoScroll = true;
tlp.Scroll += new ScrollEventHandler(tlp_Scroll);
tlp.Paint += new PaintEventHandler(tlp_Paint);
workstationTrackers = new List<WorkstationTrackerControl>();
for (int i = 0; i < 50; i++)
{
WorkstationTrackerControl ctl = new WorkstationTrackerControl();
tlp.RowCount++;
tlp.RowStyles.Add(new RowStyle(SizeType.AutoSize));
tlp.Controls.Add(ctl, 0, tlp.RowCount - 1);
workstationTrackers.Add(ctl);
}
}
void tlp_Paint(object sender, PaintEventArgs e)
{
if (tlp.AutoScrollPosition != lastPos)
{
Debug.WriteLine("");
tlp.AutoScrollPosition = new Point(Math.Abs(lastPos.X), Math.Abs(lastPos.Y));
}
}
void tlp_Scroll(object sender, ScrollEventArgs e)
{
lastPos = tlp.AutoScrollPosition;
}
private void MainForm_Load(object sender, EventArgs e)
{
timer.Change(TimeSpan.Zero, TimeSpan.FromSeconds(1.0));
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
foreach (WorkstationTrackerControl ctl in workstationTrackers)
{
ctl.Stop();
}
timer.Change(Timeout.Infinite, Timeout.Infinite);
}
private void TimerHandler(object o)
{
BeginInvoke(new ThreadStart(UpdateAppTime));
}
private void UpdateAppTime()
{
toolStripStatusLabel1.Text = DateTime.Now.ToString();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
}
}
</code>
|
|
|
|
|
Hello!
Can anyone provide us some guidance, of how to check if the following software applications are installed on a system:
1. The operating system is Windows Server 2003
2. MS SQL Server 2005
3. Internet Information Services - IIS
There are few others, but need to know the way to find out if the software application is installed or not.
Thanks in advance!
Adeel
--
|
|
|
|
|
Windows 2003 server is a little trickey since there are multiple types (Gold, Small Business Server etc) and multiple languages...
However 2003 Gold - English can be determined by detecting
Windows Language is '9'
Windows Version is Major Version '5', Minor Version '2', Service Pack Major '1' and Service Pack Minor '0'
Internet Information Services 5.0 - English
Windows Language = '9'
system32\inetsrv\iisui.dll version >= '5'
system32\inetsrv\iisui.dll < '5.1'
system32\inetsrv\coadmin.dll >= '5'
system32\inetsrv\coadmin.dll < '5.1'
Internet Information Services 5.1 - English
Windows Language = '9'
Reg key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISAdmin' Version < 5.2
Reg Key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISAdmin' Version >= 5.1
Internet Information Services 6.0 - English
Windows Language = '9'
Reg key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISAdmin' Version < 6.1
Reg Key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISAdmin' Version >= 6.0
I'll have to check SQL Server 2005.....
|
|
|
|
|
Hello,
The only way is registry key , actually you could search the registry for all the install softwares in the system , there is a key which will give u information same as control panel(add/remove programes) check for that key....sorry I could not remeber the key path but you can serch that one.
Regards ,
Nishu
|
|
|
|
|
Hi,
I have the following problem to solve and need some help from more experienced programmers/app designers then myself.
I have to create an application (C# + .NET 2.0) that collects some data and stores it in local database (Oracle 10g XE). App's user can synchronize local data with global data stored on remote database (Oracle 9i). There are two additional requirements.
The first one says that users can access the data (local and global) only by using the application, they shouldn't be able to connect to neither local nor remote db using other tools (which leads to conclusion that users couldn't know their passwords). I thought about connecting to DBs using the same login and pass (encrypted and hardcoded) for all users but in that scenario my app won't meet the second requirement. It says that remote DB admin should be able to log user's activity (I mean ACTUAL user).
I know that with Oracle Data Provider for .NET I can connect from many instances of my application as the same DB user and send ClientId (which can for instance be user's identity) as additional connection's parameter and what's really important ClientId does not have to correspond to any database user name. And this ClientId can be used to distingiush ACTUAL users performing operations on the data. Unfortunately the ClientId is new to Oracle Database 10g Release 2 while my client's remote DB is version 9.
I don't have a clue on how to meet these two requirements.
I would appreciate your help.
Best regards
Mans
|
|
|
|
|
I'd imagine you'd create logins for all users, if the list is finite, or a system that passes the Ids of users from a user table and logs actions within the DB itself, and has just a couple of different accounts.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'd be tempted to use enterprise services so that you don't end up leaving the db passwords on the client machine. Have a table in a DB somewhere with username and password derivative so that users can log in and you can log who does what. Enterprise services can then use the same db username and pwd for all connections.
HTH
Russ
|
|
|
|
|
hi all
im working on a project(Hierarchical Distributed Genetic Algorithm for Image Segmentation).
can any one help me please?
thank you.
hana
|
|
|
|
|
Only if you specify the problem you're having.
|
|
|
|
|
Sure - you need to distribute a genetic algorithm that is heirarchical, and it should segment your image.
If you want more specific help, you'll need to ask more specific questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I use the FileSystemWatcher class to monitor a directory for new files.
The directory is usually empty, then i would paste some files in the directory. The files can range anywhere from 1 file to hundreds.
I have a process delay between each event call so as to avoid a sharing violation cause sometimes the event gets triggered but the file is not totally finished saving. For this delay i do:
int x = 0;
while (x<=60000000)
{
int delay = COnvert.ToInt32(x);
x++;
}
What tends to happen for a reason that i am attempting to figure out is say i paste 100 files in there. It may get stuck on the 30th file. I delete the files after i am done with them, so there would be say 70 files from the 100 that i dumped in there left in the folder. So it processed 30 but is stuck somewhere.
Is there something else that i should be aware of when using FIleSytemWatcher?
|
|
|
|
|
Hi,
I don't know why you're having this problem but i know when i tried using the FileSystemWatcher for a similar project(i was downloading in to the folder) i had problems in determining when the file would be completly downloaded.
I solved it in the end but i think it might have been the long-way around.
is it possible for me to send you the source ? That way it might give you an idea for a workaround. (I've just tried describing what i did and i can't really explain it. I'm pretty new to all of this.)
|
|
|
|
|
Sure... Send when you can...
|
|
|
|
|
Why are you performing such a strange busy wait? That's completely useless IMO.
If you really have to wait you should at least use Thread.Sleep so that your application doesn't burn CPU cycles needlessly.
In order to find out if a file has been written completely, I'm using a mechanism that's working reliably so far (written from memory, so no guarantees):
public void WaitForFileCompletion(string path, int maxwait)
{
int wait = 0;
while (true)
{
try
{
FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.None);
fs.Close();
fs.Dispose();
return;
}
catch (IOException)
{
wait += 100;
Thread.Sleep(100);
if (wait > maxwait)
throw new ApplicationException("Timeout reached waiting for completion of file.");
}
}
}
The idea is to open the file exclusively. If another application is still busy writing to the file, this will fail. As soon as opening the file succeeds you can be sure it's been written completely.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|