|
Hi guys,
i really need some starting advice for a gui ive got in mind.
I need a grid of "data cells" ( in which ill be able to draw text and images into. Cells should be able to automatically resize to its content. Cells are arranged
logically in rows and i must be able to add and delete rows of corresponding cells at runtime. Cells shall also be able to handle a mouseover events and be clickable (left and right, scroll etc.)
They whole gui shall also be able to be resizeable. Scrollbars shall appear if parent window is noth big enough to show all rows of cells.
To get an impression what i want here is an protptype screenshot:
http://img100.imageshack.us/my.php?image=ssjr2.jpg
Many thanks
Michael
|
|
|
|
|
Input "grid" into searchbox above and click the button "Go!"
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Hi Guys and Gals.
I need urgent help with a Setup I am doing. The problem is I have an App.config file where all my connection information is stored. I am using a generic class that reference this config file. The problem is when I run my setup and trying to run the exe and try to log into my database I cant. Yes, I did change the referencing of my files to the location where my db's are stored. I can run the application from within .NET, but not as an exe.
Please help. My deadline is today. Your help will be greatly appreciated.
Regards,
Elizma
|
|
|
|
|
Elizma wrote: need urgent help
That doesn't motivate people to drop what they are doing and help. It is rude around here.
Elizma wrote: My deadline is today.
Wow, two months since you posted this message and no reply.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Didn't expect anyone to drop everything to sort out the problem. Thought someone might have encounterd a simular problem, and know what could have been my problem. It doesn't matter anyway. I sorted out the problem myself. Just got too busy to delete the message.
Sorry if it came across as rude, since it was not my intension. I was just under a lot of pressure to get it done urgently since the program had to be rolled out that day and as a last resort I tried to see if anyone here might be able to help.
Regards,
Elizma
P.S. I saw that most people post the messages like that when they need urgent help. I just followed the norm. In future I will not use those words again, since it seems you are the only one that took affence to it. So, once again sorry if that is the way it made you feel. Was not my intension.
|
|
|
|
|
Elizma wrote: you are the only one that took affence to it
I am generally not the only one.
Elizma wrote: sorry if that is the way it made you feel
No worries.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Please I designed a windows form to register clients. I copied the .exe file that I built to a machine and it is working fine . Now I created the short cut on other pcs on the network but I always receive a message that .Net Framework is violated on sqlcientpermission.sqlcommand. Please how do I make my program run from the network.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
|
there are 2 fileds on the form 1.emp_name and 2.emp_age
i want to search the record based upon these two values.
if ther is any record found on the databse from emp table based up on these value.then it gives a message that reord found and show the values in the respective textboxes .
if not then show the textboxes to enter the fresh data.
the form is having 4textboxes and 3buttons.
1.txtbx.empid
2. txtbxempname
3. txtbxempage.
4. txtbxempaddrs.
1. btnSave
2.btnChk.
3.btnUpdate
|
|
|
|
|
This is straightforward. Just do a select query having the two values in the WHERE clause...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How can i add styles to my listview control?.
I need to display the Header in a specific color and make the captions appear in bold.
Is there any way to achieve this?
Sunil
|
|
|
|
|
You need to set OwnerDraw property of listview to true and add handlers to these events: DrawColumnHeader,DrawItem and DrawSubItem
|
|
|
|
|
I am using .Net 1.1 framework and Ownerdraw property is not available in that.How can I handle this?
|
|
|
|
|
Hi!
we have a windows application created in visual studio.net 1.1 which has lots of tab control (11 tab control and some tab has further 5-6 sub tabs). sometime the system crashes from the beginning it crashes only once in a while but now a days we have few crashes a day. below is a error detail. could someone help us what could be a possible cause for this exception
System.ComponentModel.Win32Exception: Error creating window handle.
Server stack trace:
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Control.CreateGraphicsInternal()
at System.Windows.Forms.Label.get_PreferredWidth()
at System.Windows.Forms.Label.AdjustSize()
at System.Windows.Forms.Label.OnTextChanged(EventArgs e)
at System.Windows.Forms.Control.set_Text(String value)
at HCA.SalesRep.AppContainer.ErrorForm.InitializeComponent()
at HCA.SalesRep.AppContainer.ErrorForm.ctor()
at HCA.SalesRep.AppContainer.frmContainerThreadExceptionHandler(Object sender, ThreadExceptionEventArgs t)
at System.Windows.Forms.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.ControlNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at HCA.SalesRep.AppContainer.Startup.Main(String[] CmdArgs)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at HCA.SalesRep.AppStart.StartApp_Domain(Boolean restartApp)
thanks in forward
Bikash
|
|
|
|
|
can anyone help me please?
|
|
|
|
|
Hi,
there is nothing I can say about your problem.
These are rhetoric questions, i.e. things you could think about, I do not
particularly want to get the answers:
- how is it possible your app crashes after a long time, with a handle problem?
aren't your handles created right away?
- are all GUI controls always handled by the same main or "GUI thread"?
- you did not disable cross-thread-violation checks did you?
These are some suggestions:
- compare exceptions every time they occur;
- try to get line numbers;
- are you running debug or release code? could you run debug code?
- add logging: write a line of text to a log file at the start of each major
operation, action, form creation, tab page creation, whatever may help you
in understanding what circumstances are required for it to crash
- add periodic statistic logging, say once every 10 minutes show CPU load,
disk free space, memory consumption, whatever may be relevant to your system.
If you decide to persue this further on this forum, you may want to provide
more information with respect to:
- threads; what do you use, what for, ...
- AppDomains; dito
- memory situation
- circumstances of crash
Good luck !
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi Thanks for your reply.
All handles are created right away.Its handled via main. We did not disable cross-thread-violation checks.Every time I get same exception which i have posted earlier.
The system doesnt crash very frequently but I have learnt how to crash the system. Below is the codes where the exception occurs and how i catch it.
Public Shared Sub StartApp_Process(ByVal restartApp As Boolean)
Debug.WriteLine("APPLICATION STARTER: Starting the app in a seperate process")
'Load the config file
Dim Config As AppStartConfig
Config = LoadConfig()
myAppExePath = Config.AppExePath
'If the app has been started by this process before
If Not (myAppProcess Is Nothing) Then
'& the app is still running, no need to start the app
If Not myAppProcess.HasExited Then
Return
End If
End If
'Start the app
Try
Dim p As New ProcessStartInfo(myAppExePath)
p.WorkingDirectory = Path.GetDirectoryName(myAppExePath)
' Notify the app if we are restarting in case there's something they want to do differently
If restartApp Then
p.Arguments = myRestartCommandLineString
Else
p.Arguments = myCommandLineString
End If
myAppProcess = Process.Start(p)
Debug.WriteLine(("APPLICATION STARTER: Started app: " + myAppExePath))
Catch e As Exception
Debug.WriteLine(("APPLICATION STARTER: Failed to start process at: " + myAppExePath))
HandleWin32Exception(e)
HandleTerminalError(e)
End Try
End Sub
Private Shared Sub HandleWin32Exception(ByVal w As Win32Exception)
MsgBox(w.Message)
MsgBox(w.ErrorCode.ToString())
MsgBox(w.NativeErrorCode.ToString())
MsgBox(w.StackTrace)
MsgBox(w.Source)
Dim e As New Exception
e = w.GetBaseException()
MsgBox(e.Message)
Environment.Exit(0)
End Sub
the application has a search facility and the results are returned in a xceed grid control. when clicked on a record return by search in a datagrid, it loads all the information about that particular record into a new windows control. this control has lots of information thats why there are lots of tabs etc. so i managed to reproduce same error when i click on a record and view detail and back and forth so after certain time (e.g. after 10-15 clicks from clicking the record to viewing the details).
each windows control is not a form its a windows control which is rentered in a main form.
I could run both release and debug code. i run debug code in development environment while i could also run the live application too. I have noticed when the system crashes it uses high process normally Mem usage goes upto 149,160K (I took this info right after the system crashed for that application).
please help. I have read in some articles that this exception occurs when there are too many controls and yes I believe that there are lots of controls when a row details controls are loaded. It only crashes when its trying to load this control and it has tabs as i mentioned in my earlier post.
please help
Bikash
|
|
|
|
|
I just noticed that the memory keeps building up when i go from title search screen to title detail screen and when i go back and forth again and again the memory keeps building up and eventually the system crashes.
|
|
|
|
|
I strongly suggest you fix the memory problem first; I expect the other problem
will no longer exist.
Are you disposing of every disposable class you instantiated? (such as dialogs)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi thanks, the application does not really uses dialogs and yes I am disposing all the classes. I have monitored the memory for whole day today doing various activities. the titledetail screen is a heart of application and has lots of controls eg. label, textbox etc. the application seem to crash when the memory usage reaches around 80,000k or above. if the application is minimised it falls down to around 1000-7000k memory. when the titledetail is again maximised it jumps from 1000-7000 to around <40000k which means there are still 40000k extra memory before the system crashes. could you please point me to right solution so that i could over come this problem as i cant ask users to minimise the application when not necessary instead of toggling in between various applications.
Bikash
|
|
|
|
|
Hi,
if memory falls back to less than 10MB every time you minimize, then that is
very good; the gc is called when you minimize; it will also get called when
there is a need to, and you seem to have proven it will effectively free most memory.
there is not much I can do, since I don't really know your app.
repeat from 2 days ago:
If you decide to persue this further on this forum, you may want to provide
more information with respect to:
- threads; what do you use, what for, ... <<<<<<<<<<<<<<<<<<<<<
- AppDomains; dito <<<<<<<<<<<<<<<<<<<<<
- memory situation
- circumstances of crash
You once mentioned "each windows control is not a form its a windows control which
is rentered in a main form." but I don't understand what you are saying here.
Can you clarify?
Some more questions:
- what is your .NET version?
- what is your OS?
- how much RAM memory is there?
- what would be the biggest objects? and how many typically?
- do you have large unmanaged memory blocks (either allocated by native code,
as in malloc(), or native data structures behind managed objects you are aware of?
- do you use double buffering? for all controls? how? do you do it yourself, if
so provide details; or do you use double-buffering as built-in in .NET 2.0?
(maybe this takes a lot of unmanaged memory)
- do you use P/Invoke at all?
- are you pinning objects?
- are you calling the garbage collector explicitly? if so, explain how and why.
- are there special things involved: databases, reflection, XML, ...
- did you feel the need to do special things that you maybe don't really understand
but that seemed necessary to get around some problems?
- how big is your app? how many hundreds/thousands of lines of code?
- how many of those "xceed grid control"s do you instantiate?
Could you show some of the complex forms? when you say "a lot of controls"
I may not have the same idea you do about "a lot".
Do you have logging installed, so you can trace which major objects get created,
which methods get executed, etc? if not, that is what I would do. In fact, I
always do that from the beginning, it always pays off, it even saves a lot of
development time; the simplest log method takes a string, prefixes the
current time, and prints it on the debug console.
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi!
My .NET version is 1.1.4322 SP1 / Windows XP, 2GB RAM.
Instead of using windows form we have used windows usercontrols. which are then rendered into a single container.
in each usercontrol a dispose method is called to clean up as below
------
#Region "Cleanup"
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If Not (myIsDisposed) Then
Try
If disposing Then
' Release the managed resources you added in
' this derived class here.
myCurrTitle = Nothing
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
' Release the native unmanaged resources you added
' in this derived class here.
myIsDisposed = True
Finally
' Call Dispose on our base class.
MyBase.Dispose(disposing)
End Try
End If
End Sub
' This derived class does not have a Finalize method
' or a Dispose method without parameters because it
' inherits them from the base class.
#End Region
------
the memory seems to just increase and at certain stage the application crashes when it reaches its peak. is there any tools out there so that i can track what type of memory leakage is it i.e. stack, unmanaged or managed so that i could go in right direction.
I am not sure about biggest object. I think it could be the xceed grid control( not sure).
no i dont use double buffering. yes there databases, refletion and xml. but it seems that it has nothing to do with database or xml or reflection.
in this titldetail control about 15000 lines of code. when the titledetail is loaded in subtabs all together about 5-6 xceed grid control is loaded.
there may be about 200-400 controls including labels, textboxes, grids etc.
could you please point me to right direction.
|
|
|
|
|
This is what I would do:
1. try to get line numbers in the exeception details, by running a debug build, not a release
build, and keeping the PDB files.
2. try to get to upgrade the app to .NET 2.0
3. simplify the OnThreadException() method that is mentioned in the exception traceback:
at HCA.SalesRep.AppContainer.frmContainerThreadExceptionHandler(...)
at System.Windows.Forms.ThreadContext.OnThreadException(Exception t)
so that 1) you know where and why it occurs, 2) it does not create a problem on its own.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
the project consitutes 5 dlls namely
appstart.exe
appcontainer.dll - a container that holds all the user controls
comms.dll - database layer
basectrl.cll - the parent template
screens.dll - all the user controls this is a main project that i work on.
frmContainerThreadExceptionHandler when thrown logs a exception detail into database. but for this exception it didnt log a exception.
why do you think upgrading .net 2.0? do you think it might fix this memory leakage problem? if yes how can i do that upgrade? i currenly run all project in visual studio 1.1.
thanks for all your help so far.
|
|
|
|
|
From the exception's traceback I can see it crashes inside frmContainerThreadExceptionHandler,
so if you don't see it in the database, it did crash before you write it out.
Try adding a Console.WriteLine(myException.ToString()) at the very start of the exception
or something similar (maybe just write to a new text file).
I see frmContainerThreadExceptionHandler is trying to create an ErrorForm and failing at it;
can you show its constructor code?
For a big project having problems I would consider upgrading to 2.0 since a couple of things
have improved, I recon exception handling is one of them. Anyway, I don't expect MS to
fix all bugs they still find in all older versions. If you decide to do it you will need:
- Visual Studio 2005 (the free Express Edition or other);
- 2.0 versions of all third-party stuff if any;
- to reopen your project and let the wizard convert it;
- I expect 99% of code to be compatible; a few classes got their method names or signatures
modified, the first build attempt will point them out.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|