|
Thanks for ur response Eslam Afifi
this is wat i have already applied to my program if u see my program u will understand.
U actually want me to add the controls to the tabpage ,but if i have few tabpages it would be working suppose i have infinite tabpages the approach will be very lengthy for me to implement.
|
|
|
|
|
No, your code is defining a LOT of controls in hard code. You should add user controls that hold another controls. And for the "infinite" tabpages, you just use a loop.
Eslam Afifi
|
|
|
|
|
Thanks for ur response Eslam Afifi .
But,how do i add user controls that hold another controls .Well i am new to this can u
send me any sample for implementing it.
Thanks in advance.
|
|
|
|
|
I already did.
Eslam Afifi wrote: Add a new item to the project and select User Control. design it the way you want.
Right-click the project in the solution explorer
Add -> New Item
User Control
Now you have a designer, design the control as you design a form. Google for more info about that.
Eslam Afifi
|
|
|
|
|
Thanks Eslam Afifi
Now my program is excelently working with the use of user control.
Thanks to u once again.
|
|
|
|
|
Glad to help.
Eslam Afifi
|
|
|
|
|
Hi,
I have an winform aplication that is mainform with a tree. Each node open a embebed form in mainform.
The show of some forms are slow, because they have a lot of controls, my ideia is show a simple loader, for example a progress bar when the form are load.
What is the best way to do that?
|
|
|
|
|
Show the progress form in another Thread because your UI thread would be busy loading the target form and would not update the progress bar.
Eslam Afifi
|
|
|
|
|
|
I dunno if it's the best way, what we did was to separate the controls on the form into tabs, put all the controls for a tab into a custom control, then load the custom controls as the tabs get selected. That way we're only loading a subset of the controls at any time.
The draw back is saving the information at the end. You have to check which controls were actually created and deal with the ones that weren't.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
Hi,
I am having two major problem in Crystal Report.
First, I am not able to format date in crystal report.
i selected the filed then right button=>format object, and selected appropriate format for my date field (ie. "dd/MM/yyyy") but again and again it shows in some old format something like 2009-01-05T00:5566
Second, when ever i am trying to do Sum for some fields it shows only count for that particular field even it is of Number/Decimal datatype.
can any one help me please? Thank you in Advance.
Abdu.
|
|
|
|
|
You just go in the format options...
There you may find different options where you can change the way you want your data..
all you need to do is first convert it to Datetime and then with your own format..
|
|
|
|
|
I have an window application(using log4net) with App.config as below
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net debug="true">
<appender name="ErrorLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="E:\\Logs\\Test.log" />
<appendToFile value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<datePattern value="yyyyMMdd" />
<rollingStyle value="Date" />
<filter type="log4net.Filter.StringMatchFilter">
<param name="AcceptOnMatch" value="false" />
<param name="StringToMatch" value="get_aspx_ver.aspx" />
</filter>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="WARN" />
<levelMax value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>
<root>
<level value="ERROR" />
<appender-ref ref="SmtpAppender" />
<appender-ref ref="InfoLogFileAppender" />
<appender-ref ref="ErrorLogFileAppender" />
</root>
</log4net>
</configuration>
I configured log4net as above.
and in Assemblyinfo.cs file i used the tag like
[assembly: XmlConfigurator(ConfigFile="App.config",Watch=true)]
now My problem is when i run this windows application,error is not logging to the given path.
It seems it is looking the app.config file in bin\debug folder.
if i copy & paste the app.config file in the bin\debug file then it is writing error into the given path.else it is not writing.
when we add new item defaultly the file will be in our project location.right?
Please suggest me, why it is behaving like that?
I enabled log4net debug,at that time, error is as below:
log4net: XmlConfigurator: config file [E:\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\App.config] not found. Configuration unchanged.
log4net: Hierarchy: Shutdown called on Hierarchy [log4net-default-repository]
Please give me suggestions as soon as possible.
|
|
|
|
|
Is it because you have asked it to look for App.config but when you build your project Visual Studio renames App.config to <whatever your="" app="" name="">.exe.config?
You shouldn't have to do the [assembly: XmlConfigurator(ConfigFile="App.config",Watch=true)] . Remove it from your AssemblyInfo.cs file and let the .NET framework perform its own magic.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Try setting Copy local to true for App.config
|
|
|
|
|
Hello,
I have a datagridview, and i want to display data and image in datagridview.
and i am using Oracle Database. In Table i have taken BLOB type of Image column.
when i bind the Datagridview to database..then it display only text feild. its not display image field. I have allready taken DataGridViewImageColumn for image field.
How to display also image in datagridview.
Thanks
Raushan Kumar
|
|
|
|
|
There are two ways.
1. Save the bytes as image on the disk and then show in the grid.
2. Use MemoryStream to directly show the image in the grid.
There are a lot of samples on web and fairly easy to find.
|
|
|
|
|
hi
I am having a treeview in the left, a list view in the right and a refresh button.
Treeview shows year,month and dates while listview shows the logs for the current date selected date.
While pressing refresh button, I have to update both treeview and listview from the latest data in dataset.
How can I retain the selected node of the treeview when it is updated.
thanks
Fadi
|
|
|
|
|
You can't keep the node selected, since you're removing it. A workaround would be to get the key of the selected node, before you clear the treeview. Once done with loading, find the node (by key) and select it again
I are troll
|
|
|
|
|
Hello,
I have made one application in VB.Net
In that i have used some ocx controls and Dll which will work perfect in VB
but when i am going to use the properties from that dll that is giving me error that the run time error 406 non-modal forms can not be displayed in this host application from an activex dll.
My code is like that
Private Sub btnAnalysis_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAnalysis.Click
AxEcgTrend1.PerformAnalysis(AxEcgTrend1.SelectedLead)
AxEcgTrend1.AnalyzeAllLeads(True)
End Sub
This will give me error.
Its urgent. please anyone can help for that.
i cant make change in dll.
So in my application what should i write for that?
Thanks in adv.
|
|
|
|
|
Member 4378546 wrote: Its urgent.
No, its not, otherwise you would have contacted the vendor. I suspect you need a .net version of the dll, but its only a guess.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Member 4378546 wrote: So in my application what should i write for that?
There's nothing you can do to fix this in your own code. It's a problem with the .DLL you're using. You'll have to get with the manufacturer of that library to get an updated version that works with .NET.
|
|
|
|
|
Hi,
I am doing an application in VB.Net 2005 and in that I want to read the measurements of an autocad drawing. Is there any way to do it. If possible please help.
Thanks
Report post as abusive
|
|
|
|
|
When you save an autocad drawing, the file(s) created must be having the dimensions. That is the reason why one can open a saved drawing correctly. It would be good to get a few Autocad drawing files and analyze their structure. Then all you will need to do is read the file at the positions where dimensions are saved.
|
|
|
|
|
Google for "Autocad Automation" and you'll find a bunch of examples on how to talk to Autocad from your code. As for exactly how to get the dimensions of various objects in a drawing, that would be a question for an AutoDesk forum, not us.
|
|
|
|