|
Firstly, have you not noticed that there is an asp.net forum?
Secondly, TOO MUCH CODE
Thirdly, which line is causing the error? Failing that, give us a clue. Which method contains the line?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You may need to specify/change the padding mode[^]
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I'm making a small backup application. And I want the user to be able to drag files and folders from the - file explorer style - TreeView(treeOne) to the second TreeView(treeTwo)
Drag and Drop works fine, exept when I'm dropping a file/folder into treeTwo.
In the Treeview treeTwo node, i can't get access to the full path of the original file/folder, or the parent nodes. And I need this to process the files
example;
I drag temp\blah\ folder from treeOne to treeTwo ... now in treeTwo i only have temp\blah (the root information (my computer\c:\ isn't included)
so no access to the parent nodes (c;\) or fullpath.
I tried everythin to bring them over, stick the fullpath in the tag property.
Tryed to make a new 'supernode' , inheriting treeNode and add some properties. butthat didn't work.
without that fullPath i can't process the files or folders.
Im so close to a sollution if I could just drag/drop the whole node tree over, with all the parent and sub nodes.
anyone can help me out a bit, know a sollution, an idea , some resources of how other ppl done it ... verry much appreciated
regards
|
|
|
|
|
TreeNode has a FullPath property. Have you tried using that?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
yes, but when you drag/drop, you visualy select a node in treeView1 and drag it to treeView2. But what happens in code is you create a new node in treeview2, that takes the name of the selected node in treeView1.
And the new node.FullPath is automatically set in relation to the Treeview2.
I have to find a way to take the FullPath of node1 and copy it to node2 FullPath property. problem is, FullPath is readonly so I can't set it.
I tried creating a class that inherits TreeNode, and add an extra property 'originalPath' but it doesn't work... I'm getting a lot of errors in other functions regarding the TreeView, have to look into that later...
|
|
|
|
|
Hows about, in the OnDrop code, taking the fullpath , splitting it and then check if each part exists in TreeView2 and if not, adding it. If you don't have access to the fullpath at that point you might have to create a DragItem class with fields for the node itself and a string for the fullpath . Use this when starting the drag.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
yeah, I think I'm going to try the DragItem class sollution, seems the most reliable
and I can add some other properties like include subfolders, etc ... (it's for a backup project)
thanx
|
|
|
|
|
Ok.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Greeting,
I want to monitor the data that I received continuously.I use Datagridview control to monitor data(a data received as a structure of some fields and i show them as some columns )
It seems the Datagridview is slow and when number of records is growing this control will be very slow.
Which control is better?
I should monitor data in some columns , and every columns should has title.
Thanks
|
|
|
|
|
A datagridview has a lot of intelligence for sorting and the likes. Lots of data makes every control slow. Fill a textbox with 10Mb and you'll see what I mean
If it's for personal viewing then you might consider using a TextBox with a fixedsize-font.
I are troll
|
|
|
|
|
In my current c# application I need a combobox that can have in it atleast 500 entries. But when I tried to do I, it says it can store at the max! only 100 entries in it.
Is there any way I can set the combo's max drop down items?!
Regards,
na_ab
|
|
|
|
|
then just put 500 items in, its not a problem.
The MaxDropDownItems value is the number of item to be displayed during drop down at any one time. Which is limited to 100
May i also just suggest that a combo box with so many items is not very user friendly IMO
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
this is can change simply.
first you must change the property DropDownHeight (Default value 106 you can change to 100) and then reset it again(to 106).
then you can change the value in maxDropDownItems = 10 or your value.
it's work great.......!!!!!!!!
thanks
gihan
gihan_chandima@yahoo.com
|
|
|
|
|
Hi.
Why do i get this error when opening a file as bitmap : "Parameter is not valid"
I'm trying to open a .tif file, with calling a funtcion.
The code:
Bitmap tif = new Bitmap(fileName, false);
I googled a bit and tried with casting the bitmap like this:
"bitmap tif = (bitmap)bitmap.fromfile(filename);"
but i got another error saying - "out of memory".
i also read something with using stream, but didnt quite get it on how to work...
Can someone please help?
PS: the tif file has 4 EMPTY pages. And everything stopped only with this file. Many tifs before went through well.
Thanks in advance.
Regards,
Matjaž
|
|
|
|
|
Since you are setting the second param (useIcm, i think) to false, omit it altogether.
Bitmap tif = new Bitmap(filename);
If you still get the error, then it is likely that the tif file has been created in an unorthodox (to MS, at least) way.
As far as using streams is concerned try something like:
Bitmap tif = null;
using (FileStream fs = new FileStream(filename, FileMode.Open))
{
tif = new Bitmap(fs);
}
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Anybody help me
In my application, we used to the tableLayoutPanel , the 24 rows and 7 coloums
But show only 10 rows , after that all are in scroll bar. Now what i am want means, if scroll the mouse ,tableLayoutPanel didn't scroll. can i set any property or write the code to the mousewheel callback event.
Thanks.
|
|
|
|
|
Does the TableLayoutPanel have Focus ?
IIRC it will only scroll when focussed.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
I am developing an smartdevice application to convert text to speech using Visual Studio 2008 with .NET Compact Framework 3.5 and C#..
I learnt that SpeechLib is the namespace used for this conversion..
While using this namespace the error i received is
Error: The type or namespace name 'SpeechLib' could not be found (are you missing a using directive or an assembly reference?)
What should i do inorder to rectify this error??
Thanks in advance..
|
|
|
|
|
YOu need to make a reference to the Library.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Hi,
Thanks for ur fast reply..
I tried adding reference to the library by right clicking on the smartdeviceproject>add reference.. from that i chose browse tab, selected C:>program files>reference assemblies>microsoft>framework>v 3.0 >System.speech.dll
Is the way i proceeded is correct..If not Can u tell me how to make the reference to the library..
Thanks once again..
|
|
|
|
|
We have done one project(software).we are giving our software to our clients.Now we are deploying our software in client server system.But they are asking permission for 10 systems only.We want to resit for 10 systems only.
Eg:We are deploying software in our client server system.They are having 50 systems.But they have use our software for 10 systems at a time.If any 11th person will want to enter he should get one message like room is full.If any one from 10 system
is Logout then other person can enter.
How to do this application.
New Q: You u not getting me.At a time our client's should use our software in 10 system.while use the 10 system no other(11 person) should not login .If any person from 10 systems is logout,then only 11person can login from person who was logout.
thank's in adv
M.lavan
modified on Friday, February 20, 2009 3:28 AM
|
|
|
|
|
hi lavankumar
There are Different ways of doing this, but in your case i assume your App has some login system in it, So you have to create 10 logins and dont allow a user to login with the same credentials in two different machines. Then you will always have 10 users opr les logged into your system
Simple nee
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Does your application use a central database? If so simply have a login table, add 1 when a user logs in and subtract1 when they log out. Check the count before allowing a login. Personally I would actually keep a record of login/out with user name and times.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
The logic for keeping track of who is logged in, preventing multiple simultaneous logins by the same user (if desired), and denying login for an 11th user is straightforward. But presumably you would like to avoid hard-coding this yet add some sort of protection so users cannot too easily get around the restrictions.
My suggestion is to use a license file in flat or XML format and sign it digitally. Digital signatures work similarly to public-key encryption (and indeed one normally uses the same keys for signing and encryption purposes). Basically, there is a key pair consisting of a private key used for decryption and signing, and a public key which is used for encryption and verifying signatures. This is handy, because it means you can embed the public key in your application to verify that the license file has indeed been signed by the corresponding private key, which you don't have to distribute.
I can make you - for a reasonable fee - a license class that takes care of the details of signing a license. Then you simply create your key pair (using sn.exe, provided with Visual Studio), and focus on the business logic rather than the tech details. The class will represent the license as a collection of name-value pairs, keep the file in plain text so it can be read by a human, but detect it if the file is modified so the information no longer matches the signature.
Just message me if you are interested.
|
|
|
|
|
dojohansen wrote: My suggestion is to use a license file in flat or XML format and sign it digitally
I may be missing something, but if the licence file is distributed with the application how will it prevent more than x concurrent users, which is what the OP was getting at?
The only way I know of to prevent more than a given number (say 10) of concurrent users is to have a central 'register' of currently logged in users. By including the user name etc if required you can display a list of current users (so the 11th person could see if anyone could log out). The actual number of allowed users can be stored as an encrypted value, so the chances of it being changed to another value are slim.
As an extra check, you can validate the user is still logged in before allowing functionality.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|