| Windows MessageBox: limit to number of lines? |
|
 |
Index ‹ Windows Forms ‹ Windows Forms General
|
- Previous
- 1
- 2
- Windows Forms General Is there a way to get print preview information from web control?
Hi Folks,
I have a win forms application used in the aviation industry with a very customized UI.
I'm using a web control to display some HTML docs within the forms app. I'm trying
to build in some print preview functionality. The print preview dialog UI has to match
the app's look and feel.
Does anybody know how I can get print preview info from the web control Info such as
number of pages. Better yet, if I could get some sort of a collection of page objects, that
would be just grand.
Thanks much,
Jake
- 3
- Windows Forms Data Controls and Databinding TableAdapter Wizard w/ optimistic concurrency @IsNull_ params invisible to ObjectDataSource
For the past few months we have be using the TableAdapter wizard to generate Procs with optimistic concurrency under these procedures, running Visual Web Developer Express, C#:
a) Table has a primary, autoinc identity key b) Set objectdatasource.conflictdetection = CompareAllValues in the ODS for the DetailsView c) Change ID field readOnly from True to False in DetailsView, per http://www.geekzilla.co.uk/ViewF9581DAE-CCF8-49FF-844C-7498603E0005.htm
Then we hit this roadblock: This table has 5 NULLABLE fields. The wizard generates the UPDATE PROC with TWO additional params:
@IsNull_Disposition nchar(10), @IsNull_OwnerDiv nvarchar(50),
The objectDataSource does not add these params, so the mismatch causes the "Update not found" exception.
Comments welcome. We have burned weeks on these wizards and hope some patch is forthcoming. This is close to being awesome.
BTW the Wizard should also create a _SelectByPrimaryKey PROC, which we manually do by tweaking the generated _Delete proc.
Kim
GO /****** Object: Table [dbo].[Applications] Script Date: 11/29/2006 13:13:46 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Applications]( [App_ID] [int] IDENTITY(1,1) NOT NULL, [Application] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Disposition] [nchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [OwnerDiv] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Purpose] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Technology] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Comments] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, CONSTRAINT [PK_Applications] PRIMARY KEY CLUSTERED ( [App_ID] ASC )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY]
TableAdapter Wizard with optimistic concurrency generates this:
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[usp_dsPat_Applications_Update] ( @Application nvarchar(50), @Disposition nchar(10), @OwnerDiv nvarchar(50), @Purpose nvarchar(MAX), @Technology nvarchar(MAX), @Comments nvarchar(MAX), @Original_App_ID int, @Original_Application nvarchar(50), @IsNull_Disposition nchar(10), @Original_Disposition nchar(10), @IsNull_OwnerDiv nvarchar(50), @Original_OwnerDiv nvarchar(50), @App_ID int ) AS SET NOCOUNT OFF; UPDATE [Applications] SET [Application] = @Application, [Disposition] = @Disposition, [OwnerDiv] = @OwnerDiv, [Purpose] = @Purpose, [Technology] = @Technology, [Comments] = @Comments WHERE (([App_ID] = @Original_App_ID) AND ([Application] = @Original_Application) AND ((@IsNull_Disposition = 1 AND [Disposition] IS NULL) OR ([Disposition] = @Original_Disposition)) AND ((@IsNull_OwnerDiv = 1 AND [OwnerDiv] IS NULL) OR ([OwnerDiv] = @Original_OwnerDiv))); SELECT App_ID, Application, Disposition, OwnerDiv, Purpose, Technology, Comments FROM Applications WHERE (App_ID = @App_ID)
Bind the objectDataSource and it does not find those params:
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" ConflictDetection="CompareAllValues" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="dsPatTableAdapters.Applications1TableAdapter" UpdateMethod="Update"> <UpdateParameters> <asp:Parameter Name="Application" Type="String" /> <asp:Parameter Name="Disposition" Type="String" /> <asp:Parameter Name="OwnerDiv" Type="String" /> <asp:Parameter Name="Purpose" Type="String" /> <asp:Parameter Name="Technology" Type="String" /> <asp:Parameter Name="Comments" Type="String" /> <asp:Parameter Name="Original_App_ID" Type="Int32" /> <asp:Parameter Name="Original_Application" Type="String" /> <asp:Parameter Name="Original_Disposition" Type="String" /> <asp:Parameter Name="Original_OwnerDiv" Type="String" /> <asp:Parameter Name="App_ID" Type="Int32" /> </UpdateParameters>
- 4
- Windows Forms Data Controls and Databinding XML to DataGridViewCheckBoxCell Problem
I've got a datagridview bound to a dataset that reads in an XML file that looks like so:
<root>
<item>False</item>
</root>
What I need is for this item to show up in the dgv as a datagridviewcheckboxcell instead of simply a textboxcell. I'm getting the text "False" show up in the cell when what I want is a checkbox. Here's what I'm doing in code, but it's not working:
dgv.Columns( "item").ValueType = System.Type.GetType("System.Boolean")
dgv.Columns( "item").AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells
dgv.Columns( "item").SortMode = DataGridViewColumnSortMode.NotSortable
dgv.Columns( "item").HeaderText = "Foo"
- 5
- Windows Forms Data Controls and Databinding need to trap space bar
Hi,
I need to pop up message while pressing non numeric character in numeric(bound) field of datagridview ctrl.
I'm using dataerror event. I get error message properly for all non numeric keys. for delete key i dont get error message.it just deletes the data in the cell. but if i press space bar my message from dataerror is showed. I just want , not to show this message and to delete the data. I want the space bar to work like delete key.
private void dgrid_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
MessageBox.Show("Please type Numeric value in the selected Column");
}
venp---
- 6
- Windows Forms General PrintPreviewControl connected with WebBrowser control
Hi
I'm using the WebBrowser control in VS2005
When I navigate to any page I want to show to the users a preview dialog of the page directly without show them the browser with the page loaded.
If I use WebBrowser.ShowPrintPreviewDialog() the preview is going to appear in a new windows showing the browser.
My question is:
Can I connect the webBrowser control with the PrintPreviewControl or the PrintPreviewControl works only with the PrintDocument control
Thanks
- 7
- Windows Forms General C# Form takes long time to close (Refresh!)
Hi All,
I have Windows application with one form, which calls Dll (windows control lib) to get user name and password and do the authentication.
After successful authentication, the control comes to main form, from there which does few database queries to load the grid control.
The problem is here, after successful login authentication, the login form does not getting closed while loading the grid control from the main form. The login control exists till we the grid control loads the data. Is there anyway I can avoid this. (I don't want to do this with threading or backgroundworker, because of grid scrollbar problem)
Thanks for any suggestion/thoughts.
- 8
- Windows Forms General Why Method gets called twice????
I have a value that i set when my form is closing but after the form is close the method that instantiated my form is called again and therefore resetting my values back to the default....any help with this issue
this method call for my form.....and this is also the method that gets called after i close the form which reset's my values back to defaults
| |
if(lblVendorName.Text == "Vendor") {
Tracking.UI.MainWindows.VendorOrderLegDetailsForm.DisplayVendorDetails(this.FindForm(), (Tracking.BusinessObjects.VendorOrderLegDetail)_OrderLegDetail);
} |
this is the method that actually shows the form and handels the event for closing the form after the last line executes it calls the itself again returning my values back to defaults
| |
public static void DisplayVendorDetails(System.Windows.Forms.Form ParentForm, BHFreight.Tracking.BusinessObjects.VendorOrderLegDetail _VendorLeg) { Tracking.UI.Controls.OrderLegData _OrderLegData = new .Tracking.UI.Controls.OrderLegData(); Tracking.UI.MainWindows.VendorOrderLegDetailsForm frmVendorLeg = new VendorOrderLegDetailsForm(); frmVendorLeg._VendorDetail = _VendorLeg; frmVendorLeg.LoadVendorObjectToForm(); bool bCanceled = frmVendorLeg.ShowDialog(ParentForm) == DialogResult.OK; FormClosingEventHandler handle = _OrderLegData.LoadVendorControl; if (handle != null) handle(frmVendorLeg, new FormClosingEventArgs(CloseReason.UserClosing, bCanceled));
}
|
- 9
- ClickOnce and Setup & Deployment Projects Interop.Word.dll System can't find file
I have an app that I have created an installer. Within the app I have some mail merge capabilities. All machines in our office use Office 2000(9.0). So I am using Interop.Word.dll. All works well in the VS 2005. The package installs fine with no errors. Everything in the app works fine until they go to do a mail merge. Then I get the following errors:
************** Exception Text ************** System.IO.FileNotFoundException: Could not load file or assembly 'Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null' at MTM.Classes.clsCrspUI.tsbtnPrintPreview_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- MTM Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/Mihlfeld%20%26%20Associates,%20Inc/MTM%20Installer/Output/MTM.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Data Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Transactions Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll ---------------------------------------- System.EnterpriseServices Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll ----------------------------------------
************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
<configuration> <system.windows.forms jitDebugging="true" /> </configuration>
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
I have used the gacutil.exe for .net 2.0 and I get the following error:
"Failure adding assembly to the cache: Attempt to install assembly without a strong name"
I am completely stumped....can anyone help.
Thanks!
Curt
- 10
- Windows Forms General Errors manipulating colletions with a Propertygrid
A time ago, I asked how I could manipulate a collection (exactly a List<string>) in a PropertyGrid, and someone write a link http://www.codeproject.com/cs/miscctrl/customizingcollectiondata.asp
Apparently it would solve my problem. But when I try the example I found that when you delete all the collection's items or delete all the collection's items except only one, the collection index was bigger than the collection size, what gives a big exception. Apparently, the whole code seems to me correct and I can't find an alternative answer.
Can anyone help me to find a solution to this problem or say me how can I manipulate a collection with a PropertyGrid
I must say I'm using Framework v2.0 (C#)
thank U
- 11
- ClickOnce and Setup & Deployment Projects problem with launching clickonce application
I have clickonce offline application, called OMS installed on client's machine from a server. It happens only on one machine when the user tries to run OMS. After the initial “Launching Application” message disappears – nothing is happening. Usually OMS splash screen comes up a couple of seconds later…. But not on this machine. There is nothing in the event log and OMS.exe is not in the running processes list of Windows Task Manager.
Thanks, Igor
- 12
- Windows Forms General Resize a selected item in a custom MultiLineListBox
In my custom MultiLineListBox i need to resize dynamically the currently selected item. So when i click on it - it becomes say 20 pixels higher. And the same with deselect - it becomes 20 pixels smaller.
I am using OwnerDrawVariable draw mode in my custom control (it is inherited from ListBox).
I have overridden my own OnDrawItem() method and my own OnMeasureItem(). The problem is that when the select event fires the OnMeasureItem() method is not called, it is only called when the whole control is being redrawn. Does there exist a way to solve this problem
- 13
- 14
- 15
- Windows Forms Data Controls and Databinding Custom DataBinding Hello,
I need of a help with Custom DataBinding I'd created 3 Persistent objects
- CVObject (Business Object Base) - CVObjectCollection (Collection of CVObject) Implements ICollectionBase, IBindingList - CVDataSource (DataSource to my Business Object) Implements IListSource GetList returns a CVObjectCollection
In CVDataSource, I have a method called Append() these method create my CVObject instance and set a flag(isAddNew) to true, calling BeginEdit(), and adding my object in CVObjectCollection.
private CVObjectCollection objectsList;
public void Append() { object obj = Activator.CreateInstance(ObjectType, new object[] {true}); _currentIndex = (objectsList as IList).Add(obj); (obj as IEditableObject).BeginEdit(); }
I have in CVDataSource too the method Save():
public void Save() { CVObject obj = (CVObject)listaObjetos[_currentIndex]; (obj as IEditableObject).EndEdit(); }
The Binding is working perfectly, but I would like of implement a custom save method to my CVObject. Example:
In my forms I have two TextBoxes Control (txtCode, txtDescription) and two Buttons Control (btnNew, btnSave).
private void btnNew_Click(object sender, System.EventArgs e) { this.myDataSource.Append(); }
private void btnSave_Click(object sender, System.EventArgs e) { this.myDataSource.Save(); }
What I wanna to do is following: First: When CVDataSource to call the Append() method, to create a new object and to grant to the TextBoxes new values, as such as, blank values. Second: When CVDataSource to call the Save() method, to save new object updated to BD.
The problem: When I call the Append() method the object, it's added correctly to collection, but the binding controls do not receive the new object. I searched in internet by google and too in msdn library but, I not found some implementation to .NET Framework 1.1 version. I readed about PropertyChanged but, it is only in Framework 2.0, and the others implementations that I found, say to handle a Custom PropertyChanged in each Business Class derived from CVObject, but I dont wanna to do thus. I would like of use the Business Class just to mapping and to centre anything in my Base Object (CVObject), including the Custom PropertyChanged...
Someone can help me
Leo
|
| Author |
Message |
rskorski

|
Posted: Windows Forms General, Windows MessageBox: limit to number of lines? |
Top |
Is there a limit to the number of lines that will show up on a single Message Box that is created from a call to the MessageBox() function If so, what is that limit, and what is the behavior if the limit is exceeded
Windows Forms16
|
| |
|
| |
 |
ahmedilyas

|
Posted: Windows Forms General, Windows MessageBox: limit to number of lines? |
Top |
I think there is no limit until the limit of a string has been reached ... the problem being is the display where the messagebox will go off the screen if you try to fill it with loads of lines. How many lines are you thinking about displaying On a side note, remember MessageBox's are just for user notification purposes :-)
|
| |
|
| |
 |
rskorski

|
Posted: Windows Forms General, Windows MessageBox: limit to number of lines? |
Top |
This question was purely out of curiosity. Thank you for the answer!
|
| |
|
| |
 |
| |
 |
Index ‹ Windows Forms ‹ Windows Forms General |
- Next
- 1
- Windows Forms Data Controls and Databinding ErrorProvider time-delays
Several time-delay properties are exposed for the ToolTip component - AutoPopDelay, InitialDelay, ReshowDelay. These properties are not members of the ErrorProvider class. It seems as though they might be available somehow because the ErrorProvider displays what look like ToolTips, but I can't find the technique. Is there a way
Thanks, Gus
- 2
- Windows Forms General Control textbox, promtly
How I can limit textbox control
So, when I must input decimal number, but, if I make mistake and input text or integer, system must alert me that I can input onli decimals numbers. I know for maskedtextbox. Dou you have another choice.
Please help me and thx.
- 3
- Windows Forms General Format MessageBox Text
Using VS.Net 2003
Yes, haven't upgraded here at home yet, only at work... cost $ :P
But, not sure if this is possible.
A MessageBox:
string message = "Delete " + lblTitle.Text.ToString() + " ";
MessageBox.Show( this, message,.............);
Is if possible to format the lblTitle.Text above
Bold, underline, color, or anything will do.
Thanks,
Zath
- 4
- Windows Forms Data Controls and Databinding Populating Serial No Problem
hi i have a datagrid, and i have binded it to a dataset, i have a column called srno and its autogenerated, it works fine,
the problem is when i enter the data for the first time in a row the srno is 1, after entering the data i navigate to the second row, at that time srno is 2, before entering the data in the 2nd row do some alterations in the first row, after finishing alterations in the 1st row i return back to the 2nd row, and suprisingly the srno is now 3,
need help
thanks
Prasenna
- 5
- Windows Forms General Getting a form to appear only once
Hi All,
I have a windows 'Master frame' in which a number of forms can be instantiated (upon the selection of a menu item, or pressing a button in the master toolbar. All of these can be moved around within the boundaries specified in the master frame.
However, I don't want the user to be able to instantiate two instances of the same form in the frame! (E.g. One form is for "Student Details". If they press the student details button once, the form will appear. If they press it again, another form will appear.) Is there an easy way to do this (say in the properties of the form object) Also, if the form already exists, I would like it to set focus to the existing form.
Thanks heaps
Chris (Moderator: Thread moved to Windows Forms General for better responses)
- 6
- Windows Forms Data Controls and Databinding adding 10,000 rows into a DataGridView takes 10 seconds
I am adding 10,000 rows into a DataGridView with 50 columns, this takes 10 seconds - 6 seconds to add rows and 4 seconds to set initial values. :(
What is interesting - setting 2nd column values takes NO time
SuspendLayout does not help, there is no BeginUpdate method...
Any trick to improve
here is an example of my output:
now only adding rows 11/30/2006 3:56:05 AM now setting 1st value 11/30/2006 3:56:11 AM now setting 2ns value 11/30/2006 3:56:14 AM done! 11/30/2006 3:56:14 AM
here is the code:
int c = 10000;
dataGridView1.SuspendLayout(); Debug.WriteLine("now only adding rows " + DateTime.Now);
for (int i = 0; i < c; i++) { dataGridView1.Rows.Add(); }
Debug.WriteLine("now setting 1st value " + DateTime.Now); for (int i = 0; i < c; i++) { dataGridView1.Rows .Cells[1].Value = "val 1 " + r.Next(); }
Debug.WriteLine("now setting 2ns value " + DateTime.Now); for (int i = 0; i < c; i++) { dataGridView1.Rows .Cells[3].Value = "val 2 " + r.Next(); } dataGridView1.ResumeLayout(); Debug.WriteLine("done! " + DateTime.Now);
- 7
- 8
- Windows Forms Data Controls and Databinding Using OpenfileDialog and combobox controls in Datagridview cell.
Hi,
I want a DataGridView to have 2 columns named Key and Value.Some rows should have the Value column to be a ComboBox and another row to have Value Column as OpenFileDialog and the rest to be textbox.The values in the combo box are predefined and the rows are also predefined. Below is the sample.
Key Value
1. SampleKey1 SampleValue1 (CellStyle:TextBox)
2. SampleKey2 true (CellStyle:ComboBox with items as true,false)
3. SampleKey3 Folder Path (CellStyle: OpenFileDialog)
4. SampleKey4 SampleValue4 (CellStyle: TextBox)
- ---- (CellStyle: TextBox)
- ---- (CellStyle: TextBox)
- --- (CellStyle: TextBox)
Please provide the help on the same.
- 9
- ClickOnce and Setup & Deployment Projects Getting the MSI Package Path from a custom actionHello,
I need to add licensing functionality to a MSI Package. The package should be shipped together with a license file which will be evaluated by a custom action. The problem is that the current directory in the custom action seems to be the system32 folder. Does anybody have an idea how to access the folder where the MSI package actually is situated from the custom action
Thanks in advance Gerald
- 10
- 11
- 12
- Windows Forms General menu item and AddHandler?
Ok, new problem.
I can not find where I did this before.
Dyamically adding menu items:
string sql = "Select * From myTable";
OleDbConnection conn = getDb();
conn.Open();
OleDbCommand myCommand = new OleDbCommand(sql, conn);
OleDbDataReader myReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
while(myReader.Read())
{
mnuView.MenuItems.Add(myReader[0].ToString());
}
myReader.Close();
I need to add a handler to each menu item for a click event.
Check/uncheck and other actions I already have written.
It's like right on the tip of my mind, but just can't see it... must be late.
Thanks,
Zath
- 13
- ClickOnce and Setup & Deployment Projects Dynamically created Registry Keys in .NET InstallerHi,
I have written a Windows Forms Application in Visual Studio 2005 (VC++). I have created a Setup Project in my solution and am configuring it. My application uses registry values, and so I am entering the Registry Keys and Values needed by my app in the deployment Registry Editor within Visual Studio 2005. I use several Values whose data is a filename or path, but that path depends on the selected install folder the user chooses while installing the program (using this Setup program I am creating.) My question is, is it possible to use some sort of variable while specifiying the value for a Registry Value in the Registry Editor And if it is, how do I get the Root Target Folder for the installed application Thanks -
Samy
PS. It occurs to me that I may be doing this all wrong, that maybe I should be using some class in the .NET Framework to dynamically retrieve the root target folder everytime my app runs instead of storing that in the registry, but I could not find any such class (or property or method). The only one I know about can change when an Open/Save FileDialog sets a new path.
- 14
- Windows Forms Data Controls and Databinding menu strip and mdi in vb 2005
hi,
i am using visual basic 2005. i have an mdi parent form and i added a menu strip for that with 2 menus.
forms-form1,form2, form3(sub items)
and reports-report (rpt 1, rpt 2...)
i wrote code to display form 1, form2...when i click on each form.
form1, form2 etc are other forms in the application and i set the window state to maximised for all and ismdichild property to true.
when im running the application when i click on each menu item, the corresponding form is getting diaplayed, but it the menu items are not displayed. i mean the forms are not coming as child forms. i have to close the form1 to see mdi form.
how can i solve it
Binu
- 15
- Windows Forms Data Controls and Databinding combobox cell in DataGridViewHi,
I am using the DataGridView control in one project and have a small problem. I have defined a combobox for one cell, and populate predefined values in it, but how can i get the combox's current listindex without going through all of its values say the combobox is in the cell : DataGridView1(1,2), i couldn't find any property to tell me which index value the combobox is currently showing.
|
|
|