|
I'm working on making a report editing feature of a program I've built.
The feature will contain three main sections, Design, Layout and Print Preview similar to Microsoft Access.
I understand there are other options for creating reports, but this is best options for the features use in my program.
If you could help with two questions regarding this:
1. Currently with the Layout view I'm using classes that inherit System.Windows.Forms.Control class. I would like to give the user the ability to zoom in and out of the Layout view. How could I implement this? Is there a different class to use than the Control base class? Would I simply need to scale the properties of the Control (font size, location, size)?
2. Currently I have two classes for each object type. For example, for Text objects I have two classes, one that contains the properties that pertain to the Text object (which provide validation for proper values). Another class inherits the Control base class and serves as the view for the Text object. This design is getting complicated. Would it be better to combine the classes and their uses into one class?
I want the ability to view print preview of the report without viewing the Layout, thus would a class that inherits the Control base class be too much overhead when it will not actually be displayed on the screen?
Sorry for the lengthy post. The two questions seemed tied together.
Thanks for your patience...
David Hovey
|
|
|
|
|
I writing some application that have reference of Microsoft office outlook.
My application can work with office 2007 or office 2003.
When i work with office 2007 all work fine - and i don't have any problem to control the outlook.
But with office 2003 i cant control the outlook even if i install the interop assembly of office 2003.
I think that the problem is in the loading Interop assembly - because i compiled the setup file with office 2007.
Someone can help ?
I don't know how to solve this problem.
|
|
|
|
|
The compiler "binds" your assembly to the InterOp-DLL that you have used. You could opt to create two class-libraries, one for Office 2k3 and one for Office 2k7
I are troll
|
|
|
|
|
How to associate event handler with the Idle event in c#?
thanks
|
|
|
|
|
don't cross-post. Choose a single forum to ask your question.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
============================coding=========================================
objcon.getconnection()
Dim query As String
query = "insert into kalavithik(name,address,phone_no,mobile_no,date,lenth,shoulders,cheast,waist,sleeves,nack,slit,flair,shalwar,churidar,back_dard,a_h,remark,lenth1,shoulders1,cheast1,waist1,sleeves1,nack1,remark1) values ('" & txtname.Text & "','" & txtAddress.Text & "','" & txtPhoneNo.Text & "','" & txtMobileNo.Text & "','" & DateTimePicker1.Text & "','" & txtLenght.Text & "','" & txtShoulders.Text & "','" & txtCheast.Text & "','" & txtWaist.Text & "','" & txtSleeves.Text & "','" & txtNack.Text & "','" & txtSlit.Text & "','" & txtFlair.Text & "','" & txtShalwar.Text & "','" & txtChuridar.Text & "','" & txtBackDard.Text & "','" & txtAH.Text & "','" & txtRemark.Text & "','" & txtLength1.Text & "','" & txtShoulders1.Text & "','" & txtCheast1.Text & "','" & txtWaist1.Text & "','" & txtSleeves1.Text & "','" & txtNack1.Text & "','" & txtRemark1.Text & "')"
objcon.mycmd = New OleDbCommand(query, objcon.mycon)
objcon.mycmd.ExecuteNonQuery()
===========================================================================
ERROR: Syntax error in INSERT INTO statement.()
Data base: acces,infield error 'date'& data type 'date/time'
email id is : raaz_hasim@yahoo.co.in
|
|
|
|
|
The date-conversion from DatePicker.Value fails, probably the string isn't recognized as a real date.
Untested code incoming;
objcon.getconnection()
Dim query As String
query = @"
insert into kalavithik (
name,
address,
phone_no,
mobile_no,
date,
lenth,
shoulders,
cheast,
waist,
sleeves,
nack,
[...])
values (
@name,
@address,
@phone_no,
@mobile_no,
@date,
@lenth,
@shoulders,
@cheast,
@waist,
@sleeves,
@nack,
[...])
Dim mycmd AS OleDbCommand
mycmd = New OleDbCommand(query, objcon.mycon)
mycmd.Parameters.AddWithValue("@name", txtname.Text)
mycmd.Parameters.AddWithValue("@address", txtAddress.Text)
mycmd.Parameters.AddWithValue("@phone_no", txtPhoneNo.Text)
mycmd.Parameters.AddWithValue("@mobile_no", txtMobileNo.Text)
mycmd.Parameters.AddWithValue("@date", DateTimePicker1.Value)
[...]
mycmd.ExecuteNonQuery()
Enjoy
I are troll
|
|
|
|
|
============================coding=========================================
objcon.getconnection()
Dim query As String
query = "insert into kalavithik(name,address,phone_no,mobile_no,date,lenth,shoulders,cheast,waist,sleeves,nack,slit,flair,shalwar,churidar,back_dard,a_h,remark,lenth1,shoulders1,cheast1,waist1,sleeves1,nack1,remark1) values ('" & txtname.Text & "','" & txtAddress.Text & "','" & txtPhoneNo.Text & "','" & txtMobileNo.Text & "','" & DateTimePicker1.Text & "','" & txtLenght.Text & "','" & txtShoulders.Text & "','" & txtCheast.Text & "','" & txtWaist.Text & "','" & txtSleeves.Text & "','" & txtNack.Text & "','" & txtSlit.Text & "','" & txtFlair.Text & "','" & txtShalwar.Text & "','" & txtChuridar.Text & "','" & txtBackDard.Text & "','" & txtAH.Text & "','" & txtRemark.Text & "','" & txtLength1.Text & "','" & txtShoulders1.Text & "','" & txtCheast1.Text & "','" & txtWaist1.Text & "','" & txtSleeves1.Text & "','" & txtNack1.Text & "','" & txtRemark1.Text & "')"
objcon.mycmd = New OleDbCommand(query, objcon.mycon)
objcon.mycmd.ExecuteNonQuery()
===========================================================================
ERROR: Syntax error in INSERT INTO statement.()
Data base: acces,infield error 'date'& data type 'date/time'
|
|
|
|
|
Is there anyway to have FIPS compliant FTP server and Client without having to use a 3rd Party Application such as Globalscape FTP? Will the settings in Group Policy on Windows XP but sufficient enough? and if so how does make the FTP service FIPS compliant.
Thanks
GSC
|
|
|
|
|
why i have the following msg ??
Namespace or type specified in the Imports 'System.Managment' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Documents and Settings\XeleX\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Class1.vb
|
|
|
|
|
This normally means that you need to add a reference to the DLL to your project. Choose Add Reference... in Solution Explorer to add the relevant DLL to your app.
"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
|
|
|
|
|
does anyone know if xmlnode.Attributes is case sensitive
eg is xmlNode.Attributes["Type"].Value the same as xmlNode.Attributes["TYPE"].Value
Thank you
|
|
|
|
|
Dude, three hours ago you replied to someone in another CP forum by telling them to get an XML primer, and now you ask this question? It seems you should follow your own advice, yes?
|
|
|
|
|
Is it possible to build an assembly that uses PInvoke to use functions from a Win32 DLL and then expose this assembly via COM to a VB 6 application?
I built a .NET assembly and successfully exposed methods via COM to VB 6. However, when I tried to expose a Platform Invoked method, it fails stating that the method doesn't exist.
I'm thinking this whole "public extern static methodName()" business is the root of all evil.
Thanks!
---Dan---
|
|
|
|
|
It should be possible, although from your post it is not possible to understand the value or benefit of doing it.
danvdw03 wrote: I'm thinking this whole "public extern static methodName()" business is the root of all evil.
That's the way I view it. What I mean is that there are other solutions that I would exhaust before settling on PInvoke.
|
|
|
|
|
Dear Developers
I need to provide an environment that users can build a formula usuin field names of a database
table and some string functions like "substr","left", and "right".The environment saves formula
in a string variable,and when user clicks a button,my code must run that formula over values of
those fields for selected record of that table.
Now,I have that environment and it returns formula as a sring to me,but I don't still have any
idea how to run this string.Do I have to write some code to compile it?I found that .Net has
some namespaces for building dynamic methods,I mean Document object model,but if I want to use
classes of this namesapce I have to convert that formula to IL,which is more difficult for me.
Is there any other idea how I can run a user defined expression inside my code and show up its
result to user?That expression can be like this,if we suppose all table field names start with
"fld":
"fldDKCode+fldDKSerial+Substr(fldDKDate,3,2)+fldDKId+Left(fldDKUserName)"
and I have a database table named TBDKUsers,includes all fields mentioned above.When user clicks
on Run button,my program must show the result of this expression for selected record of TBDKUsers.
Thnakk you very much
Reza
|
|
|
|
|
Original here[^].
"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
|
|
|
|
|
Is anyone running VS2008 with IE8RC2? I am having an issue where 'active content' is being blocked in the designer. I can view forms without any problem, but I run into this when viewing the designer for a service installer. I've only been able to find one other mention of this problem but unfortunately the forum post was unanswered. Anyone have any ideas?
-Jim
|
|
|
|
|
I haven't figured out the cause of the problem yet but I was able to get around it. I noticed the .resx for the installer was not found. I happened to have recently removed the existing one to let it re-create it. I restored the resx and it now loads in the designer.
-Jim
|
|
|
|
|
Hi all,
I have two .NET assembly(one library and one WinForm exe) , which i am going to release to the external world. I do not want the public methods of my library to be consumed by anybody other than my exe. Is there an elegant way of doing that?
Regards,
James
|
|
|
|
|
You could always apply a licence to the dll and only allow access to methods if the consumer honoured the licence.
"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
|
|
|
|
|
You could make all the classes internal and declare your exe as a friend.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
How protective do you want to be? You could have the assembly require that certain information be supplied by the calling application before it would work. If the code simply uses a "have things been validated" check, it might not be too hard to bypass, but if some magic constants play a key role in the operation of your assembly you could store them encrypted and use some type of cryptographic handshake with your main application. Unless the assembly and application are both adequately secured against reverse-engineering it will be possible for someone with access to both to reverse-engineer what's going on, but it would be considerably trickier than bypassing a simple validation check.
|
|
|
|
|
hi
value returned from the API GetSystemMetrics(SM_NETWORK) is always 3 for me.
Wat does it mean
i have seen fromthe msdn that the SM_NETWORK is used to identify whether the system has network connection or not. Least significant bit is set if the system has network coonection or else it will clear that bit.
but i am gettign value as 3.. What is the reason for it ?
thanks
|
|
|
|
|
The only bit that's documented is the least significant. Other bits in the return value may or may not be set, but there is no documentation on what they mean.
|
|
|
|
|