|
This code is totally messed up!! There are quite a lot of errors, seems to me like your missing the basics here? find some articles on CP or MSDN that explains them plz then start working. Thanks
for a startup use this URL in your MSDN
ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_raddata/html/15a88fb8-3bee-4962-914d-7a1f8bd40ec4.htm
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hi ,
I`ve got a basic doubt about WinForms ...
Is it possible to create a form that has no client-area at all , but only a menubar that stretches across the entire width of the screen ?
The method i tried was to set the client area property of the form to (ScreenWidth,0) but it doesn`t work (a little strip of the client-area in grey is still visible below the menubar).
If its not possible to do so,is there some basic concept here which i`ve missed out on ?
Thanks in Advance
|
|
|
|
|
If you change the fromBorderStyle to None you will only have the menu bar left.
Hope that helps.
Ben
|
|
|
|
|
Hi Ben ,
Many thanks for replying ! I created a simple Form with a Menu & set the FormBorderStyle to None so this removes the scroll bars, system control box,min/max/close button etc...
But a grey area (which i think is the client area ) still persists just below the menubar.
I`ve tried working with the form height, size,clientarea and autoscalebasesize too , none of which works
An alternative way i found was to override CreateParams and fiddle around with the WS_BORDER,WS_CAPTION values but again , the grey bar issue remains.
I`ll be grateful if any1 can tell me a way in which i can make a BMP of this available (since i dont think images can be embedded in posts ) coz it`ll give a clearer idea of what exactly is going on
Hoping the CP wizards can help me out here !
thanks !
|
|
|
|
|
There is just one more thing to do. In the form properties set the BackColor to something like Red. Then in the form properties set the TransparentcyKey to something like Red as well. It doesn't matter what color you pick as long as these two properties are the same. That will cause the line to go away.
Hope that helps.
Ben
|
|
|
|
|
Hi Ben,
it works like a charm ! many thanks for ur help ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
I'm working on a WinForms app which talks to a webservice. With an Ajax app you'd use an "updating" gif, which would disappear once everything had completed - I was wondering if anyone knows of a preferred/standard approach when dealing with WinForms?
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
If the updating via the web service is going to take a long time ie keep the user waiting, then ideally you should do the update on a different thread from that of the UI. In VS 2005 you can use the BackgroundWorker control for this purpose.
A quick and dirty solution would be to lock down the UI and use a PictureBox control to display the 'updating' gif as in Ajax or alternatively use a ProgressBar.
|
|
|
|
|
I made a Dialog and I put it on a Tab (WTL)
And I found out so if I press TAB so pass a Button the program get stuck....
Somebody nows what the problem?
Thanks in advance
|
|
|
|
|
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
|
|
|
|