MessageBox clears my splash screen
Hello,
I am opening a messagebox on top of a splash screen. The splash screen is a
normal windows form with(FormBorderStyle=None, StartPosition=Center and
TopMost=true).
My problem is that my MessageBox is clearing the splash form behind it. When
I press OK on the message box, the splash form is all gray(the background
color) and no controls are visible. I have tried to set up a timer on the
splash screen, and when the timer kicks in, the form is visible and it does
not help to call neither Update og invalidate on the form. The only thing
that helps is if I call Hide() and Show(), then all my controls are visible.
I call the messagebox with the owner window, but there is no difference.
Any ideas?
Thanks
Henrik. Tag: Controls inside mdifrom Tag: 93353
Message loop question
Hi,
Could someone explain to me why this doesn't work? (VS 7.1, .NET 1.1)
Thread A:
Application.Run();
Thread B:
myForm.Show();
If I run both on the same thread it works.
I thought that it was enough to have a message loop running on any thread
in the application to make forms work, but apparently not. Why?
If I change the code in thread A to Application.Run(myForm); the form works.
Why? I thought the only difference would be that the message loop would now
exit when the form closes.
If I change the code in thread B to myForm.ShowDialog(); the form also
works. Why?
--
Patrik Rådman
patrik at iki dot fi
http://www.iki.fi/patrik/ Tag: Controls inside mdifrom Tag: 93351
Minimize main form when modal child minimized
I have an form app which displays a modal dialog. I would like both forms
(the entire app) to be minimized when the dialog is minimized by the user. I
have overridden WindProc and caught the minimize event in the dialog,
however, when I attempt to minimize the main form by setting
Owner.WindowState = FormWindowState.Minimized the dialog is automatically
closed.
Anybody know how this can be done?
--
Ralph Flaugher Tag: Controls inside mdifrom Tag: 93350
Form level mouse events
I'm finding that form-level mouse events are not being fired when the mouse
is over any control within the form. Is there any way to enforce this ? I
want generic MouseLeave and MouseMove events that fire on the form even when
the mouse is over controls within the form (and even if these controls
themselves have a MouseMove event, I'd want BOTH to be fired). Tag: Controls inside mdifrom Tag: 93341
Delaying control repaint. Is it possible?
Hi there,
Using a foreach, I want to iterate (make visible) all the tabpages of a
tabcontrol, in order to activate the databinding of the controls in each
tabpage.
Is there a way to delay/disable the repainting until the iteration is done,
so the user doesn't see the tabpages switching? Something like:
-Disable control repaint in the form
-Iterate the tabpages
-Enable control repaint (and then the last tabpage activated is shown
instantly)
Regards,
-Benton
Using VS 2005 Beta 2 Tag: Controls inside mdifrom Tag: 93337
Form level OnMouseLeave
I'm overriding OnMouseLeave at Form level:
protected override void OnMouseLeave(EventArgs e)
{
this.Close();
}
The purpose of this, as you may suspect, is to close the form when the user
moves the mouse off it. However, this seems to fire whenever the mouse moves
over any control on the form, I imagine because the mouse is "leaving" the
form's base surface.
How can I do what I'm trying to do ? Tag: Controls inside mdifrom Tag: 93336
Treenode added to itself - No Exception?
Hello
Ive just made a typo in some code that dynamically adds treenodes to a
parent node.
The result was something silly like this:
dim tn as new treenode("mytext")
..
tn.nodes.add(tn)
This didn't throw an exception but rather (i assume) recursively looped and
hung the application on a test debug and run. Does everyone else get this
kind behaviour? And if so why doesn;t it throw an exception? Treeview is a
UI control. Its impossible to draw this kind of behaviour....at least in
this dimension anyway.
RR Tag: Controls inside mdifrom Tag: 93331
VS 2005 Internet Connection
Hi,
I am using VS 2005 - BETA 2. I'd like to use
My.Computer.Network.IsAvailable to detect whether an internet connection is
available. Is this the best "new" way of doing things or does the above
method above detect network connectivity of some other type? There seems to
be a delay capturing the disconnect-connect events when I do use it, is there
a way to shorten this delay? In essence, what does this method wrap?
Regards,
Giovanni P. Tag: Controls inside mdifrom Tag: 93328
Text Box Validation - prevent a blank entry
Hi,
I have a form with several text boxes on it.
Each test box requires some validation ... for being numeric etc.
and I am successfully using the Validating and Validated events of each
text box and an ErrorProvider to achieve this...
However, I want to validate one of the text boxes such that the user
*must* enter a value... ie. the text box must be non-blank.
I tried putting code in the Validating event to disallow a blank
value.. this did not work.
The problem is that the Validating event is only invoked if the text
box gets focus. If the user never clicks on the text box, then me error
is never displayed.
How do I force this validation .. even if text box never gains focus ?
Many thanks. Tag: Controls inside mdifrom Tag: 93326
System.Drawing.Color enumeration
Hello all,
not sure if this is the correct forum for this, but anyway - how do I alter
the alpha channel of one of the System Colors? For example, if I want
System.Drawing.Color.Blue, but with an alpha value of 100, how can this be
done? Thanks in advance! Tag: Controls inside mdifrom Tag: 93323
TreeView and SetScrollInfo problem
Hi, I have a WinForm with a TreeView and a custom scrollbar that is
positioned over (hides) the TreeView's own ScrollBar.
I use SetScrollInfo to update the TreeView's ScrollBar to match the changes
in the custom scrollbar. The problem is that while the TreeView's ScrollBar
does move to match my custom scrollbar, the contents in the TreeView doesn't
move at all.
Any suggestions? Tag: Controls inside mdifrom Tag: 93322
Printing the entire UserControl - as is..
Hi,
In my windows application, I have a form and I placed an UserControl on
the form. I placed lot of edit controls on the UserControl.
Is there a way to print the entire UserControl just as it appears on
screen? This is something similar to Print Screen functionality, which
captures the whole screen as an image. But I want to capture just part
of the screen, which is usercontrol. If the usercontrol has scrollbars,
I want to include the hidden portion as well in the print
functionality.
Basically, I want to have a button on the form with a caption "Print
Page", that should capture the entire UserControl as an image including
any hidden scrollbar region and send it to the printer.
Is this possible? Any ideas..
Thanks,
Raj Tag: Controls inside mdifrom Tag: 93320
Add controls to taskbar (like Google Desktop Search box)
I was wondering if there's any way to create a toolbar that docks on
top of the windows tast bar and shows up in the "toolbars" list. I
noticed that Google Desktop Search has an option to add a search box to
the taskbar (fully dockable/floating etc), so it looks like it must be
possible, but I haven't been able to find a way to do it. The closest
I came was a sample ApplicationBar, but this could only dock over top
of the taskbar, not "inside" it. Ideally, I'd like to create something
similar to what GDS has, which is selectable from the context menu, and
which can be used in either a "docking" or "floating" mode. Is there
any way to do this?
Thanks in advance for your help!
Chris Tag: Controls inside mdifrom Tag: 93319
ClickOnce server deployment for Intranet App
I am trying to use ClickOnce Deployment technology.
I have published it on my System(Test Machine) and it works great.
Now I want to put it on the main web server which I cannot access from my
machine. So I copied the files from the Inetpub\wwwroot\ directory to the
main server .
But when I run it from the main webserver it tries to run from where I made
it(test machine).
My question is, what I have to do to run it/deploy it to different machine.
We need to put it on our client intranet server also and they all have
different server name.
Thanks in advance.
Mike Tag: Controls inside mdifrom Tag: 93313
Showing form without activation... HELP
Hi,
I have modal form which I am showing with some fading effect...
(it is like balloon that comes when you receive a mail in the outlook.)
But when I show this form, Owner form looses focus.
I searched across net & I came across ShowWindow API, It seems working
for me ... but the fading effect is not working.Can you please suggest
me some way so that I will be able to show my modal form using
ShowDialog and Still it is deactivated when it is loaded... please
help... Tag: Controls inside mdifrom Tag: 93311
Datagrid Freeze Pane
Is there a way to freeze one of the columns in the Datagrid for windows
forms similar to excel. Basically I need to freeze a pane when a user
scrolls horizontally in a windows datagrid.
Thanks, Tag: Controls inside mdifrom Tag: 93308
ComboBox autofiltering items - using RowFilter
Hi guys!
I need a help from you.
I would like to do an autofiltering ComboBox. There is a ComboBox as
DropDown style and its items come from a DataView. Well, when user types on
that control (Text property) it should filter the rows inside using the
DataView.RowFilter property and, in the same time, shows to user its items
(DroppedDown = True) already filtered. I've tried the following:
Private Sub ComboBox1_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyUp
Dim strRowFilter As String
strRowFilter = String.Concat("Name LIKE '%", ComboBox1.Text, "%'")
DataView1.RowFilter = strRowFilter
ComboBox1.DroppedDown = True
End Sub
As you can see, when the users types on ComboBox's Text property the event
KeyUp is raised. Then, its Text content becames a Filter string, eg. "John"
goes "Name LIKE '%John%'" and that string to RowFilter.
My solution for this issue isn't working. When I type the Text I can se the
items but for just the first letter.
Thanks in advance. Tag: Controls inside mdifrom Tag: 93306
Crystal Report After Export Load report failed
Dear all,
I encounter a problem with Crystal Report from Visual Studio which is
"CrystalDecisions.Windows.Forms.CrystalReportViewer".
The problem is, whenever I export a report to PDF,Excel and etc. it export
successfully, but when I click on the other report to try to view the report
it prompt "Load Report Failed".
This error only occurs after exported a report.
Please help. Thanks in advance.
Cheers,
Mae Tag: Controls inside mdifrom Tag: 93301
Get rows as shown on DataGrid (WYSIWYG)
Hi,
How do I get DataGrid to return all the rows that are currently displayed on
the screeen as seen by the user (WYSIWYG).
The main requirement is the users can scroll up-or-down the grid, and
refresh (retrieve the latest data from the database) the rows as seen by them
by clicking a "Refresh Shown Rows" button. However they do not want to select
any particular row (therefore I am unable to use any of the "Selected"
functions).
The DataGrid is binded to a DataView, which in turn is binded to a DataSet.
The DataGird has a fixed height, showing 12 rows at any time. Therefore at
any point of time I just need to refresh the 12 rows as seen by the user.
Pls kindly advise. TQ. Tag: Controls inside mdifrom Tag: 93297
RTF Text Box for a TreeNode?
I would like to have an RTF Text Box displayed as a Tree Node. I was
wondering if that has been done before. Basically I need to display some
formatted XML and the normal string display of the TreeNode doesn't seem to
handle it.
Thank you.
Kevin Tag: Controls inside mdifrom Tag: 93296
Windows HAndles C# to C++
I would liek to create a window in C# and pass the handle and the hInstance
to an unmanaged c++ dll for some DirectX stuff. I have many iterations and
get nowhere. The HWND gets an null reference exception. The HINSTANCE in
the C++ is not the same as the C# instance. Anyway here was the latest
C++
__declspec(dllexport) void CvpCSILibApp::setWnd(HWND win);
__declspec(dllexport) void CvpCSILibApp::setHI(HINSTANCE win);
in the C# Wrapper DSWrapper
System.IntPtr
p=Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0]);
DSWrapper.setHI(p);
and
DSWrapper.setWnd(myWin.Handle);
Any Help?
John
[ DllImport("vpCSILib.dll")]
public static extern void setWnd(System.IntPtr wnd);
[ DllImport("vpCSILib.dll")]
public static extern void setHI(System.Int32 wind);
In the C# implementation: Tag: Controls inside mdifrom Tag: 93294
Interfaces with vb2005 project
Hi,
I am developing a windows project.
In one of my form I have few procedures and functions. Everything is working
great.
Now I am told to do it through interfaces, means create a interface class
and then implement it. I am little concern doing it.
1. Do we really have to create a interface when we have to implement it ONLY
in one class nowhere else.
2. Are there any performance issues when we are using interfaces methods
instead of method with not interfaces implement.
Also I want to know when is the right time to use Interfaces.
Thanks in advance,
Mike Tag: Controls inside mdifrom Tag: 93291
VSTO modal form question
Hello
I'm working on a Microsoft Word VSTO (Visual Studio Tools for Office)
project (2003). The 'host' Word document has a custom command button
which brings up a Windows Form via the following (C#) code
private void RunScript_Click( Office.CommandBarButton Ctrl, ref
Boolean CancelDefault )
{
__pyScriptForm = new PyScriptForm( this.ThisApplication );
__pyScriptForm.Show();
}
where 'ThisApplication' is of type
/Microsoft.Office.Interop.Word.Application/.
This form is used to run scripts written in Python, capture their
'StdOut', and write it to the underlying document. This works as I
want - as the script runs, the output appears on the document below.
However, I think it would be preferable if the form were shown modally
- the document shouldn't be accessible while a script is running, and
there's a Cancel button on the form that will stop the script. But if
I do this ( with ShowDialog rather than Show ), then the written output
doesn't show up until the Form is closed. It's more satisfactory if
you get the data appearing right away.
Can I have my cake and eat it with this - ie. have a modal form, but
also see the script output?
TIA
G.F. Tag: Controls inside mdifrom Tag: 93289
Windows Form Designer Formatting
I use the designer in Visual Studio .NET 2003, and I really don't like
the way it automatically generates some things. For example, I don't
like the extra bloat of everything having System.Windows.Forms when
it's alread imported. I know there are situations where it can cause
naming collision, but those don't apply here and I want to do away with
the qualified namespace name.
Any thoughts? Tag: Controls inside mdifrom Tag: 93285
SplitContainer Question
I dropped a split container onto a form, it's vertical and I can see the
splitter bar OK and move it left to right. Then I dropped another split
container in the right panel (panels2) of the first splitcontainer set it to
horizontal. When running the app the application splitter bar of container2
in Panel2 of Container 1 is not visible.I can drop controls on the two
panels of container2, but I can't resize the panels of panel 2 because the
separtion line between the two doesn't show when running the program.
What do I have to do to have the second container's panels be resizable?
Thanks for any help.
Bob Tag: Controls inside mdifrom Tag: 93276
PropertyGrid Mouse-Events
Why do I not get Mouse-Events like MouseClick, MouseUp or MouseDown from the
PropertyGrid? Tag: Controls inside mdifrom Tag: 93272
Cusomt controls no longer showing up in the toolbox - 2005 RC1 problem
Hi,
I have created several libraries of windows form custom control written
using Visual Studio 2005 Beta 2. I recently upgraded to RC1.
The problem:
When building the solution in Beta 2, the toolbox would automatically update
by adding all custom controls from all projects found within my solution.
In RC1 this is no longer the case. Custom controls simply do not show up.
Even if AutoToolboxPopulate is true.
Anyone had this problem and found a solution? Any help would be greatly
appreciated.
Thanks,
...Marc Tag: Controls inside mdifrom Tag: 93271
DrawString calls inconsistant in Paint Handler!
Hi,
I am using Graphics.DrawString in the paint handler of a label.
The text comes up and behaves as expected on all events such as resize of
the lable control.
The problem is when i move a messagebox/ another application( say notepad )
across the lable.
In this case a clean repaint of the text fails to appear. The text gets
drawn erratically or altogether disappears.
What could i be missing out on in this code.
I tried inheriting from System.Windows.Forms.Label and overriding the
onpaint method with same results. I had also tried
having the usercontrol as UserControlStyles.UserPaint.
I was trying to avoid having to create the Graphics object for the lable in
the main form as this is not advisable; but i
tried that also with even worse results.
Any help to get me have the paint handler working properly would be greatly
appreciated.
Regards,
//code snippet
private void lblMessage_Paint(object sender, PaintEventArgs e)
{
if( lblMessage.Text != "" )
lblMessage.Text = "";
Graphics g = e.Graphics;// Graphics.FromHwnd( this.Handle );
//g.SmoothingMode = SmoothingMode.AntiAlias;
StringFormat sf = new StringFormat();
sf.Trimming = StringTrimming.EllipsisCharacter;
sf.Alignment = StringAlignment.Center;
sf.LineAlignment = StringAlignment.Center;
sf.FormatFlags = StringFormatFlags.LineLimit |
StringFormatFlags.FitBlackBox |
StringFormatFlags.NoClip
;
g.DrawString (
strText,
this.Font,
Brushes.Black,
new RectangleF(
g.VisibleClipBounds.Location,
g.VisibleClipBounds.Size),
sf );
} Tag: Controls inside mdifrom Tag: 93270
PropertyGrid KeyProcessing
Hello,
Can someone from MS tell me, how the key-processing in the PropertyGrid(or
Controls in general) works?
How are the functions ProcessCmdKey, ProcessDialogChar, ProcessDialogKey,
ProcessKeyEventArgs, ProcessKeyMessage, ProcessKeyPreview, ProcessTabKey,
IsInputChar, IsInputKey affected?
When will they be called?
Which function of which control calls them?
What parameters will be passed to the functions?
...
A diagram with the parameter/message flow and function-call-tree with notes
would be nice!
I want to show a PropertyGrid on a transparent form. If ESC is pressed the
form should be closed with DialogResult.Cancel. If ENTER is pressed and the
no Control in the PropertyGrid (TextBox, ComboBox,...) is active the form
should be closed with DialogResult.OK Tag: Controls inside mdifrom Tag: 93269
Multithreaded Panel Visiblility
Hi everyone,
I've got myself a C# .NET 1.1 application I'm making where a docked
Panel that contains some progress bars etc. is being toggled between
Visible and not. Basically a user drags some photos into the window and
it activates a background thread that shows the panel, does some work,
and hides it again. If this is not in a separate thread, it works! I've
tried doing a manual Update(), and PerformLayout() calls, but nothing
works. The thread work happens, but the panel never shows. I've also
tried Application.DoEvents().
private void itemImages_DragDrop(object sender,
System.Windows.Forms.DragEventArgs e) {
ArrayList formats = new ArrayList(e.Data.GetFormats());
if(formats.Contains(DataFormats.FileDrop)){
//imageImportFiles =
(string[])e.Data.GetData(DataFormats.FileDrop);
imageImportFiles.Clear();
imageImportFiles.AddRange((string[])e.Data.GetData(DataFormats.FileDrop));
imageImportThread = new Thread(new ThreadStart(this.importImages));
imageImportThread.Start();
}
}
private void importImages(){
imageImportPanel.Visible = true;
imageLoadProgress.Maximum = imageImportFiles.Count;
imageLoadProgress.Value = 0;
ArrayList imageFiles = new ArrayList();
foreach(string filePath in imageImportFiles){
importDirectory(filePath, imageFiles);
}
imageLoadProgress.Maximum = imageFiles.Count;
imageLoadProgress.Value = 0;
foreach(string filePath in imageFiles){
string label = getFileName(filePath);
Image img;
int imgId;
ListViewItem item;
imageImportStatus.Text = String.Format("Importing {0}... ({1} of
{2})",
label, imageLoadProgress.Value+1, imageLoadProgress.Maximum);
Application.DoEvents();
try{
img = Image.FromFile(filePath);
}catch(Exception){
continue;
}
imgId = itemImageList.Images.Add(img, Color.Transparent);
item = itemImages.Items.Add(label, imgId);
imageLoadProgress.Value++;
}
imageImportPanel.Visible = false;
} Tag: Controls inside mdifrom Tag: 93268
Dragging icons in a ListView
Hi,
I still cannot believe there isn't a standard property (or set of
properties) that would allow me to drag, move and rearrange icons in a
standard ListView .net control!
I was trying different combinations of properties (like AutoArrange =
False, and many others...), but it looks like it does not work unless
you handle some of the events (OnBeginDrag etc...). It would seem
natural to think that such a basic functionality would be provided via
standard property, but so far I have not found a way... Does anyone
know a way to do this by settings without having to write code?
Thanks,
Ivan Tag: Controls inside mdifrom Tag: 93266
MDI form question.
I have a MDI container form that l load client forms into. When I set the
FormBorderStyle to None before calling show on the client form, I can resize
the container form and if there are unseen areas of the child, it shows the
horizontal and vertical scrollbars (that's fine).
However, I want the FormBorderStyle set to Sizable so that I can treat them
like Excel workbooks and minimize, maximize, and move around however I want.
So I set FormBorderStyle to Sizable and the child's windowstate is set to
maximized. The PROBLEM is that when the container form is sized to a smaller
size so that the child form has unseen areas, there are no scrollbars and you
cannot get to those unseen areas of the child without restoring down the
child. That is similar to Excel, except in Excel when the workbook is
maximized and the container is smaller than the workbook, there are
scrollbars available so that you can get to the unseen areas of the child.
How can I duplicate how Excel handles this? Tag: Controls inside mdifrom Tag: 93264
VB2005 Project with Source Safe
Hi,
I want some expert's advice.
Two ways we can use source safe.
1. Use Souce Safe explorer and Check In / Check Out from there
2. Add Project to source safe and do Check In/ Check Out from from Visual
Studio solution explorer.
I want to know which one is better to use or most commonly used and why.
Thanks,
Mike Tag: Controls inside mdifrom Tag: 93261
ClickOnce Server Name
Hi,
So far we were using No Touch Deployment (Framework 1.1) to run the
application.
Using No Touch Deployment when we run command Application.ExecutablePath it
gives the full url from where the application executed. Like
http://ServerName/CompanyName/Application.exe.
Now we are trying to use ClickOnce Deployment Technology. Everything works
great.
But, when we run the command Application.ExecutablePath or
Application.StatupPath it gives local temp directory path.(where it
installed the application).
My question is how do I get the full url or the server name from where it
downloaded the files.
Thanks in advance,
Rob Tag: Controls inside mdifrom Tag: 93259
Freezing datagrid columns
I'd like to set up a datagrid so that, when the user scrolls right, the
first column (I'm only after one column at the moment, a method that coped
with multiple columns would be nice) remains where it is. i.e. similar to
the freeze panes command in Excel.
I've seen that lots of people have posted this question in the past, but I
haven't seen an answer. I've tried Ken Tucker's ColoredGridColumn class
but it doesn't work for me. I've seen the idea of using two datagrids side
by side but can't figure out what I'd need to do to override the events of
the vertical scroll bar on the right hand grid so that it automatically
applied to the left as well.
At the moment, my thought is just to completely remove the scroll bars and
replace with left and right buttons where 'right' will just remove from the
column style collection, and 'left' will add back in, but that is obviously
a non-standard UI so I'd rather not do it that way.
Anyone have any details of a good way to do this? Tag: Controls inside mdifrom Tag: 93258
How to display sub-object property in a DataGrid?
I have two classes, say A and B. Class A has a property of type B. For
example:
class A
int ID
B SubObject
class B
string Name
I bind my DataGrid to class A. I want to display B's Name property.
I have code like:
DataGridTextBoxColumn col1 = new DataGridTextBoxColumn();
col1.MappingName = "SubObject.Name"; // this does not work
How to I tell the DataGrid to display a property from a sub-object of class
A?
I saw this question asked a few times on the Net, but never had an answer.
Maybe it's not even possible...
Thanks. Tag: Controls inside mdifrom Tag: 93252
Tab Control and Combo Box (bound)
I have a combo box that is on a tab page in the tab control. The combo box
is bound to a dataset - I already know about the problem of having to set the
selected index twice to set it at -1. At runtime, when I go to another tab
page, the selected index is still at -1, but when I go back to the first tab
page where the combo box is, the selected index of the combo box is set back
to 0, and there is text in the combo box. The SelectedIndexChanged event
does NOT fire. Does anybody have a workaround for this? Tag: Controls inside mdifrom Tag: 93250
SaveAs with WebBrowser Control
Hi
I have used WebBrowser control and i want to save the entire webpage
including pictures etc. I am using ExecWB method of WebBrowser control
with OLECMDEXECOPT_DONTPROMPTUSER flag (as in folowing statement)
ie.ExecWB(OLECMDID.OLECMDID_SAVEAS,
OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER,ref Outfile, ref _null);
, but it opens a SaveAs dialog box. Also, if I click on Save, the page
is saved without the images and other resources.
I want automatically save the webpage without using save as dialog box.
Does anybody know how to get this done.
Thanks in advance.
Regards,
Abhishek Tag: Controls inside mdifrom Tag: 93238
Controls moving down
Sometimes, after saving the form in VB.Net Form Designer, I see the
controls inside a group box moving down. All the forms are inherited
from a simple base form, which contains a label and a toolbar on the
top. The form's borderstyle is sizable.
Any ideas?
Thanks in advance for your help
Alfio Finocchiaro
http://www.studiotecnia.com Tag: Controls inside mdifrom Tag: 93237
OnPaintBackground vs. Scrollbar
Hi,
I have a user painted backgrounf form.
When form has got a scrollbar I run into trouble with drawing.
I get the ClipRectangle in the EventArgs. It is depends on the graphics
face, not the virtual (I mean that if I have a from with 400px of height and
have a control at 600px and I scroll to the control I will get a
ClipRectangle with Y like 25px, not 575px with 200px height).
Even I cannot ask the virtual clientsize of the form, only the displayable
face through Form.ClientSize. There is a PrefferedSize property, but it
gives the form.Height value, not the ClientHeight... So I have determine the
"border" of the form...
But even complicated with scrollbar...
So the real question is:
Do I miss something or missunderstood with OnBackground paint +
ClipRectangle + Scrollbar.Value and Scrollbar.Maximum (which does NOT gives
the PrefferedSize.Height if it is the VScrolllbar.Maximum property)?
Or what is the nice solution to handle the scrollbar value and draws the
exact face of the background (if the face of the background as big as the
virtual size of the form)?
Thanks.
lelez
-----------------------------------
http://www.lelez.hu
http://www.csitcset.hu
ICQ: 177465172 Tag: Controls inside mdifrom Tag: 93236
How can I have only one instance of a Windows form application
I recall from MFC that one could arrange to have only one instance of an
application running. I there a way to have only one instance of a C# Windows
Form application running under a user logon? The idea is to have only one
process running the application at any time. Tag: Controls inside mdifrom Tag: 93232
Add satellite assemblies to a signed assembly???
Hi all!
Is it possible to add a satellite assembly containing resources with
localized strings to an existing assembly that has been signed with a
unknown private key?
My problem:
I have a third party product with Windows Forms controls that uses
resource files. There are however no resource file for Swedish
included.
So would it be possible to create a resource file with the Swedish
translation, compile it to a satellite assembly and have the third
party assembly (that is signed with an unknown private key) use my new
resource file?
(Note: I'm not interested in sending my translations to the third party
manufacturer and ask him to sign my satellite assembly)
Maybe it is impossible for security reasons???
Or could there be some nice solution to this problem?
Question 2:
Lets say that I'm about to create a WindowsForm gui controller that I
would like to distribute in a signed assembly. Then I would like the
users to be able to create their own recourse-files (with their own
translations).
What must I do to accomplish this?
Regards
/Stefan Tag: Controls inside mdifrom Tag: 93228
track app activation
I want to know wether the application is active or not.
I have inspector/tool windows, not attached to a particular window.
and I want to hide/show them wether or not my aplication is active.
I've tried to setup an IMessageFilter listening for:
const int WM_ACTIVATEAPP = 0x001C;
but it's never dispatched! (in the IMessageFilter)
Any other suggestion?
--
Regards,
Lloyd Dupont
NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com> Tag: Controls inside mdifrom Tag: 93219
Invisible combobox.
I set up a combobox with Visual Studio 2003 and it generated the following
code:
//
// serverComboBox
//
this.serverComboBox.DropDownWidth = 121;
this.serverComboBox.Items.AddRange(new object[] {
"AllServers",
"1Server",
"2Server",
"3Server"});
this.serverComboBox.Location = new System.Drawing.Point(136, 16);
this.serverComboBox.Name = "serverComboBox";
this.serverComboBox.Size = new System.Drawing.Size(121, 21);
this.serverComboBox.TabIndex = 0;
The problem is that the items are not displayed in the drop down. If I
select the second item then the combo box text seems to get set to the right
value (in this case "1Server" but I don't see any of the items that I am to
select until it is selected and the combo box text is set to the selection.
How can I enable the viewing of the combo box items?
Thank you.
Kevin Tag: Controls inside mdifrom Tag: 93217
passing sql server 2000 values with visual basic.net
In a visual basic.net 1.1 windows application, I need to pass required and
optional values from a sql server 2000 table for a windows application to
process. Each of the 250 columns in the sql server 2000 database table are
options on how a windows application with process. The user will pick all the
options they want and then hit a submit button.
I am trying to decide how to pass all these options to the business logic
layer that will do the acutally processing. Each row in the sql server 2000
database contains the 250 optional ways for processing. Would it be better to
pass these values in a collection, struct, serialization, and/or some other
way? Would you show me some code and/or url on how to accomplish this task? Tag: Controls inside mdifrom Tag: 93216
Plugin Architecture Question - Best Practice For Forms Update
Plugin Architecture Question - Best Practice For Forms Update
I have an application that follows a simple plugin architecture. Yes,
it is my first plugin app, so please bear with me. There is an
interface defined, and followed by the host exe and plugin (or client)
dll. The plugins reach out into the world and get bits of information
(stock prices, new mail, disk space, rss feeds... whatever) these bits
of information end up as treenodes in a treeview in the host app.
My question is:
When a plugin is ready to deliver updated content, say perhaps by use
of a timer, what is the preferred way of notifying the host app?
(assuming that my plugin will be in a seperate thread)
Should I pass a reference to the form?
Do I raise an event?
I know that you should operate on winforms in the originating thread
only , so they don't play well with refreshes sent from timer threads
(or any other thread). I am able to use invoke to get around a few
things, but I was hoping to find a simpler solution, and wanted to hear
some opinions. Tag: Controls inside mdifrom Tag: 93215
Dragging and rearranging images in a ListView control
Hi
I am trying to use a ListView control displaying large icons in a View
= LargeIcon.
I want to be able to move around the displayed icons with the mouse by
dragging the icon within the ListView and rearanging them. I was trying
this by playing with different properties in the ListView control
itself or with the Items properties and the elements of the ImageList.
However, I could not find a properties combination that would allow me
to do this. Is there such an out-of-the box functionality in the
ListView control, or do I need to handle events (Drag-related) in order
to implement this?
Thanks a lot,
Ivan Tag: Controls inside mdifrom Tag: 93213
Problem with DataGrid and an array
Hi,
I'm binding an array to a DataGrid. I only want some of the array's data to
show up. So I used DataGridTableStyle and DataGridColumnStyle. But whatever
I tried, my DataGrid shows all of the array's data, and non of my custom
settings seems to be working at all. Are DataGridTableStyle and
DataGridColumnStyle only for DataTable?
My code looks somewhat like:
DataGridTableStyle ts1 = new DataGridTableStyle();
ts1.MappingName = null;
ts1.AlternatingBackColor = Color.LightGray;
// Column 1
DataGridColumnStyle col1 = new DataGridTextBoxColumn();
col1.MappingName = "Name";
col1.HeaderText = "Name header";
col1.Width = 200;
ts1.GridColumnStyles.Add(col1);
// Column 2
DataGridColumnStyle col2 = new DataGridTextBoxColumn();
col2.MappingName = "tel";
col2.HeaderText = "Tel header";
col2.Width = 500;
ts1.GridColumnStyles.Add(col2);
this.DocumentsGrid.TableStyles.Clear(); // probably not needed
this.DocumentsGrid.TableStyles.Add(ts1);
MyClass[] myArray = BusinessClass.GetItems();
this.myDataGrid.SetDataBinding(myArray, null);
Thanks. Tag: Controls inside mdifrom Tag: 93212
SelectedIndexChanged not firing on mouse click
I'm running into a strange problem (or at least it seems strange to me). I
have a standard list box (System.Windows.Form.ListBox) on a form and I'm
trying to trap for activity on the SelectedIndexChanged event. It works fine
if you change the selected item via the keyboard (arrow keys), but if you
click on a different item, the SelectedIndexChanged event is not getting
fired.
Has anyone else experienced this weird behavior? If so, is there a solution?
Or am I just looking in the wrong place and should be concentrating on a
different event?
Thanks!
evan stone | software engineer
----------------------------------------
santa rosa, ca, usa Tag: Controls inside mdifrom Tag: 93211
hello to all.
Is there any chance to have control like a picture box or any other control
inside a mdifrom and make then stay behind any mdichild form?