
Merrion
*Experts*
-
Posts
269 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Merrion
-
I have a collection which I wish to use as a databinding source. Therefore in the collection I have: Public Class MyTypedCollection Inherits Collections.DictionaryBase Implements ITypedList End Class But ITypedList has two required functions and I really don't understand the documentation...what should go in: Function GetListName(ByVal listAccessors() As PropertyDescriptor) As String Implements ITypedList.GetListName '\\ what goes here? End Function Function GetItemProperties(ByVal listAccessors() As PropertyDescriptor) As PropertyDescriptorCollection Implements ITypedList.GetItemProperties '\\ What goes here as well? End Function
-
OK - in your class you need to specify the attribute <Bindable()> for those properties that are bindable.... e.g. Public Class WeatherReport Private _mStationName As String <Bindable(True)> _ Public Property WeatherStationName() As String Get Return _mStationName End Get Set (value As String) _mStationName = value End Set End Property End Class In my case I have a component class that inherits from <b>IBindableList</b> because it is a collection of weather reports that need to be displayed in a data grid...not sure how to bind a single object though.
-
So do I - look at the thread imediately below this one to see where I have got to...
-
Making a type-ssafe collection class bindable..?
Merrion
replied to Merrion
's topic in Windows Forms
OK - I was on the wrong track with IListSource - It should have been IBindableList...now the Datagrid binds to the list but it doesn't know anything about the data type within the collection - how do I do that part? -
Making a type-ssafe collection class bindable..?
Merrion
replied to Merrion
's topic in Windows Forms
Hmm - maybe I should replace IListSource with IBindingList...shall check when I get home. -
I have a usercontrol and one of it's members is a type safe collection (inherited from CollectionBase.DictionaryBase). Now I want this collection to be bindable (read-only) to a datagrid. I have added the attribute <Bindable()> to the property and implemented IListSource in the control and returned this list from GetList() overloaded function but it doesn't show up in the datagrid's bindings. What step(s) am I missing? Thanks in advance, Duncan
-
The ImageMapVB control - yeah - that might be a possibility.....
-
You know what would be a cool UI element - when you drop down the list it shows a world map instead of a list of countries and as you move the mouse over the relevant country the text changes to that country name...similarily US states or a map of Europe or whatever.
-
Updated - the component will set you back EUR50 for a single developer license and EUR 350 for a site license (with source code). Now to hook up with a distributor.....
-
The funny thing is I originally wrote "quite" as well - seems to be a logic error in my brain such that typing "very quiet" comes out wrong. Still - no pedantic reverberation that I can see...
-
Is the user an administrator?
Merrion
replied to Merrion
's topic in Interoperation / Office Integration
Looks good - thanks. -
I accidentally typed in www.dotnetforum.com instead of xtremedotnettalk.com and now I keep navigating to that (frankly very quiet) board instead of this one :(
-
How would I find out if the logged in user is an administrator? I'd arther not throw an error (as per the System.Codepermissions derived classes) but just not do the operation that requires Admin. access. Or is this the wrong way to go about this these days?
-
The day Microsoft practice what they preach (e.g. the whole buffer overrun stuff) is the day we'll all be out of a job ;)
-
I just ran it against my PrintMonitor component - man, I haven't had so many warnings since I stopped programming in Borland C++ :eek:
-
I'd imagine they have a team working on it as we speak. And, Microsoft being Microsoft, they probably have another totally unconnected team working on a new XML based help system that is totally incompatible ;)
-
Document!X from InnovaSys, while not free is a very elegant solution.
-
Sounds good except it'd take a futher 35 hours to get the money in ;) Still - the beta and documentation are here if anyone wants a look-see...
-
About 35 hours but about 50% of that was learning curve related.
-
OK - the .Net Prin chComponent is done and dusted. Any thoughts on an appropriate price?
-
I believe that MS are aware of my feelings on this matter ;)
-
So I was at the .NET developer day last Thursday and they gave out these free training CDs for .Net, which are pretty cool but more interestingly had the message "Also take .NET training online at: http://www.imguniversity.com/devtouroffer/" - so I had a look and it seems pretty good...except: Well that's just peachy :mad:
-
So - the scéail is that I have the .Net printer watch component working reasonably well now and think it is a viable component for selling - but I'd need to do a beta test program first as there are so many types of printer driver and operating system combination to test it upon. The question is - should the beta version be time limited (because otherwise why would anyone move on to the production version?) and should participants in the beta who have contributed get a reduction on the price of the finalised component?
-
[PLAIN][Resolved] Getting DEVMODE from JOB_INFO_2[/PLAIN] Sigh - often the case that as soon as you post something all over the internet you spot the obvious error. Anyway - the line: <MarshalAs(UnmanagedType.U2)> Public dmOrientation As PrintJob.DeviceOrientations Is not allowed because enumerated types are held as Int32 which is 4 bytes long. Instead perform the type conversion explicityly thus:- Private mdmOrientation As Int16 '... Public ReadOnly Property dmOreintation() As PrintJob.DeviceOrientations Get Return CType(mdmOrientation, PrintJob.DeviceOrientations) End Get End Property '...
-
Right - the VB.Net spooler watch component is about 70% done but I am totally stuck on getting the DEVMODE structure as held in the pointer in JOB_INFO_2. I keep getting the error: I have the DEVMODE structure defined as a class thus: <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _ Friend Class DEVMODE <VBFixedString(32), MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public pDeviceName As String 'CCHDEVICENAME Public dmSpecversion As Int16 Public dmSize As Int16 Public dmDriverExtra As Int16 Public dmFields As Int32 <MarshalAs(UnmanagedType.U2)> Public dmOrientation As PrintJob.DeviceOrientations <MarshalAs(UnmanagedType.U2)> Public dmPaperSize As PrintJob.PrinterPaperSizes Public dmPaperLength As Int16 Public dmPaperWidth As Int16 Public dmScale As Int16 Public dmCopies As Int16 Public dmDefaultSource As Int16 Public dmPrintQuality As Int16 <MarshalAs(UnmanagedType.U2)> Public dmColor As PrintJob.DeviceColourModes <MarshalAs(UnmanagedType.U2)> Public dmDuplex As PrintJob.DeviceDuplexSettings Public dmYResolution As Int16 Public dmTTOption As Int16 Public dmCollate As Int16 <VBFixedString(32), MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public dmFormName As String Public dmUnusedPadding As Int16 Public dmBitsPerPel As Int16 Public dmPelsWidth As Int32 Public dmPelsHeight As Int32 Public dmDisplayFlags As Int32 Public dmDisplayFrequency As Int32 End Class and the JOB_INFO_2 defined thus:- <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _ Friend Class JOB_INFO_2 Public JobId As Int32 <MarshalAs(UnmanagedType.LPStr)> Public pPrinterName As String <MarshalAs(UnmanagedType.LPStr)> Public pMachineName As String <MarshalAs(UnmanagedType.LPStr)> Public pUserName As String <MarshalAs(UnmanagedType.LPStr)> Public pDocument As String <MarshalAs(UnmanagedType.LPStr)> Public pNotifyName As String <MarshalAs(UnmanagedType.LPStr)> Public pDatatype As String <MarshalAs(UnmanagedType.LPStr)> Public pPrintProcessor As String <MarshalAs(UnmanagedType.LPStr)> Public pParameters As String <MarshalAs(UnmanagedType.LPStr)> Public pDriverName As String <MarshalAs(UnmanagedType.LPStruct)> Public DeviceMode As DEVMODE <MarshalAs(UnmanagedType.LPStr)> Public pStatus As String <MarshalAs(UnmanagedType.U4)> Public Status As PrintJob.Print_Job_Statuses Public Priority As Int32 Public Position As Int32 Public TotalPage As Int32 Public PagesPrinted As Int32 <MarshalAs(UnmanagedType.Struct)> Public Submitted As SystemTime End Class Any ideas what I have wrong here? I'm pretty sure the problem is in the DEVMODE class because if I return lpDevMode as an Int32, cast it to an IntPtr and use Marshal.PtrToStructue(lpDevModePtr, dmThis) I get the same error. Thanks in advance, Duncan