|
Hi,
1.
my general advice is not to create that much code all at once; in a board application, I always start by filling a huge rectangle with a distinct color (e.g. Aqua), to make sure my events got wired correctly, and something shows. Then I reduce the rectangle to normal sizes, hoping to still see it; and only then I add all the tiny details of the drawing.
2.
Often I also implement a debug mode in which all drawable items get a different color, so one can easily see and identify them, with their boundaries and overlaps.
3.
Having said that, the most suspicious line IMO is here:
Me.boardgame.Width = face(0).X + margin
4.
You described your app as having two pictureboxes, however that does not really show. Your boardgame and menubar Controls could be most anything, in my books they probably would be Panels, as Panle is my preferred canvas provider.
Hope this helps.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
hey,
I want to connect to SQL Server 2005 using the ASPNET account in my application. I have created a password for the ASPNET account through control panel and the account is also configured in the SQL Server login.
The connection string i'm using
DATA SOURCE=xxxxx;User ID=sysname\ASPNET;PASSWORD=winter22;INITIAL CATALOG=databasename.
when i use this code i'm getting "login failed for the user 'sysname\ASPNET'" error.
I'm i using the correct syntax,
Please help
Thanks in advance
D.Vinoth
|
|
|
|
|
By seeing at your error it seems that
for your sysname\ASPNET account you did not
provide sql server authentication.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
thanks for your reply Jinal,
actually when you see the properties for the sysname\ASPNET login in Management studio, the windows authentication and SQL server authentication where disabled.
do you know how to provide SQL Server authentication for the Login.
Thanks,
D.Vinoth
|
|
|
|
|
|
Hi. I need some suggestions about the following code. I think it can be improved, but do not know how. Here's a brief explaning, what the code should do:
Actually it's pretty simple, which reads data from a source, sql server 2005, and fill it to a listview. I'm using .net framework 2.0 and programming language is vb.net.
My problem with code is it takes too much to fill listview. Query execution takes only 1 second, but filling result's into listview takes 40 seconds for a result set of 3600 row.
Here's the code which i add a single row into listview. Most of the processor time passes and memory allocation in this single method.
Any suggestion to improve performance inculuding using another objects will help. Thanks for every responses.
Private Sub AddRow2Lvw(ByVal argCls As clsFoo)
Dim _item As New ListViewItem
Try
_item = lvwMyLvw.Items.Add(clsFoo.UserID.ToString, clsFoo.Name, "")
Call CreateSubItems(_item, lvwMyLvw) 'This method add subitems to listview item, according
to predefined columns
_item .SubItems(lvwMyLvw.Columns("UserID").Index).Text = clsFoo.UserID
_item .SubItems(lvwMyLvw.Columns("UserName").Index).Text = clsFoo.UserName
'..... And lines for other ~15 columns
Catch ex As Exception
'Exception code
End Try
I hope it's clear enough.
|
|
|
|
|
pgyist wrote: Call CreateSubItems(_item, lvwMyLvw)
What's the code within this function?
|
|
|
|
|
For i As Int16 = 0 To lvwMyLvw.Columns.Count - 2
_item.SubItems.Add("")
Next
Using String.Empty instead of "" should help a little bit i guess?
|
|
|
|
|
Add a BeginUpdate [^] construction, that should help a bit.
Does your user actually need to "see" 3600 items, or would he/she be able to work with a subset thereof?
I are Troll
|
|
|
|
|
Yes they want to see all of them. They find it easy scrolling down in thousands of data instead of selecting some criteria before search
|
|
|
|
|
Before you start writing to the listview, try calling lvwMyLvw.BeginUpdate to prevent the control from being drawn. When you have finished filling it, call lvwMyLvw.EndUpdate to allow the control to be drawn.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks Pete. I tried that and saved a %10 time. Is there any other tricks that u can suggest?
|
|
|
|
|
Some things that come to mind here - you don't need to get the index of the lvwMyLvw columns every time. I would store these index values as constants and refer to those instead.
I would also look at using listview virtualization to add small chunks of data - by all means keep your data in memory, but use virtualization to only display the necessary amount, and provide a callback to fill the items as necessary; there's no need for the listview to contain all the data.
Is your listview being sorted on insert? If it is, switch that feature off and sort your data in memory instead - this is a much less expensive technique than letting the listview do it.
Did you know that you can create listview items in memory without touching the control? You could create the items and then add them to the visual listview using AddRange which is much more efficient than adding an item at a time using Add .
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks a lot Pete. Addrange definitely solves the problem. I have not tried virtualization yet. But i will do asap. I agree that getting column index every time sucks but it is some sort of stupid standart that i have to fulfil.
Sincerely,
|
|
|
|
|
Me and a friend are starting a small project up and thought it could be a good idea to put the project in a shared folder using DropBox.
Has any one got any tips or ideas that could help us develop software as a team as I have had no training in this area of work!
Thanks
|
|
|
|
|
Wrong forum for this question.
My signature "sucks" today
|
|
|
|
|
Yeh sorry about that I couldn't decide where to put it
|
|
|
|
|
I wouldn't look at using DropBox to accomplish this. It's not a version control system so you will have difficulty managing your code as it becomes bigger. A version control system allows you to download only the changes, so you can both be working on a project and, as long as you regularly refresh your codebase, you will be working on clean code. If you use dropbox, you have to manage this manually, and that will be a bar to success.
If you really want to accomplish this, take a look at hosting your code somewhere like sourceforge or codeplex, which provides version control access through a wide variety of mechanisms (such as Subversion).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks I will look into that right now !
|
|
|
|
|
Hi, dear all,
I don't know if this is the right place to post my question.
When I compile .wse file to generate setup file, I got the following error:
"To deploy MS Jet 4.0 SP5, you must install MDAC2.6 to your development system.....".
In this case, which service pack of MDAC2.6 should I install?
There are "Microsoft Data Access Components 2.6 RTM" and "Microsoft Data Access Components (MDAC) 2.5 SDK
", which one should I install?
I use Window XP.
Thanks.
|
|
|
|
|
This is not the right place to ask this question.
This is a .Net forum.
My signature "sucks" today
|
|
|
|
|
hi
i want to create animated GIF from one picture with professional effect in my program
i think with component can do this
please help me
tanks.
|
|
|
|
|
|
|
thank
NGif can create gif from multi picture but i want give one picture and component create special effect
for example the program Cool 3D can do this
now help me
modified on Monday, June 7, 2010 11:40 AM
|
|
|
|