|
Well, I would start by getting a good book on the programming language you are trying to learn. Importing and using DLLs is not exactly a step after Hello World.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I suppose by "importing a dll file" you mean that you want to use that Dll in your application. In order to do that you need to reference the Dll in your build (if the Dll is a .NET Dll) or you need to load specific functions from the Dll via P/Invoke (if it is a native - that is non .NET Dll).
Either way I suggest you look for a Dll tutorial if you are new to this.
You should be able to find information on Codeproject searching for P/Invoke (short for Platform Invoke) or looking for some basic C# tutorials which probably also explain usage of Dlls.
|
|
|
|
|
Hi All,
I have .Prn file which was generated out of PCL printer.I need to find a string in that file and then I have to replace it with another string.
Iam able to do it by using stream writer,streamreader,Binary reader,binary writer and file streams.
But if gave a print(LPR)for it, it get failed and giving me syntax error as Illegal tag.
If I print original file it is printing very well.
I came to know that while writing it has lost some of its originality ,so it was failed
Please help me
Thanks in advance
|
|
|
|
|
balu12345 wrote: I have to replace it with another string.
Thats probably whats wrong then. Either the value you are replacing with is illegal OR you are replacing something you didn't mean to. Why not save both the original and your new version to disk and compare them - there are loads of free utilities to compare files.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi,
Thanks for the reply,
The original file size is like 16k, after the editing it becoming as 22k..
more over it is not normal file,It is a file generated by PCL printer.
So may be during the conversion it is losing printer supported font.
so that's the reason printer cannot understand the file(after editing)to print.so it gives syntax error as Kernel and Illegal tag error.
I even cannot compare both file because the file is generated by PCL printer which has some non-readable data
I have no clues to overcome this problem
kindly help me
|
|
|
|
|
balu12345 wrote:
The original file size is like 16k, after the editing it becoming as 22k..
So basically what you are doing has corrupted it.
balu12345 wrote: it is not normal file,It is a file generated by PCL printer.
Yes, so unless you know the format of the file you will mess it up.
balu12345 wrote: I even cannot compare both file because the file is generated by PCL printer which has some non-readable data
Ther eis no such thing as unreadable data. Use a hex editor to compare, there are plenty freely avalable.
It does beg the question though, why do you have to change the PCL file rather than the original data.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
HI,
i have a strange problem:
i have a datagrid view bound to a table.
when i edit a cell content i press a button to save this changes like this :
TA_Users.Update(dS_StationManager.T_Users);
dS_StationManager.T_Users.AcceptChanges();
THIS WORKS FINE.
now i've decieded to removw the button so that the changes will be saved without the user pressing the button.
i've tryied copying this two code lines
TA_Users.Update(dS_StationManager.T_Users);
dS_StationManager.T_Users.AcceptChanges();
to diff datagridview events like :
1. dgvUsers_Edit_CellValueChanged
2. dgvUsers_Edit_CellEndEdit
but nothing happens, the database does'nt change
Help Req
THANKS
Have Fun
Never forget it
|
|
|
|
|
Are those events actually tied to the delegate?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
they occuer ( i debuged this )
if that waht u mean
Have Fun
Never forget it
|
|
|
|
|
copy back to button and check if its still working
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: copy back to button and check if its still working
what do u mean??
call the button callback form the event??
Have Fun
Never forget it
|
|
|
|
|
I mean copy paste that code in a button and test that is it still working. It may possible that you change something and forgot...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
yep stiil works
i copied it to the tabpage selectedindex changed event
and it works
Have Fun
Never forget it
|
|
|
|
|
half-life wrote: i copied it to the tabpage selectedindex changed eventand it works
hehe nice place xD
well try this one
void UpdateDataBase(object sender, EventArgs e)
{
}
and in CellValueChanged
this.Invoke(new EventHandler(UpdateDataBase));
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Dont you think you need to try the event dgvUsers_SelectedIndexChanged.
I have tried that in my code. It was working.
Try to update the database after you leave that row . .
|
|
|
|
|
thanks
this was the first thing i thought about doing
but decided not to update each time i leave a row
but thanks anyway
Have Fun
Never forget it
|
|
|
|
|
Hi,
I've some problems with my Webcam_Capture-Class. My webcam can capture up to 90 frames per second, but in my program i've just 9-11 fps. The Class' name is Webcam_Capture and i've downloaded it from codeproject.
In the class there's a timer so I can set the "TimeToCapture_milliseconds". I can also set the Frames. I want about 20 fps, but that's impossible. The processor time is about 40%, so that can't be the problem.
Do you have any idea to solve this problem?
Thanks and greetings
shainsen
|
|
|
|
|
What do you mean impossible? The library won't accept such a value or is that too strenuous for your system?
Can you reference the article from which you got the class?
|
|
|
|
|
|
Hi all,
I'm using (trying to use) webBrowser control in windows application.
when a user comes default web site is www.abc.com. User can select some transaction and they will be able to what they want.
What I want to do is, when user click ads which are on the website I should not navigate webBrowser, I should not allow to do that.
So I have done something like;
private void webBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
Uri u = webBrowser.Url;
string ap = u.AbsoluteUri;
for (int i = 0; i < App.IzinliURL.Length; i++)
{
if (ap.IndexOf(App.IzinliURL[i]) == -1)
{
webBrowser.Stop();
break;
}
}
Uri newUri = new Uri("http://www.google.com.tr");
webBrowser.Url = newUri;
webBrowser.Navigate(newUri);
}
What I have to do.
Many thanks.
|
|
|
|
|
You need to say e.Cancel = true somewhere.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi.
I'm looking on how to get the information from an image.
The information i need is its codec or compression.
The reason why i need this is because, i have a large quantity of .TIF files. But some were not converted right and are color TIFs (IrFan View says : "Old JPEG (in TIFF)"). I need to get these files and convert them to the real .JPG.
So, i want to get the codec information from a file and compare it to a string. I'd use the "for" sentence to go through the whole list of files.
Summary (a scratch code):
for(int i = 0; i<files.count;i++)>
get codec from files[i]
if codec == old jpeg
then move the file to a folder
Any idea on how to get this information?
Thanks in advance!
Regards,
Matjaž
|
|
|
|
|
Hello!
In an attempt to streamline downloading from a FTP share I'm making a small front end that retrieves files based off of names. The problem I'm experiencing stems from the method I'm using to download the files. Without going into extraordinary detail, the front end is experimenting with querying the FTP to retrieve the file rather than directly downloading it. As a basic example, directing the webBrowser to a URL generated by the FTP that allows the user to download the file. However the problem I'm running into is in the simple call;
webBrowswer1.Navigate(ftpDownloadUrl);
As this is called it opens up the Open / Save dialogue box prompting the user for where they would like to store the file. I'm trying to streamline the process and have the program save it to a predefined location (even start up path). So finally to my question!
Is it possible to have it automatically accept the save location or if not have the program record where the file was stored to move it to a specified directory (assuming permissions)? Thanks in advance!
Colin
|
|
|
|
|
Take a look at the FtpWebRequest[^] class. You should be able to download a file from the ftp server, and then write the data stream out to where ever you want.
Simon
|
|
|
|
|
Thank you for the reply but I'm trying to get this to work explicitly using the webBrowser technique. Any other suggestions?
|
|
|
|