MessageBox problem
Hello,
I'm trying to achieve the following:
1. Have a windows form open a modal MessageBox (with MessageBox.Show())
2. Minimize (or hide) this form along with the open MessageBox.
3. Restore the form, so it returns to its original state - with the MessageBox open modally above it (and at the same place in the form code of course - the call to the MessageBox.Show() method.
My problem is whenever I hide the MessageBox (using the Hide method or Win32 api call) the MessageBox.Show() method returns (as if the MessageBox has been closed). How can I avoid this behavior and achieve steps 1-3?
Thanks. Tag: DataGrid ScrollBar Tag: 65464
Remote Access Service Window
Hi,
How to call the remote access services window from vb.net ?
I would like to launch to this window when I m not connected to the
internet.
Thanks for your help
Stan Tag: DataGrid ScrollBar Tag: 65458
Cannot open derived form in design view if the base form is marked 'abstract'.
Hi folks!
I have a BaseForm class that inherits System.Windows.Forms.Form. It has a
property, whose value I need supplied by the class that inherits it. The
BaseForm usees the value supplied into this property in its Load event.
So, I gave the BaseForm and the property 'abstract' modifier, and put the
implementation of the property in the inherited class; say MyForm. However,
when I did this, I no longer can open MyForm in the design view. I'm stuck
if I can't visually design MyForm.... :(
Would appreciate any input, even if it means altogether different way to
accomplish.
thanks!
-Yasutaka Tag: DataGrid ScrollBar Tag: 65454
Resize to "Normal" from Maximized fails with ClientSize reset to {0,0)!?
The problem: WinForms app with main form and one NotifyIcon (called
sysTrayIcon in my code). Main form starts out minimized with ShowInTaskBar
= False. Double clicking on the system tray icon displays the form. All
looks/works well except....
If you:
[1] start the app
[2] double-click on the system tray icon to display the ("normal" sized)
main form
[3] maximize the main form
[4] minimize the main form
[5] double-click on the system tray icon to re-display the (still
maximized) main form
[6] click the "normal size" button (between minimize and close in the
title bar)
the main form now displays nothing more than the title bar, as if there were
no client area at all. What the heck is that?!
Looking at the messages going through the message pump it looks like the
main form is being sized correctly the first time, but is then being resized
down to 0,0 twice. Why is that happening???
Here's the custom bits to add to the default WinForms app:
private void Form1_Load( object sender, System.EventArgs e )
{
this.WindowState = FormWindowState.Minimized ;
this.ShowInTaskbar = false ;
}
private void sysTrayIcon_DoubleClick( object sender, System.EventArgs e )
{
this.ShowInTaskbar = true ;
this.WindowState = FormWindowState.Normal ;
}
private void Form1_Deactivate( object sender, System.EventArgs e )
{
if( this.WindowState == FormWindowState.Minimized )
{
this.ShowInTaskbar = false ;
}
}
This has me puzzled. I'm not much of a UI guy (as if you couldn't tell).
The cause *is* related to my code (shown above) because the default WinForms
app doesn't do this (already checked).
Many thanks in advance for any help you can offer.
-Jason Tag: DataGrid ScrollBar Tag: 65450
Display menu items programatically in C#
Hi,
I was wondering if it is possible to display menu items inside code, i.e. to simulate the click event to menu items. E.g. menu File has a number of menu items( new, open, ... ). I want to display those submenu items programmatically.
Thanks for your kind help in advance.
(Sorry I did not indicate which language is it.)
Michael Tag: DataGrid ScrollBar Tag: 65449
Display menu items programmatically
Hi,
I was wondering if it is possible to display menu items inside code, i.e. to simulate the click event to menu items. E.g. menu File has a number of menu items( new, open, ... ). I want to display those submenu items programmatically.
Thanks for your kind help in advance.
Michael Tag: DataGrid ScrollBar Tag: 65446
Hide from Task Manager
I have a program that I wrote that sits in the system tray. I would like the
to make this invisible to the Task Manager. I know that you could do this
fairly easily in Windows 95/98 with the RegisterServerProcess API call. This
has been removed from Windows 2000/XP and I would like to know if anyone
know how to accomplish this. Any code or sources of code would be
appreciated. Tag: DataGrid ScrollBar Tag: 65443
Typed DataSet
How come a Typed Dataset has a name(DataSet1) and a datasetname(DataSet)? I only seem to use the the name and not the datasetname. Tag: DataGrid ScrollBar Tag: 65442
Binding a PictureBox Control to A ImageList - what field to bind to?
I am trying to bind a simple ImageList Control to a PictureBox. I
can't seem to find in documentation, or through trial and error, the
right ImageList data member to bind to. Nothing seems to work. The
code below attempts to bind the PictureBox "pbMain" to the ImageList
"ilPics" which is successfully loaded with images from a test
directory. The question mark in the "DataBindings.Add" method
indicates the parameter in question. Has anyone else successfully
done this and could you help me out?
private void PicView_Load(object sender, System.EventArgs e)
{
// Get all files in sample directory
DirectoryInfo dirImages = new DirectoryInfo("C:\\data\\All
Images\\image.assets");
foreach (FileInfo file in dirImages.GetFiles())
{
if (file.Extension == ".jpg")
{
Image myImage = Image.FromFile(file.FullName);
ilPics.Images.Add(myImage);
}
}
// bind to picture box
pbMain.DataBindings.Add("Image",ilPics, ?);
} Tag: DataGrid ScrollBar Tag: 65430
Retrieving accessible objects from treeview32
I am trying to generate a gui test for a treeview32 form which was created
by a c# application on .net. I am using the pearl AO class in the win32 ActApp library. My script
works fine for other applications I have tested not written with c#. When I
try searching the accessible object tree of the c# treeview32 form I get
undefined values for the Application tree node. Any ideas whats going on?
This is where the output from the AO tree dies.
menu bar:Application {invisible,(0,0,0,0),id=0,00120a02}:
?:(undef) {?,(location error),id=-4,(no HWND)}:
Thanks,
Jonathan Tag: DataGrid ScrollBar Tag: 65429
Changing compile order within a project
I started with two projects in a solution, one containing a BaseForm and the
other an enherited ChildForm. I decided to move the BaseFrom to the second
project and changed the inherited form to look in the local project for its
parent. However, until the baseform compiles, the child form cannot find it.
I am guessing that I may need to change the compile order in the second
project to compile the baseform BEFORE the associated enherited forms.
Am I correct and, if so, how to I change the order? Tag: DataGrid ScrollBar Tag: 65427
How to use windows forms controls in a visual c++ app
In Visual Studio 7 I have a C++ dialogbased MFC application project. When I open the main form of my application the only available tools from the toolbox are those in the "Dialog Editor" section. The components in the "Windows Forms" are all disabled so I can't e.g. add a mainmenu to my project. Why are these components not available when I'm in this mode (in a c# project they are all available) ? How do I add a main menu and panel component to my C++ form ? Tag: DataGrid ScrollBar Tag: 65424
ANN: SharpLibrary 1.37 Released
Main features of this release are:
1- A great number of controls --where applicable-- now support XP Themes and
in some instances even an Office 2003 like look.
2- Two new controls: IPAddessCtrl and LabelEx control have been added to the
ToolBox. (This brings the total count to 52).
3- Ten new samples showcasing all of the new features added to the library.
(This brings the sample count to 70).
For a detailed breakdown of all changes in new version, take a look at
http://24.199.8.122/LatestRelease.aspx
Regards,
http://www.sharplibrary.com Tag: DataGrid ScrollBar Tag: 65422
GetWindowLong on GWL_EXSTYLE fails with error 127
Simple, really. I have C# code in a Windows Form, thus:
int rc;
rc = Win32API.SetParent(ctrl.Handle, new
IntPtr(Win32API.GetDesktopWindow()));
rc = Win32API.GetWindowLong(ctrl.Handle, Win32API.GWL_EXSTYLE);
if (rc == 0) {
System.Console.WriteLine(Marshal.GetLastWin32Error());
}
where ctrl is a control on the form (it doesn't seem to matter what
type of control), and Win32API has all the relevant imports:
[DllImport("user32.dll")]
public static extern int SetParent(IntPtr childHwnd, IntPtr
parentHwnd);
[DllImport("user32.dll")]
public static extern int GetDesktopWindow();
[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
I'm doing this as a precursor to making the control a custom drop-down
of sorts (subsequent lines will set WS_EX_TOOLWINDOW, HWND_TOPMOST,
etc. and subclass the GWL_WNDPROC for mouse handling etc.), but I
don't even get that far. In all cases GetWindowLong returns 0, and the
Win32Error is 127 (which decodes as 'The specified procedure could not
be found.')
Anyone successfully done this from .NET? Tag: DataGrid ScrollBar Tag: 65418
ComboBox Items problem
Hi....I have a problem with the combobox it's that it show the System.Data.DataRowView in the ListItems...What is the problem if a set my combobox with a datatable and that datatable have the data to show Tag: DataGrid ScrollBar Tag: 65412
MDI Form Problem
I have an MDI form as a controlling form for my application
I do have several MDI Child Forms that are displayed within the app., but only ever 1 at a time
The problem is, when loading one of the forms, the MDI parent appears to go transparent for a second or so whilst the MDI child is loaded. I think it is due to processing the running in the form load event
I have tried Suspend / resume layout, hiding the form, minmizing the form etc. but nothing seems to work.
Any suggestions please
Thanks Andy Tag: DataGrid ScrollBar Tag: 65393
MenuItem tooltips
Is there some way of having Tooltips in a menu item? So far I have found no
such method.
If this is impossible, is there some other way of displaying hint
information, such as changing the status bar text depending on what menuitem
is highlighted? Any easy way to go about doing this? Tag: DataGrid ScrollBar Tag: 65388
Programm uses 90% of the CPU
Hi *,
has anynone the same problem or a solution?
If my App is minimized it will use about 90% of the cpu after 5 minutes. The
App doesn't do anything(like timers or stuff like this).
Thanx a lot
Tobi Tag: DataGrid ScrollBar Tag: 65386
Hashtable enumeration
How can I loop thru a hashtable changing the Value of each entry ? Whatever
I try I always seem to get the error about modifying the collection within
the loop. Tag: DataGrid ScrollBar Tag: 65377
Assistance with datagrid required
I have a simple SQL query that is executed when a command button is
clicked. This populates a datagrid and is working fine.
I have three radio buttons on the same form and when one of the radio
buttons is CHECKED and the command button is pressed, a different query is
executed, but the returned records are appended to the first record set.
I would like to clear the contents of the datagrid when the command button
is clicked and the radiobutton is checked, then populate the data with the
recordset returned from the query.
Any ideas?
Aaron Tag: DataGrid ScrollBar Tag: 65375
DataGrid Data Validation Question
Hi all!
I have a datagrid control that I would like to have some data validation
before saving it to the database.
Is it possible that I could implement a data validation while the datagrid
is in an edit mode?
Thanks a million!
-A Tag: DataGrid ScrollBar Tag: 65374
capture the mouse (to grab the window content) [not with SetCapture and not with hooks]
Hi there,
I write a small applicaiton in C# to mimic the SnapShot/32 application
functionality. I use Win32GDI rountines to grab the images and this is the
easy part.
The difficult part is to mimic the SnapS way of letting user to select a
window he/she wants to snap. It works like this:
1. the user does whatever he wants in the system
2. he/she presses some hotkey (RegisterHotKey) and the SnapS gets active
(but does not show its window)
3. instead the mouse cursor is globally changed to a cross and globally
captured until the first click
4. when the user clicks a window, its image is captured
my problem is the number 3. I've tried to capture the mouse with
SetCapture/.Capture = true but it does not work when the capturing window is
not a foreground window. I also try to change mouse cursor shape globally
with no results. I am sure that SnapS does not use any hooks (and I also do
not want to).
the question is: how the described functionality is achieved?
thanks for any clues,
Wiktor Tag: DataGrid ScrollBar Tag: 65372
Showing animation on a form
Hi All
How some application shows animation to show if some progress/processing is
going on.
like especially in the end of some wizard, the application shows animation
on a form, animation like we see when copying of files is being done.
is that done by showing some animated gif? If an animated gif then how to
display an animated gif on a form.
Thanks
NOOR Tag: DataGrid ScrollBar Tag: 65369
help provider problems
Hi,
I have seen a number of people who have posted that if you keep on pressing
F1 on a control with help provider, it crashes your application. Same thing
is happening with me. Every time some microsoft person says that they have
been unable to reproduce the bug. Is there any workaround? Has this bug been
fixed in some later releases? If this is not solved, then it means that we
cannot provide any help in a dotnet application? Tag: DataGrid ScrollBar Tag: 65362
How To Load Bitmaps
Hi All,
I have a C# project, I added 2 bitmap images, 1.bmp and 2.bmp in the project
by right clicking and using the add existing item dialog. The bmp files now
appear in the solution explorer. My question is, do they get embedded in the
assembly? When I use the code as
System.Drawing.Bitmap b =
(System.Drawing.Bitmap)Bitmap.FromFile("c:\\myimages\\1.bmp");
it loads the bitmap and works fine. There are 2 things, I do not want to
hard code the path as somebody else might have the project somewhere else.
Ideally I would want to load the image from the assembly, but when I do
ResourceManager rm;
rm = new ResourceManager("<MyAssemblyName>",
Assembly.GetExecutingAssembly());
System.Drawing.Bitmap bt;
bt = (System.Drawing.Bitmap)rm.GetObject("1.bmp");
it does not load the bitmap. I think I am missing something very basic over
here. Can anybody point to what might be wrong?
TIA,
--Saurabh Tag: DataGrid ScrollBar Tag: 65359
DataGrid flushing changes to DataSet.
Hi all,
I´ve seen around there, that many people have problems forcing the
datagrid control to flush the changes to the DataSet.
To do so, you only have to invoke the CurrencyManager.EndCurrentEdit()
method.
At least this worked for me. Tag: DataGrid ScrollBar Tag: 65355
DataGrid flushing changes to DataSet.
Hi all,
I´ve seen around there, that many people have problems forcing the
datagrid control to flush the changes to the DataSet.
To do so, you only have to invoke the CurrencyManager.EndCurrentEdit()
method.
At least this worked for me. Tag: DataGrid ScrollBar Tag: 65354
DataGrid flushing changes to DataSet.
Hi all,
I´ve seen around there, that many people have problems forcing the
datagrid control to flush the changes to the DataSet.
To do so, you only have to invoke the CurrencyManager.EndCurrentEdit()
method.
At least this worked for me. Tag: DataGrid ScrollBar Tag: 65351
DataGrid flushing changes to DataSet.
Hi all,
I´ve seen around there, that many people have problems forcing the
datagrid control to flush the changes to the DataSet.
To do so, you only have to invoke the CurrencyManager.EndCurrentEdit()
method.
At least this worked for me. Tag: DataGrid ScrollBar Tag: 65350
keypress handling
I need to implement keypress handler that works anywhere on a form (actually so long as I am on one of several tab pages on my form which is basically a tab control with 4 pages. Here is the problem - my TabControl.Keypress handler intercepts the keypress only of one of the grids on that same tab does not have focus. Essentially, once I select a row on a grid, my handler no longer receives keypresses, as they are now aparently directed to the selected grid. The handler is invoked if I am editing one of the edit controls. How can I intercept ALL keypresses within the form/tab page? Do I have to resort to the windows message handler? Tag: DataGrid ScrollBar Tag: 65348
Crystal Reports Problem: Please reply ASAP
Hello All,
I have a Windows application that uses Crystal Reports 9 (bundled Version)
developed using VS.NET 2003 on a windows server 2003 m/c.
The application has to be deployed on the client machine that has Windows
XP installed. Before deploying we make sure that .NET framework 1.1 is
installed on the XP machine. In the setup project, for support for Crystal
Reports, we have added the following merge modules:
1)Crystal_Managed2003.msm
2) Crystal_Database_Access2003.msm
3)Crystal_Database_Access2003_enu.msm
4)Crystal_RegWiz2003.msm
5)VC_User_CRT71_RTL_X86.msm
6)VC_User_STL71_RTL_X86.msm
The problem we are facing is like this: Whenever the user tries to pull up
the reports, a database logon screen pops up for the report. I am unable to
figure out as to why this is happening only for Crystal Reports. All the
other functionality in the application is working fine without having to
specify the database connection information interactively. The database
server is not in the same network as this Client WinXP machine. We specify
the IP address of the DB server in the DB connection string. Could this be a
problem?
If someone has faced this problem earlier or has any solution to this
problem, do let me know. I need to resolve this problem ASAP.
Thanks in advance
Mithun Tag: DataGrid ScrollBar Tag: 65342
How to display My Network Places with FolderBrowserDialog
I am using the FolderBrowserDialog in my application and it works well. However, when it is displayed, it does not include "+ My Network Places" in the list of available locations. I notice that other Microsoft applications (like opening a .zip file and clicking browse) do include My Network Places. How is this done? Thanks! Tag: DataGrid ScrollBar Tag: 65340
MDI, maximize child window
Hi
I have a windows form which has the following: form1.IsMDIContainer = true and panel1.Dock = DockStyle.Right. Then I create a new child window and set its FormBorderStyle = FormBorderStyle.None and WindowState = FormWindowState.Maximized. But what happens is the right half of this child window is covered by the panel and it's still showing the header of the window (icon, name, min, max, and close buttons)
My questions
1. How do I make the child window maximize only on the left half on the parent window (not to make it behind the panel)
2. How do I hide the header of the child window when it's maximized
Please advice, thanks
-CL Tag: DataGrid ScrollBar Tag: 65339
control binding problem (MS, please respond)
I've run into a problem with binding form properties to data in an xml
file (through a dataset). As it turns out, I can easily bind if the
data type of the property on the control is a normal datatype such as
a string or integer. If the datatype is not one of the built-in types
however, things go horribly wrong. Consider this xml file:
<?xml version="1.0" standalone="yes"?>
<SettingsData>
<one>
<Text>Center</Text>
</one>
</SettingsData>
If I create a normal winforms application and add the following code
to the form's constructor, it works. I get "Center" in the text box.
Here's the code that works:
DataSet dataset;
dataset = new DataSet();
dataset.ReadXml(@"d:\development\bindtest\form.xml");
TextBox textbox = new TextBox();
Binding binding = new Binding("Text", dataset, "one.Text");
textbox.DataBindings.Add(binding);
textbox.Width = 150;
textbox.Height = 50;
textbox.Top = 50;
textbox.Left = 50;
textbox.Parent = this;
this.Controls.Add(textbox);
I hardcoded the size and placement of the text box, but I can easily
get that from the xml as well. I encountered a problem when I tried
to pull TextAlign from the xml file though. I know that this would
require the use of Format, so I implemented that. I changed the xml
from above to look like this:
<?xml version="1.0" standalone="yes"?>
<SettingsData>
<one>
<TextAlign>Center</TextAlign>
</one>
</SettingsData>
And I changed the code from above to look like this (changed from Text
to TextAlign, and added the convert event handler):
DataSet dataset;
dataset = new DataSet();
dataset.ReadXml(@"d:\development\bindtest\form.xml");
TextBox textbox = new TextBox();
Binding binding = new Binding("TextAlign", dataset, "one.TextAlign");
binding.Format += new ConvertEventHandler(FormatHorizontalAlignment);
textbox.DataBindings.Add(binding);
textbox.Width = 150;
textbox.Height = 50;
textbox.Top = 50;
textbox.Left = 50;
textbox.Parent = this;
this.Controls.Add(textbox);
I also added the Convert Event Handler:
public void FormatHorizontalAlignment(object sender, ConvertEventArgs
cevent)
{
switch((string)cevent.Value)
{
case "Center":
cevent.Value = HorizontalAlignment.Center;
break;
case "Left":
cevent.Value = HorizontalAlignment.Left;
break;
case "Right":
cevent.Value = HorizontalAlignment.Right;
break;
}
}
This event handler looks right to me. I followed the example from the
help files. I've made similar code work with other data types such as
booleans being coverted from a T or F in the xml file. DesiredType
shows HorizontalAlignment.
When I run this code, oddly, the event handler is executed three
times. Each time seems to execute correctly. Then I get an unhandled
exception from the Application.Run(new Form1()); Error creating
window handle.
Can anyone tell me what's happening and how to fix it? I foresee I'll
have the same problem trying to read the font name and size from the
xml file. I have a workaround, but it's very unelegant.
Here's the stack trace:
System.ComponentModel.Win32Exception: Error creating window handle.
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.TextBoxBase.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef
hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at bindtest.Form1.Main() in d:\development\bindtest\form1.cs:line
109
tia, brian Tag: DataGrid ScrollBar Tag: 65336
Panel Control Question
I am stuck on something that must be simple. However, I have been searching the obvious places for several days but haven't come up with an answer:
I have a Panel control with a custom designer. The designer creates several designer verbs. When a verb is selected, I want to instantiate a new Panel control on the 'base' Panel control, and allow the designer to edit the new Panel control (i.e., add other controls). The designer verbs work fine. However, if I simply use .Add to add a new Panel to the 'base' Panel the newly added Panel shows up on the UserControl but cannot be edited. On the other hand, if I simply drag a Panel control from the Toolbox to the 'base' Panel I can edit it--which is the behavior I want.
The correct way to accomplish so it works this would be much appreciated! Tag: DataGrid ScrollBar Tag: 65332
DataGrid/DataView Display problem
I have a dataset table. I have filtered it and created a datview which I use as the datasource to a datagrid. That all works just fine. When I edit cells in the datagrid, then update the dataset table, the datagrid displays both the original row and the modified row. I only want to see the modified row. I have tried playing around with the DataViewRowState property. When I set it to ModifiedCurrent, no row is displayed. What am I doing wrong? Tag: DataGrid ScrollBar Tag: 65331
Forms designer bug
Hi
I have a simple base form from which I want to inherit the Icon. When I create an inherited form based in this base form, with no added controls, the Icon shows correctly. When I add any control to the form, the designer creates also a resource for an Icon (null icon) and overrides the base form Icon definition. I can correct this behavior manually commenting the me.Icon line, but every time a change a property on any control of that form, the Icon is replaced to a null Icon
It is a Bug of the forms designer? Is it reported? Is there a fix
Also, does someone knows where we can know of reported Bugs? I have VS 2003 and 1.1 framework
Mariano. Tag: DataGrid ScrollBar Tag: 65330
Error- No source code available for the current location
I'm getting a "No source code available for the current location" error randomly as I debug my app. Any idea of what may be causing this and suggestions to solve it will be really appreciated.
TIA Tag: DataGrid ScrollBar Tag: 65322
mdi child minimized issue
Hi,
when minimizing child forms in my mdi app the child form is being placed at
the lower left hand side of the mdi parent, but is reduced to a small block
the size of the close button. No titlebar text is visible and the icon is
drawn under the close button. This is really baffling me. Has anyone else
seen this?
any help is appreciated,
jim Tag: DataGrid ScrollBar Tag: 65321
A BMP file has three images in C# project
HI I have a question defined as below:
* One BMP file has 3 images for a list view control.
* Say, this file path is c:\ xyz.bmp.
* ImageList object name is smallImageList.
* My question is how to put the file path in the C# project.
* Then I can see 3 images in the image collection editor by open....
* And, I can refer it as below:
this.smallImageList.ImageStream = (ImageListStreamer)resources.GetObject("smallImageList.ImageStream");
Please advice.
Peter Tag: DataGrid ScrollBar Tag: 65314
Expamding empty ComboBox problem
I have noticed the following problem. If you try to expand the drop-down
list of a ComboBox (DropDownStyle=DropDown) with no items and immediately
attempt to click another control (displayed underneath the combo box, not
sure about other locations), nothing will happen. It takes several mouse
clicks before you are finally able to select other dialog controls. My guess
is that the combo box gets expanded, but since there are no items, the user
does not see the list box portion of it, so if the user tries to click a
check box, a button or some other control, this mouse click is obstructed by
the expanded (but not visible) list box (this is just a guess, so it may
happen for a totally different reason). This is very confusing for the
customer, because it appears like the dialog is hanging (i.e. there is no
response to the mouse clicks). Is this a known issue? Is there a workaround?
Thanks,
Alek Tag: DataGrid ScrollBar Tag: 65313
Control's Validating Event and closing a Form
We handle the Validating event for textboxes that are contained in a
GroupBox, which is contained in a TabControl which is contained in a Form.
If Validation on the textbox fails, we do this:
e.Cancel = True
Now, when we click "X' in the upper right corner, the form closes. We
checked the forms closing event, and now e.Cancel = False.
Why is e.Cancel = False on the Form close? Tag: DataGrid ScrollBar Tag: 65306
No Touch Deployment Warnings
When our smart client is loaded thru the browser, there is a balloon that
pops up with the following warning:
Microsoft .NET Security Information
This application is running in a paritally trusted context. Some
functionality in the application may be disabled due to security
restrictions.
The application works great and is doing everthing it is intended to. The
message is annoying and our client is complaining about it.
My question is that I want to know if there is a way to disable this without
touching the default security settings in the .NET Framework 1.1
Configuration app. The point is not to have the client have to download
anything extra to install or have them modify anything. How is this no
touch deployment if you do?
Thanks Tag: DataGrid ScrollBar Tag: 65303
Preventing user interaction while showing a "wait" cursor
I have a form which performs some asynchronous code. I want to display a
wait cursor when it starts, and hide the wait cursor when it has completed.
This part works fairly well, using:
this.TopLevelControl.Cursor = System.Windows.Forms.Cursors.WaitCursor;
I also want to prevent user interaction with the controls on my form while
the wait cursor is displayed, so that use events (except resize and cancel)
are blocked. What is the recommended way of doing this in .NET?
Thanks,
Aaron Queenan. Tag: DataGrid ScrollBar Tag: 65292
Has an Event been Fired?
When a control is clicked multiple events are fired in order. For example,
clicking on a combobox dropdown button fires the Enter -> Got Focus -> Click
event. In the "Enter" event handler is it possible to find out if the
"Click" event is going to happen?
I am trying to autoexpand the ComboBox dropdown when the control is entered.
Private Sub cboComboBox_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cboComboBox.Enter
cboComboBox.DroppedDown = True
End Sub
But if the ComboBox dropdown button is clicked the Enter event expands the
list and the Click event then closes it. In my Enter event handler I was to
find out if the Click event is going to happen to decide if I should expand
the combo list
Example:
Private Sub cboComboBox_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cboComboBox.Enter
If Not ControlHasBeenClick = True Then
cboComboBox.DroppedDown = True
End If
End Sub
Thanks,
Hex Tag: DataGrid ScrollBar Tag: 65288
Debugging with Break option in windows forms
I am trying to break into the VS debugger on unhandled exceptions in a form. I have tried setting and removing the jit settings in the application config file and in the options dialog. All I get on unhandled errors is the dialog with continue and quit - not with break. Isn't there a way to move from an application with debug build run from within VS to the line raising the exception?
I am getting the stack trace info in the dialog which does not help with the condition that I am attempting to debug.
Ken Tag: DataGrid ScrollBar Tag: 65286
changing appearance/color of the particular list item
Hi everyone.
I wonder if we can do this in .net.
I want to change the appearance of the particular list items in a
checkedlistbox control.
Can we change those particular items color for example change forcolor of
some items that belongs to some particular category just to highlight them.
best regards..
nOor Tag: DataGrid ScrollBar Tag: 65285
Problems with child forms
Hello!
I've got a problem. When I maximize my mdi and try to open some mdichild
forms maximized too, sometimes
appears more then one control box. And when i try to close them, it just
leave one of them opened, and no way to close it.
as it shows in the attachement.
Anyone knows what problem is this?
--
Cumprimentos,
Nuno Monteiro
nuno@rcsoft.pt
RCSoft - Desenvolvimento de Software, Lda.
Telef: 239708708
Fax: 239708701 Tag: DataGrid ScrollBar Tag: 65281
Building My Own DataSource Control
hi All,
I'm hoping to build my own datasource control, and hoped that someone would
point me in the right direction to start.
I have already created a class, which accepts a form, a tablename, a
connection and a collection of field object (which contain information about
which field binds to which form control).
I build all this in code, and then the class gets a dataset, binds the
controls to it, and allows modifiaction and updates etc. then saves them
back to the database.
However, I'd like to build a control, which would automate all of this, by
getting the fields at design time, and allowing the user to bind the fields
and then the user could simply change the connection string at run-time to
point to the correct database when deployed.
I am trying to kind of replicate the method by which you build bound forms
in access.
Any pointers to articles, or advice is greatly appreciated.
Thanks
Alex Tag: DataGrid ScrollBar Tag: 65280
Is it possible to make a scrollbar appear at all times on the datagrid?
"Gary Fehr" <joe@schmo.com> a écrit dans le message de
news:rYwQb.98911$VV4.20143@twister.rdc-kc.rr.com...
> Is it possible to make a scrollbar appear at all times on the datagrid?
>
> G
>
>