how to make the toolbox in VS ide
dear all,
i found that the toolbox, properties column, help...etc are hide and
slide out automatically and are neatly located as a tab-like at both left
and right hand side of the VS IDE application. I am wondering how to make
this
controls?
Also, the collapsible panel bars icons appeared in outlook is very good for
use, do anyone can tell me how to make them?
thanks a lots!
kenton Tag: disable dropdown in combobox Tag: 84254
Editable expression columns
I know that I can add a column onto a datatable, with a value of Confirm,
by....
dt.Columns.Add("Confirm", Type.GetType("System.String"), "'Confirm'")
... but what if I just want to make that a default value that can then be
edited.
If I try
dt.columns("Confirm").readonly=false then I'm told that I can't do that with
an expression column. I also know that I can just add the column without
the expression and then loop through the rows setting the value... but that
seems very inefficient. Is there a better way of specifying an expression
for a column that will just act as an editable default value?
Thanks. Tag: disable dropdown in combobox Tag: 84253
paint type program's canvas
I'm working on a sort of paint program that has the usual canvas pane in the
middle of the main form. I'm working on that class and have a couple quick
questions.. actually more like I'm looking for opinions.
1) I want a ruler running along from top left to top right and from top left
to bottom left. I want to use a skinny UserControl or something that runs
the respective length. I could simply track the mouse and draw the little
line on it. Is there a better control to use?
2) There are a few different ways to render the actual images themselves
(this app will allow the images to be modified while on the canvas) but does
anyone here have any experience going through the effort of using one method
over the other? I could use regular drawing APIs since the real cpu
intensive work here isn't just displaying but rendering the changes to a
buffer and then displaying it. I could use System.Drawing (which is based on
GDI+ I think) or DirectX or ?
Thanks for any help on this. There are obvious ways to do these things but
I'm wondering if there are any absolute correct ways, specifically on the
canvas drawing. Thanks again for any input,
~billy Tag: disable dropdown in combobox Tag: 84252
Handling the message pump for a UserControl
Hi,
Im wondering how a UserControl can be created using native win32 code.
The reason for doing this is that i need to have access to the message pump
and a way to render to it in the fastest possible way using managed DX.
The "UserControl" will be hosted in a IE browser.
Cheers, Tag: disable dropdown in combobox Tag: 84249
Play video formats inside a vb.net application
I am curious about ways to play a vido inside a vb.net application. Are
there controls for this purpose or some classes in Net which allow this. I
am not talking about creating a video, just something that can take the file
and play it inside my application.
Thanks,
Fred Herring Tag: disable dropdown in combobox Tag: 84247
SQL Query - Ok its from a windows app
I think I need a nested query but here's the problem. I promise i've
exerted my meager brain power on this problem & ask this as a last
resot!
3 Tables
PatientTable
PatActive, PatID
ProfileTable
PatID, CodeID, OtherInfo, MedicineID
MedicineTable
MedicineID MedicineInfo
I need a return from Table2 Info including the detailed child data from
Table3 [OtherInfo] where patient is active, however i only want rows
from Profile table where the element CodeID is MAX for each patient.
subquery is fine
SELECT MAX(ProfileTab.CodeID) AS CodeID , patienttable.patsurname FROM
(profileTable INNER JOIN patienttable ON profiletable.PatID=
patienttable.PatID) GROUP BY patienttable.patsurname HAVING
(patienttable.patactive = 1)
I had to add the Group by statement when I tried to add this into
another query.
I dont have direct access to the DB so cannot use stored queries.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: disable dropdown in combobox Tag: 84240
TreeView control; checkboxes for only few nodes, is it possible ?
Hi! I am trying to create checkboxes for some nodes of my TreeView control
and not for the other. I can not see anything on the Nodes level. I can only
set the checkboxes = true on the top parent level. Is it possible to do with
MS TreeView control that ships with VS.NET 2003 ? Is there anything on the
market that
can help me ?
Many Thanks in Advance,
--Mike Tag: disable dropdown in combobox Tag: 84238
How to pass an EventArgs to OnClick upon clicking a control
Hi all,
When you click a control, OnClick is called which in turn calls the Click
event. OnClick takes as an argument an object of type EventArgs which it
then passes to Click. However, the default behavior is that the EventArgs
that is sent is an empty one. I want to pass in some values in my EventArgs
when the user clicks my control. How do I do this?
Thanks,
Nima Tag: disable dropdown in combobox Tag: 84235
MessageLoop on a thread
Is there a way to add a Windows MessageLoop to an existing thread? I have a
.NET application that is called from from a COBOL app using COM, and when I
show a form, the System.Windows.Forms.Application.MessageLoop is set to
false. Is there some way to ensure that the form displayed has a
MessageLoop?
I have tried displaying the form several ways (described below), but all of
them seem to have some problem that makes it a less then ideal solution.
Showing the form this way:
System.Windows.Forms.Application.Run(_child);
Worked great, except that the user couldn't get back to COBOL application
that launched the .NET form - and we needed to be able to do that.
So I tried this:
ShowFormDelegate formshow = new ShowFormDelegate(ShowFormMessageLoop);
this.AppContext.CurrentWorkbench.Form.Invoke(formshow, new object[]
{_child});
Where ShowFormMessageLoop is:
private void ShowFormMessageLoop(Form frm)
{
frm.Show();
}
(Where this.AppContext.CurrentWorkbench.Form is a form that is not visible,
in fact it's never visible, it's just created in the background. )
But this does not have a MessageLoop, so Tabs, ESC, function keys, etc. are
not processed at all on the form.
This method came the closest to working correctly, except that some of the
3rd party controls (grids and toolbars) that were on the forms would not
process keystrokes correctly - the controls are apparently implementing a
message filter that is not getting processed.
_applicationcontext = new System.Windows.Forms.ApplicationContext(_child);
ThreadStart _threadstart = new ThreadStart(this.StartMessageLoop);
Thread _thread = new Thread(_threadstart);
_thread.IsBackground = true;
_thread.ApartmentState = ApartmentState.STA;
_thread.Start();
Where StartMessageLoop is:
private void StartMessageLoop()
{
System.Windows.Forms.Application.Run(_applicationcontext);
}
If anyone has any ideas, I would greatly appreciate it. Thanks!
Theresa Tag: disable dropdown in combobox Tag: 84220
Invalidate but do not draw background
I work on a data acquisition system. I need to display data as it comes.
There are two different modes: 1. Display only current set of data each time
it is ready. 2. Display the current data, but don't erase the previous one.
I remember in MFC I was able to do this by changing one parameter
(DrawBackground() or something like that). I am trying to do it with C# and
failing.
If I use Invalidate() or Invalidate(rect) functions, than the previous data
is erased. However if I just use my plotting functions directly to display
the data, then I need to create Graphics (this.CreateGraphics) and pass it to
the plotting routine. But then the program crashes some time when I try to
resize the window for example. It tells me that a Brush (or Color, etc...) is
used somewhere.
I think it is because I have two requests for plotting data with two
different Graphics: one is coming from acquisition board when the data is
ready, and the other - from Windows when I resize the window.
Is there any way to use Invalidate() but somehow specify not to erase the
background? This would solve all the problems as I did not have to create
another Graphics and just use the one that is generated by .NET in the Paint
message.
Thank you in advance,
Viktor Tag: disable dropdown in combobox Tag: 84219
Help: I can't view a WinForm in [Design] mode
Hi, I'm using Visual Studio.Net 2002 and I can no longer open my windows
forms in Design mode. In the Solution Explorer, I see the white "VB" icons
instead of the grey "Form" icons. I already tried rebuilding the whole
solution and made sure and all of the references are correct but it still
doesn't work.
Any other ideas? Thanks in advance! Tag: disable dropdown in combobox Tag: 84212
Highlighted Text
I've created a Dialog box with textbox to display messages to the user of the program. Whenever I write text to the text box it always comes out highlighted. I can't seem to figure out how to de-highlight the text within the textbox. Anyone have any idea how to do this? Thanks
Marv
From http://www.developmentnow.com/g/29_2005_1_0_0_0/dotnet_framework_windowsforms.htm
Posted via DevelopmentNow Groups
www.developmentnow.com/g
www.developmentnow.com Tag: disable dropdown in combobox Tag: 84208
WindowsForm freezes on second launch
I have a WindowsForm application that I developed on my XP workstation.
It is a nulti-threaded socket application that sends and receives
messages. On my workstation I can close and restart the application
normally with no ill effects.
Now when I put the application on a Windows 2000 Server it runs
perfectly fine the first time around. However, when I close the
application and try to restart it the second time it won't show the UI,
minimizes itself to the taskbar and Task Manager shows it as Not
Responding.
Is this a Framework issue? XP vs 2000? Any ideas where to start?
Thanks
Bigreddog Tag: disable dropdown in combobox Tag: 84194
Async windows programming
Three quick (I hope) questions regarding async programming in a windows
form:
1) When I perform a BeginInvoke on a delegate in my own thread (actually the
main GUI thread) in the midst of a message event handler (say OnMouseUp),
does the implementation basically work the same as the BeginInvoke from
another thread, i.e., a message is posted, the event handler completes
execution, then when the message is dequeued, the target method is invoked?
2) Is there a complete list of how synchronous paint calls can be generated?
I know that doing an Invalidate() simply queues a paint message, but adding
an Update() causes a synchronous paint message. If my handler for the async
event absolutely needs to know that OnPaint(0 is not entered while it is
doing it's work, what else could it do incorrectly, (besides calling
Update()) that could cause a synchronous OnPaint()
3) Are any other calls to handlers made synchronously (like mouse moves or
mouse up/down, etc)?
--
Mark Stega Tag: disable dropdown in combobox Tag: 84193
Reversing text in TreeView nodes
I haven't received an answer to my question of a few days ago regarding a
flipped treeview control posted in the dotnet.framework.windowsforms.control
newsgroup, so I thought I'd ask it again. Sorry about the cross-posting,
but I'm getting desperate as the drop-dead date, the 25th of this month, on
my project approaches.
I'm attempting to create a TreeView similar to the one on the right-hand
side of the BizTalk Mapper screen. I'm able to create a mirror image of a
normal TreeView with everything swapped left-for-right, kind of like looking
at the reflection of the tree in a mirror; unfortunately, that everything
also includes the text for each node. Is there a way of creating a bitmap of
each visible node and performing a
Bitmap.RotateFlip(RotateFlipType.RotateNoneFlipX) on it prior to performing
a Bitmap.RotateFlip(RotateFlipType.RotateNoneFlipX) on the bitmap of the
entire tree? Is there another way of accomplishing the same thing?
Any help would be greatly appreciated. Tag: disable dropdown in combobox Tag: 84190
Reading Text datatype into a byte Array
Hi,
I am populating a records fetched from a select query in
OleDbDataReader. The datbase is MS Access, The datatype of the select
query column is Text. I want to read the data as Byte array instead of
string as Reading it into a string causes it to be converted to
Unicode which is do not want.
Anybody is aware of some sites from where i can get valuable
information or some sample project please do let me know about it.
Any information provided will be greatly appreciated.
Thanks in advance,
Debu Tag: disable dropdown in combobox Tag: 84188
Show Help and Minimise and Exit
Hello.
It seems that in order to get the help (?) button to show in the top right
of a form, the minimum and maximum properties need to set to false. I would
like to have a help, minimise and exit button on my form. Is there any way
to do this?
Many thanks for your assistance. Tag: disable dropdown in combobox Tag: 84186
Drag Drop using Menus
Hi,
I have a sitiuation in which I need to initiate a drag operation on a grid
based on a menu click or button click.
For example, the user right clicks on the grid and a context menu is shown.
One of the menu's is called "Move". If the user clicks on the Move menu item,
the grid should initiate the drag procedure.
I call the Grid.DoDragDrop(...) on the click of the menu, but as "Click"
means mouse down and then mouse up, the drag operation gets "cancelled" and
immediately after the call to Grid.DoDragDrop(), the Grid's DragDrop event is
called - meaning that the Drag operation is over.
Is this any intutive way to accomplish this i.e. initiate Drag from a menu? Tag: disable dropdown in combobox Tag: 84181
restart application
How to write windows application in VB.NET , which on getting the error
should restart Tag: disable dropdown in combobox Tag: 84178
GDI+ encoder CLSIDs and image resampling
Hi folks
Hope this isn't OT here. I got no joy in
microsoft.public.win32.programmer.gdi.
(1) I'm using GDI+ to save an image in various standard (built-in)
formats: JPEG, GIF, BMP etc. I currently have the encoder CLSIDs
hardcoded. Is that safe, or should I iterate the encoders at runtime,
looking for one with the relevant MIME type?
(2) I'm using GdipGetImageThumbnail() to resample images smaller *or
larger*. I've tried altering the interpolation mode to see if that
makes any difference. It doesn't seem to. Here's what I'm doing:
GdipGetImageGraphicsContext lOldBitmap, graphics
GdipSetInterpolationMode graphics, <mode>
GdipGetImageThumbnail lOldBitmap, W, H, lNewBitmap
- Is GdipGetImageThumbnail() appropriate for resampling images larger,
or is there a better way?
- Should it use the interpolation mode that I have tried to set above?
- Why does changing the interpolation mode, require a graphics context?
Resampling is just a mathematical operation on the bitmap content. What
does the graphics context contribute?
TIA,
TC Tag: disable dropdown in combobox Tag: 84171
GDI+ encoder CLSIDs, and image resampling
Hi folks
Sorry if this is OT, but I got no joy in
microsoft.public.win32.programmer/gdi.
(1) I'm encoding to standard (built-in) formats: JPEG, BMP, GIF etc. I
currently have the encoder CLSIDs hardcoded. Is that safe, or should I
iterate the encoders at runtime, looking for ones with the relevant
MIME types?
(2) I'm using GdipGetImageThumbnail() to resample images smaller *or
larger*. I've tried altering the interpolation mode to see if that
makes any difference. It doesn't seem to. Here's what I'm doing:
GdipGetImageGraphicsContext lOldBitmap, graphics
GdipSetInterpolationMode graphics, <mode>
GdipGetImageThumbnail lOldBitmap, W, H, lNewBitmap
- Is GdipGetImageThumbnail() appropriate for resampling images larger,
or is there a better way?
- Should it use the interpolation mode that I have tried to set above?
- Why does changing the interpolation mode, require a graphics context?
Resampling is just a mathematical operation on the bitmap content. What
does the graphics context contribute?
TIA,
TC Tag: disable dropdown in combobox Tag: 84170
Microsoft: Help with OLE documents...
Hi all.
I have an application to draw and design different documents, that supports
linking and embedding of other documents (like, for instance, Corel Draw or
Word). Then, the user can print their designs "WYSIWYG", so I load the
external document inside an OLE document container control (VB6), get a
handle to the object and invoke OleDraw with the hDC that I want the object
in.
This have been working excellent, and this application is largely
distributed among our clients.
The problem is we want to migrate to .NET (any language, VB, C#, C++, ...),
but there's no OLE container that lets me obtain a handle to an OLE
document.
I know you could import COM and ActiveX, but this particular control
(included in VB6) CANNOT BE IMPORTED NOR INSERTED in .Net.
Microsoft calls this a "migration issue" and warns us about it, but how,
then, can I draw an Ole document inside our application (let alone open,
edit, update, etc)?
Is Microsoft planning to update this component for VS.Net 2005? Or is there
an alternative?
I know I could load an OLE document "the hard way", but those are methods so
obscure, I get lost before even starting to insert the document in a
container... If this is the only solution, is there an easy (as easy as this
can be) example that can lead me to accomplish the insertion of a document
inside mine?
I know it can be done, because RTF editor lets you do it. It even lets you
open and edit the document, and "paste special", but I don't seem to
accomplish getting a handle to any of those inserted objects...
Thank you for your time,
VBen. Tag: disable dropdown in combobox Tag: 84169
memory leak in Timer controls, and thread sleep
Hi,
We have find memory leaks when we tried to use timer to raise event at
specified
interval. The OS we use is: Windows XP Professional Version 2002, service
Pack 2,
IDE is: Visual Studio .NET2003. Microsoft .NET Framework 1.1, version
1.1.4322 SP1. To repeat this problem,
1. creat a VB windows solution
2. on the form, add a timer control, set the property interval to 100
3. add a button, name it "start"
4. add an event handler( command_click) to the button "start"
5. in the event handler, start the timer
6. watch in the "task manager", memory is prograssively increase,
7. to make this problem more clear, add another timer, set the interval to
10, again, when the button "start" clicks, start both the timer. this time
you probably will
notice the memory leaking faster, in 10 minutes, you will find it is leaking
around 1MB.
I tried to change the timer control to System.timers.timer, and use call
back functions at the specified interval, I have the same problem. Further
investigation into the memory leaking, we found if you put the thread into
sleep at certain amount of time, the memory leaks as well.
Is ther any one who knows why? This memory leak crashes our application.
I tried to force garbage colletion, things getting even worse.
Any suggestions are welcome.
Lihui Tag: disable dropdown in combobox Tag: 84165
Resize a form based on content size
Is it possible to resize a form based on the size of its contents? In
VB6- we had ScaleWidth & ScaleHeight properties, with which one could
get/set the form size to fit exactly.
Is there an analog in the .NET Framework?
Thanks!
-Evan Tag: disable dropdown in combobox Tag: 84163
Treeview scroll problem
I have a treeview control on a form with Scrollable=True.
If a user scrolls the list and then selects a node, the selected node
returned by the AfterSelect event is always the topmost visible node in the
list, not the node selected.
This also happens for the click event, but double-click works ok.
Can someone suggest a workaround for this behaviour? Tag: disable dropdown in combobox Tag: 84162
My Brain Hurts _ One last undetermined error
I have an application based on the Issuevision example at MSDN.
The program falls over at this line:
Application.run(New MainForm)
Call Stack//
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'RevMed': Loaded 'C:\Sandbox\MedOOP2\bin\RevMed.exe', Symbols loaded.
'RevMed.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.
'RevMed.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No symbols loaded.
'RevMed.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'RevMed.exe': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll',
No symbols loaded.
'RevMed.exe': Loaded
'c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll',
No symbols loaded.
'RevMed.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.
'RevMed.exe': Loaded 'c:\sandbox\medoop2\bin\threadhelper.dll', No
symbols loaded.
An unhandled exception of type 'System.ArgumentOutOfRangeException'
occurred in system.windows.forms.dll
Additional information: Specified argument was out of the range of
valid values.
Help greatly appreciated Tag: disable dropdown in combobox Tag: 84159
Synchronizing 2 grids via the CurrencyManager
I have written a custom databound grid control that we've been using
successfully for months, but one of our developers has just run into a
problem that I can't figure out.
The code for setting it up is as follows:
DataSet dataSet = new DataSet( "TestSet" );
DataTable tableParent = dataSet.Tables.Add( "TableParent" );
tableParent.Columns.Add( "ID", typeof( Int32 ) );
tableParent.Columns[ "ID" ].AutoIncrement = true;
tableParent.Columns[ "ID" ].Unique = true;
tableParent.Columns.Add( "Col1", typeof(Int32) );
tableParent.Columns.Add( "Col2", typeof(Int32) );
DataTable tableChild = dataSet.Tables.Add( "TableChild" );
tableChild.Columns.Add( "ID", typeof( Int32 ) );
tableChild.Columns.Add( "Col1", typeof(Int32) );
tableChild.Columns.Add( "Col2", typeof(Int32) );
dataSet.Relations.Add( "Child2Parent", tableParent.Columns[ "ID" ],
tableChild.Columns[ "ID" ] ).Nested = true;
gridParent.DataSource = dataSet;
gridParent.DataMember = "TableParent";
gridChild.DataSource = dataSet;
gridChild.DataMember = "TableParent.Child2Parent";
The way it is supposed to work (and does work with the MS DataGrid) is that
when you select a row in the parent table, it should set the data in the
child table to all children of the selected parent.
In my grid, when the current cell changes, I set the position in the
CurrencyManager to the new position. My understanding (and apparently a
false one) was that the CurrencyManager would update the position in the
underlying dataset which in turn would then inform all CurrencyManagers
bound to it. Apparently that's not the case.
The parent grid receives the CurrencyManager.PositionChanged event but the
child grid receives no events from its CurrencyManager.
How am I supposed to propagate an update to the child grid?
Thanks.
Pete Tag: disable dropdown in combobox Tag: 84157
ListView & Copying of
Hi,
I have a windows form, in C#. It has a ListView on it. For a couple of
reasons I now need to be have multiple sets of Data that can be dynamically
Copied into and out of the ListView. But I'm having realy trouble with
it....and feeling pretty frustrated.
I firstly tried copying over listView.Items - which is ok to read out of,
but its a read only property and can be copied back over.
Also tried listView.Items.CopyTo (lviArray) and tried a
listView2.Items.AddRange (lviArray), but I get an exception about data
already existing else where either remove it first or clone it. Tried
cloning it but that doesn't seem to work either.
Feel I am missing something. Any help would be appreciated.
Thanks,
Laura Tag: disable dropdown in combobox Tag: 84155
Drag and Drop question
I am writting an application (app A) where the users can drag some text
within my application and drop it in another application (app B). When the
item is dropped, the app A must know that an it was successfully dropped in
app B and do further processing. How can this be done? Thanks. Tag: disable dropdown in combobox Tag: 84154
Program PowerPoint using C#
I am trying to locate some examples or some instructions on how to program
the PowerPoint object model using C# in a Windows Forms or ASP.NET
application.
--
Charlie Jursch
Patotech Software, Inc.
Danville, CA Tag: disable dropdown in combobox Tag: 84152
Controls Disapear when I Compile Windows Forms
I have come across a strange BUG in VS 2003 that drives me nuts and makes
working in the Windows Form designer sometime impossible. This usually
happens when I have made a lot of changes to a form by deleting then
re-adding a bunch of controls. The problem happens when I try to re-add
controls.
I can add the controls and get them all exactly where I what, and the form
looks good then I compile the project/solution and then everything goes bad.
I get strange errors like: "Duplicate declaration of member 'location'" or
just "Member Not Found". When you double click on them all it does is take
you to the top of the class. When you look at the form generated code you
can tell that most of the properties to tell the control where to display
and its size are missing, so when you look at your form all your controls
are gone in design mode. I end up having to go into the code and deleting
the declarations manually and removing all the code in that was generated by
the designer.
I have looked at the KB article 821309 that is for the problem with
'location', but that says it is only a problem in 2002 and the workaround
didn't work for me anyway. Right now I have one form that I can do this on
pretty much every time I add a control. I can add one control get it like I
want then I save it and check it in. Then I check it out make more changes.
I keep checking in and out so if I make to many changes and everything gets
screwed up I don't have to redo everything again.
We use Vault 3.0 for our source control and this isn't a Vault problem
because I had this issues with Visual Source Safe also.
Any help on this problem would be great. I have tried deleting the RESX
file for the form, but that doesn't help either.
Thanks,
Eric Renken Tag: disable dropdown in combobox Tag: 84150
Hierarchical presentation style for DataGrid
I have bound datagrid to a dataset with a datarelation defined between
work orders and line items of those work orders.
The default navigation style is to present the [+] at each work order.
You expand, and it shows the name of the datarelation in a new line,
that is shown as a hyperlink. You must THEN click the hyperlink and then
it clears the data grid display, shows the parent work order data at the
top, and then a grid of columns for the line item.
I have seen grids show subordinate records on the same "page" as their
master records, with column headings for the expanded area appropriate
for the line items. How is this done? Tag: disable dropdown in combobox Tag: 84149
Unhandled exception after calling child form's Dispose().
Hello,
I have a main form (MainForm) which contains File->New menu item. On
clicking File->New menu item, i am displaying a form (ChildForm) which
contains a lot of controls and a lot of complex code. Everytime the
File->New menu item is clicked, a new instance of ChildForm is created and
shown as modal dialog with MainForm as owner. In the ChildForm's Dispose()
method, i have included code to remove all event handlers, cleanup the
controls etc. After call to ChildForm.ShowDialog(MainForm), i am calling the
ChildForm.Dispose() method explicitly, to release the window handles.
The problem here is I am getting an Unhandled Exception saying
"System.NullReferenceException: Object reference not set to an instance of
an object.
at System.Windows.Forms.ChildWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)".
Please help me!
Thanks,
VijayakrishNa P. Tag: disable dropdown in combobox Tag: 84136
Chart control for Windows Forms
hi,
Looking for a reliable-easy to use Chart control. never
used one before, so any advice / experience is greatly
appreciated. Tag: disable dropdown in combobox Tag: 84129
Launch WebBrowser
How can I launch a webbrowser from my windows forms applications? The
reason I need that is because I have a DataGridView with links in one
of the columns. When clicking on it I process the click and then want
to start a webbrowser loading the site that the link was pointing to.
Thanks,
Rob Tag: disable dropdown in combobox Tag: 84124
Event on record change
I have some controls on my form which are bound to a dataset and some which
are not bound.
But whatever record is displayed on the form, I want to populate those
control (datetime, combo, etc.) with the data in the current record.
What event can I do this in ?
PositionChanged of bindingContext - is this called before the record is
current or after ?
if it is after, I can use this.
Please advise.
HS Tag: disable dropdown in combobox Tag: 84122
Bypass IE Print Dialog
Hi,
I am using ShellExecute() to print HTML
files through Internet Explorer (to defalut
printer). But I don't know how to bypass the
Print Dialog. Any help/advise will be
appreciated.
Thanks in advance!
DGU
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: disable dropdown in combobox Tag: 84118
How to refresh SOME records in the datagrid but NOT SQL Server ?
I am sure this is a dumb/simple question, but I am new to this stuff, so
request for patience with me...
I have OUTSIDE knowledge that there is activity regarding some records
in a parent / child set of tables I am showing in what I want to be a
read-only view in a grid. I have primary key values, but don't know if
it is just a change to existing records, or if the record was recently
inserted.
I want to reflect these changes to the grid in realtime as they occur,
by using the primary key to query certain records and get them updated
in the datagrid.
I started out binding the grid to a DataTable. But I had trouble
detecting column sorts, and the need to show some status information for
the current cell. I switched to using a DataView and that fixed that.
Then I wanted to show work-order/line-item levels, and so I created a
datarelation in a dataset, and bound to that, and this works (pretty good).
I thought if I queried JUST the work order and line items I know have
changed, this would be very efficient. I just need to integrate those
data updates to grid. From docs it appeared that DataTable.LoadDataRow
would allow me to import the values from the update query data set, and
would then update my grid with additions and row value changes. But I
get duplicate primary key errors, which suggests to me this is trying to
update the database, rather than just my in-memory dataset and the
display grid. This makes me wonder if I in any way change the dataset if
it will be attempting to post those to the database underneath, which I
do not want.
Am I going to have to implement my own list structure to bind to the
grid? If not, how is this done with datasets? Tag: disable dropdown in combobox Tag: 84115
BUG in Combobox.Location ?
Hi,
I want to draw combobox to bottom of form. I have following code :
ComboBox C = new ComboBox();
C.Font=FontNormal;
Size CSize=C.Size;
C.Location = new Point(0,this.Height - CSize.Height); // this.Height is
Height of parent control
this.Controls.Add(C);
By me it is correct but down part of my combobox is drawn out of control.
Why ?
Thank you Tag: disable dropdown in combobox Tag: 84113
SelectedIndexChanged event with listview
I have a form with a listview to allow users to select an item. When they
select one I fill in controls below it for them to modify the values. They
can also just enter new values in the controls without selecting a listview
item in order to insert new records. After entering new data if they select
a row in the listview I prompt them to make sure they want to save the
changes. If they select 'Cancel' I want to not highlight the newly selected
row and leave the data in the detail controls as it was. Otherwise the new
row is selected and the listview item is used to populate the detail
controls.
The problem seems to be that when I clear the selected items for the
listview the selectedindexchanged event fires again. I get the yesnocancel
prompt twice. If I step through the code in the debugger I only get it once.
I tried using a bool to skip the handler when clearing the selection but it
seems like the highlighting of the selected row then sometimes happens after
the clearing so it ends up in the selected anyway. I tried playing with the
clicked event and others and the events don't seem to always happen in a
predictable order. Each thing I try seems to create new issues and it seems
this shouldn't be this difficult. I've done similar things with the datagrid
but would like to use listview.
Basically want to be able to prompt the user sometimes when they select a
new listview item and if they "cancel" I want to be able to clear the
selection or set the selected item to a prior selected item without prompting
them a second time.
Any help would be appreciated. Thanks in advance.
Jeff Tag: disable dropdown in combobox Tag: 84112
Databinding to Textboxes
I have a windows forms that shows only one record at a time.
The user selects the record he want via a combo box. Everything works fine
for the first selection, however the textboxes do not automatically update
their values when the combo box changes values.
The textboxes are bound to a dataset. Here is and an example of what the
databinding lookes like in designer:
Text: DsEventPerson1 - tblSubject.FirstName
When the user selects a new row in the combo box, the DsEventPerson1 is
cleared and refilled. What must I do to get the textboxes to show the
correct values for each record selected?
--
wr Tag: disable dropdown in combobox Tag: 84109
Newbie question
Hi,
How I can get size of Graphics.DrawString in pixel ? Becuase after I draw
string I need place after its combobox ...
Thank you. Tag: disable dropdown in combobox Tag: 84108
change header text
In my header on my grid i need to make the text dynamic, first is that
possible and how can it be done? Tag: disable dropdown in combobox Tag: 84106
change header text
In my header on my grid i need to make the text dynamic, first is that
possible and how can it be done? Tag: disable dropdown in combobox Tag: 84105
Need to disable "Print progress" popup dialog
have an app that does batch printing.
The Dialog telling me which page is being printed keeps poping up.
It's very annoying!! Any way to disable it??
Thanks in advance. Tag: disable dropdown in combobox Tag: 84103
Control Validating Event Odd Behavior
I now know this event is quirky.
I am seeing something odd, *though*.
When I set a break point inside a validating Event Handler, I see the
desired behavior when setting cancel = True.
"If the test fails, you set the Cancel property of the Validating event's
CancelEventArgs to True. This cancels the Validating event and causes the
focus to return to the control. The practical effect is that the user cannot
leave the control until the data is valid."
However, when not running in debug mode I do not see the desired behavior
when cancel = True. I am able to leave the control even though the data is
not valid.
Make sense to anyone?
Greg Robinson
Custom Data Systems, Inc.
www.cds-am.net Tag: disable dropdown in combobox Tag: 84102
Calling .NET using COM
I have a C# Windows Application that was built using an XML-based framework
(It's fairly complex, but simplifies our development considerably.)
We have recently integrated this application with a COBOL application, in
that the COBOL application will call our .NET forms. I have discovered a few
issues with this, and hope someone may be able to help in fixing them. Most
of the problems seem to revolve around the Windows MessageLoop, threading
and some third-party components (namely, Janus GridEx and Infragistics
Toolbars). (I posted to their news forums, but have not had any luck there.)
I think the problem may be more in how I am creating and using the thread. I
have the code here that is used when a form is called from the COBOL
application. One thing I have noticed is that if I call the form using
System.Windows.Forms.Application.Run(_child)
, the form works perfectly, but the user cannot do anything in the COBOL
application - it's "frozen" until I close the .NET form. If I use the
following code to call the form, the user can do stuff in the COBOL
application, but the Tab, ESC, Alt, etc. keys do not function as expected on
the third-party components, which may do something of their own with the
keys. For example, the Janus Grid should Tab from column to column, but does
not. Instead, it will tab from control to control. I have tried looking at
various properties of the thread the form is on, the ApplicationContext, the
Application, etc, but nothing seems to be different from one call to the
next, except for the thread's ID.
Any help would be greatly appreciated!!
The code to create the thread is:
_applicationcontext = new System.Windows.Forms.ApplicationContext(_child);
ThreadStart _threadstart = new ThreadStart(this.StartMessageLoop);
Thread _thread = new Thread(_threadstart);
_thread.IsBackground = true;
_thread.ApartmentState = ApartmentState.STA;
_thread.Start();
Where _child is the form with the grid, and StartMessageLoop is:
private void StartMessageLoop(){
Application.Run(_applicationcontext);
} Tag: disable dropdown in combobox Tag: 84100
Winform with DirectX Video-Directshow Use
I need to grab a video frame on a winforms app. The Microsoft oldway was
with Direct Show filter as detailed in
Microsoft DirectX 9.0 SDK Update (October 2004)
GrabBitmaps Sample
This C++ console application shows how to use the Sample Grabber filter to
capture frames from a video file.
What is the new way/right way to do this now? Am I suppose to use managed
direct-x which supports the directshow filter?
I need to do this in CSharp so are there special using statements that I
need to access the direct show features of managed direct-x.
Help anyone I am so confused about this.
Thanks Tag: disable dropdown in combobox Tag: 84098
can someone tell me how to disable the dropdown in a comboxbox??
--
Message posted via http://www.dotnetmonster.com