there are couple of things that you may do
2. You need to set socketForServer to null in case an error occurs, it will be creating a new object every time and will become a source of memory leak.
Yes, very. It says so in the documentation[^], 'The WebBrowser control is resource-intensive. Be sure to call the Dispose() method when you are finished using the control to ensure that all resources are released in a timely fashion. You must call the Dispose() method on the same thread that attached the events, which should always be the message or user-interface (UI) thread.'
if i dont have internet explorer as a default browser will it work?
My failometer is detecting vast quantities of FAIL!
though it is memory consuming but you can use it normal circumstances easily. If you have a very resource hungry application then you should avoid using it. You can use it irrelevant of what your default browser is.
I'm writing a db app with the following features :
1. have a list of items (FormReportItems)
2. for new Item and edit Item, the new form open (FormItem)
3. the new item or current item pass to FormItem constructor and return that specific item to update data in form list (FormReportItems), some thing like this :
AppDataSet.SampleTableRow itemNewRow = this.appDataSet.SampleTable.SampleTableRow();
FrmSampleTable frm = new FrmSampleTable(itemNewRow, this.appDataSet);
if (frm.ShowDialog() == DialogResult.OK)
DataManager dm = new DataManager();
it work correctly while working in relational data.
each item can some images in Images table, hence i must update data with images. my problem is to pass images table to FormItem and get result back to current form (FormReportItems) then update data. for this i've passed current dataSet to FrmSampleTable constructor as second parameter to hold inserted or edited images in FormSampleTable (FormItem), when FormSampleTable returns DialogResult.OK the dataBase must be update to commit changes.
my problem is when i want to pass images dataTable to current dataSet, it does not have any records, wheras in FormSampleTable it have some records.
can anybody help me about this issue ?
what's your idea in Insert & Edit relational data Form ?
If I understand your question correctly, I believe what you are trying to accomplish is something like:
-Pull data down from the database
-Make local changes to the data
-Update again from the database***
-Push your changes up to the server
And the problem you are having is merging the datasets together.
If this is what you are trying to do there are two routes of action I would consider:
1- is there any way around this, so you could avoid the problem completely? I suggest you take a step back, look through your code, and see if there is a different design strategy you could follow. If you could somehow remove the step where you update from that database again, the problem would probably be straight forward.
2- if you really do need to do something like this, I suggest checking out the Microsoft Sync Framework. It is designed to sync between multiple data connections, and in addition to making the updating easy, if conflicts happen it will detect those too. Take Data Offline Using Microsoft Synchronization Services for ADO.NET[^] that is a link that looks like a pretty good introduction to Harmonica. I honestly haven't read the entire article, but it looks like a good starting ground.
Iam implementing a project through which i want to convert the entered text through UI into desired Handwriting Pattern
iam using Tablet Pc Pen As an input device to capture my handwriting (iam using Microsoft.ink as namspace )what i have done till now is that , after using ink pen of tablet pc , i have written something on the Ink control of .net and store the image as GIF format
now i want my PC to learn my handwriting pattern , tell me how i can acieve using .net(csharp/vb.net) ,so that when i enter any text through UI it can convert it into my handwiriting sample
please also tell me how i will capture the Information , about the Pressure, strokes, trasparency etc of the pen tip
I need your help
please suggest some sample code for me
The idea you have is pretty cool, however it would be a lot of work if you want to do it correctly. The problem with handwriting is that no 2 characters are usually the same, it usually depends on the letter before, the position in the line you are trying to write the length of the word you write (long words require you to move your hand while writing causing the letters to be written differently), the speed at which you are writing (scratching something down or writing a proper letter), the texture of the paper and finally the type of pen used. Although the ligature functions on the opentype font specification would allow you to do some of these things, it would be a heck of a lot of work.
The easy way out is to just create a Bitmap font[^] of your handwriting, the result would not be stunning but its the easiest way to go if you don't want to spend a lot of time on it
Ok, well first off, I just wanna let everyone know I have very little experience in C# so please be patient with me. (I'm working in Microsoft Visual C# 2008 btw) I have a fairly simple project I'm working on and I need a lot of help. I really hate asking people for help, but this is driving me crazy. Now to the project. Let's say I have a directory "C:/textures/" and inside are lots of pairs of files, a texture file, and a jpg of the texture. I'm trying to make a program that has a picture box with up and down arrow buttons that will cycle through all the pictures in that directory, and when a third button is pressed, it will copy the current picture's corresponding texture file to a very specific directory on an SD card and rename it based on the name (and overwrite any files of the same new name there). Here's an example of the files:
copy dogtexture.tex to SD/textures/dog/dog01.tex
copy cattexture.tex to SD/textures/cat/cat01.tex
Thanks for the quick reply, but like I said, I know next to nothing about programming in C#. I noticed that second function can't overwrite files, so I suppose I'd have to call another to delete any first... But a basic source would be extremely helpful for anyone who has the time
I understand completely how to add buttons and generally how to use the picturebox, but I'm not at all familiar with calling functions and the basic structure of C#. I guess my main problem right now is figuring out how to make the picturebox cycle through all the pictures in a folder when a button is pressed...
Ok, I came up with the exact steps. It really shouldn't be that hard. It would be extremely helpful if someone would convert this to a source, but any help with specific parts would be helpful too.
Picture folder is working directory + /Textures/
PictureBox displays a picture from the Picture folder
The Down and Up buttons make the picturebox cycle forwards and backwards through the pictures
The export button returns the current picturebox picture, finds the .tex file with the same name, exports it to a specific directory on the SD card in a folder based on the first 2 digits in the name and renames the file to *00.tex
For an example, in the working directory there is a folder called Textures. The program looks in Textures for any .jpg file and opens it, we'll say it's 02cattexture.jpg. The user doesn't like it so he presses the down button and the program finds the next picture in the folder; it happens to be 01dogtexture.jpg. The user likes the texture and clicks export. The program then looks at the picture and finds the .tex extension equivalent in the same folder. Because the filename has 01 on the front, the program will copy (not move!) it to SD:/textures/dogtex/ and will rename it to dog00.tex. if the filename started with 02, it would copy it to SD:/textures/cattex/ and rename it cat00.tex. Oh, and if there's already a file with that name on the SD card, it overwrite it.