| Focus on the New Instance of Row in the Grid (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| Hello, Somebody help on this. I have my Data Grid, and I want to focus on the last row of the grid cell let say for example I have my New button for my Adding a new record private sub btnNew Click(Byval sender as object, Byval e as System.EventArgs) CurrencyManager.AddNew mygrid.focus ....... ? End Sub then the next code for focusing on the last row of the grid is now my problem How can I focus on... |
|
| Focus Problems with MDI child forms (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi Folks, Sorry if you have seen this post before I've posted it before, but it seems to have gotten lost in Outlook limbo it's visible on the web interface, but not in any news reader I've tried :S A while ago, I came accross this post by Armin describing how to reporduce a focus bug with MDI children. I am currently experiencing the same problem in my application although I'm not using an Active... |
|
| follow up to setting screen display based on individual screen resolution (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| I'm having more difficulty than I expected. When I run this in a form's load event: Dim iwidth As Int32 iwidth SystemInformation.PrimaryMonitorSize.Width me.scale(iwidth / 1280) The controls' text is not changed as you would expect. So the text is truncated in several of the labels and buttons, etc, and the layout of controls is also somewhat bizarre. Any ideas as to how I can solve this? Doing a ... |
|
| Font.Dispose() and ArgumentException (VIP replies) |
| microsoft.public.dotnet.framework.drawing |
| I've got a button on a form with the following click eventhandler: private void button2 Click(object sender, System.EventArgs e) { Font tempFont this.label1.Font; this.label1.Font new Font(this.label1.Font.FontFamily, 8.25F); tempFont.Dispose(); } If this code is executed twice (two clicks on the button) I get an System.ArgumentException in System.Windows.Forms.dll and there is no call stack. I tr... |
|
| For Each Loop with a dataset (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| What is the proper way to refer to a dataset as the collection in a For Each, Next Statement? I want to loop through a particular column in the dataset, I've tried the following with no sucess. For Each x as integer in Dataset1 .... .... .... Next x But the dataset name is not a valid collection type. I appreciate your help, Seasons Greetings |
|
| For Next Loop Quistion (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| Hi all, I'm just learning Visual Basic.Net and i need to create a small loop, but i'm running into troubles. I have a form with a few labels, which in turn need their backgroundcolor changed in yellow. The loop has to run three time in a row, but i need the loop to execute one line of code at a time and then wait for a mouse click. Unfortunately i don't know how to tell Visual Basic to wait for th... |
|
| For vs. For Each (VIP replies) |
| microsoft.public.dotnet.framework |
| Is there a performance difference between this: \\\ Dim i As Integer For i 0 to myObject.Controls.Count 1 myObject.Controls(i) ... Next /// and this: \\\ Dim ctl As Control For Each ctl In myObject.Controls ctl ... Next /// Or is For Each just "prettier"? Thanks, Eric |
|
| For vs. For Each (VIP replies) |
| microsoft.public.dotnet.general |
| Is there a performance difference between this: \\\ Dim i As Integer For i 0 to myObject.Controls.Count 1 myObject.Controls(i) ... Next /// and this: \\\ Dim ctl As Control For Each ctl In myObject.Controls ctl ... Next /// Or is For Each just "prettier"? Thanks, Eric |
|
| For-loop expression? (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| In a for loop, is a calculated expression re calculated on each pass through the loop, or only once, when the loop is initialized? For example, assume the following loop: for (int i 0; i myArray.Length 1; i ) { // code here } Is "myArray.Length 1" calculated once, or on each pass through the loop? Or, to put it another way, is there any advantage to: int n myArray.Length 1; for (int i 0; i n; i ) ... |
|
| Force Download Not Working (VIP replies) |
| microsoft.public.dotnet.framework.aspnet |
| I have a text file that I need web users to get as a "forced download" instead of displaying in the browser. The following Page Load code is not working, what did I miss? private void Page Load(object sender, System.EventArgs e) { string sendText "[empty]"; if ( Session["sendText"] ! null ) { sendText Session["sendText"].ToString(); } ASCIIEncoding asciiEncoding new ASCIIEncoding(); byte[] sendByt... |
|
| Force UpperCase in DataGrid (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| Hi Guys, I wouldnt normally ask for help on this but Im really strapped for time. Does anyone know how I can force characters in a DataGrid cell to uppercase as they are typed. Cheers OHM |
|
| Form Background Image Disappears (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| I am using the following code to get a background image for my form: Private Sub mnuBgroundImage Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuBgroundImage.Click If OpenFileDialog1.ShowDialog() DialogResult.OK Then Dim sr As New System.IO.StreamReader(OpenFileDialog1.FileName) Me.BackgroundImage Image.FromFile(OpenFileDialog1.FileName) sr.Close() End If End Sub This ... |
|
| Form close ('X' button) not working (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I have a form that I dynamically instantiate user controls on. I also dynamically remove use controls. Frequently the application just won't end when I click the close button on the main form. The Close event is being called and I am making sure that I set the focus to a control that is not being removed before I remove any user controls. I thought that had fixed the problem, but it has reappeared... |
|
| Form controls not responding after refresh (VIP replies) |
| microsoft.public.dotnet.framework.compactframework |
| I am trying to show a form from an event handler of another form. As in the following: private void serverSocket OnLoginAccepted(object sender) { formMain new frmMain(); formMain.Show(); formMain.Refresh(); this.Hide(); } 2 questions: 1) If I omit the refresh method, the formMain instance does not show. Why?? 2) Assuming the Refresh() method is required, none of the events of the formMain instance... |
|
| Form from a Main Menu (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| I have a form with a main menu. From that menu, I want to select another form. I have the code behind it, yet when the form appears it's blank. It is not the one I've created. This is the code: Private Sub MenuItem3 Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click Cursor System.Windows.Forms.Cursors.WaitCursor Dim EndItem As New Form EndItem.ShowDialog() Cu... |
|
| Form Gradient with Controls On Top (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I want a form with a LinearGradient, which is easy enough. The troublke I have is that when I place a label on top, the label obscures my fill, even when I set the BackColor of the label to Transparent. Using WinXP and included a Manifest File to use WindowsXP Styles. Is this a know issue? Kevin |
|
| Form hides directly after start (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi. In my program i open another form after I have done some calculations. I have done this manually so far. All works fine. Now I try to open the form automatically, when the calculations are done. When I do so, the form is just visible for a millisecond, and the hides again. All the startup code in the form is executed. I can trace it, and all seem to be fine. But when the procedure that opened ... |
|
| Form Load not firing but form appears? (VIP replies) |
| microsoft.public.dotnet.languages.vb |
| I have an odd issue going on with the calling of my forms. I have an application that has a wizard. The wizard consists of about eight forms that the user makes choices on. Each form has a "Back" and "Next" button. When the user selects the "Next" button the form's user choices are saved to variables and then the form is disposed and the next form called. The problem is that when debugging I put a... |
|
| form load/activated best practices (VIP replies) |
| microsoft.public.dotnet.framework.compactframework |
| I'm new to Pocket PC development and I'm converting an application from eVB to .NET. Something I've noticed is that the author of this application uses the Form's Activated event in ways that I am used to using the Form's Load event (in desktop development). I'm curious if it's typical in Pocket PC development to use the Activated event this way? Thanks! |
|
| Form not closing. (VIP replies) |
| microsoft.public.dotnet.languages.vb.controls |
| I have a project in which there are 2 Forms. Form2 is an intro to Form1 and has a button on it that is coded as follows: Private Sub Button1 Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim frm As New Form1 frm.ShowDialog() 'Show main form Me.Close() 'hide first form End Sub The issue I wish to resolve is that Form2 doesn't close when Form 1 opens, it rem... |
|
| Form position when maximized. (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, I ve got a form which maximum size is 400x500 pixels.This form can be resized and maximized, because I don't want Disable Maximize button and set FormBorderStyle Sizable.At run time if the user sets the window state to maximized, the forms locationis set to 0,0. It's possible to center the form on the screen even if maximized? Thanks in advance. |
|
| form problem (VIP replies) |
| microsoft.public.dotnet.framework.compactframework |
| Hi, Im using a listview on my pocket pc application and this code checks which item was clicked: Private Sub MainList SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainList.SelectedIndexChanged Dim i As Integer For i 0 To ViewList.Items.Count 1 If MainList.Items.Item(i).Selected Then dim sth as new form2(i) sth.show Exit For End If Next End Sub When the s... |
|
| Form Resize doesn't fire in C# (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I have worked on VB .NEt ,I am new to C#.,I have a form name Form1.cs,when I use the below code for resize the below line of doesn't get executed at any point of time.Is the syntax wirte. private void Form1 Resize(object sender, System.EventArgs e) { MessageBox("Resize"); } thanks for your help |
|
| form size height maximum - 1036 ? (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| The system is not letting me increase the size (height) of the form (in the properties window). It lets me reduce the height, but it will not let me set it over 1036. I need to set the form size to about 856 x 1100. (The details on the form are intended to be printed out on A4 paper). (I'm wondering if 1036 is the usual height that is used, and that I'm having problems because I'm trying to print ... |
|
| Form submitted (VIP replies) |
| microsoft.public.dotnet.framework.aspnet |
| Hi all. I'm like really on the beginning stage for ASP.NET just got a few questions to ask... Please help me. I've created a form page called "join.aspx" and it has lots of codes but the important part needed to be focused on is the following lines. asp:textbox id "firstname" runat "server" / and the form tag says form id "Form1" method "get" runat "server" action "result.aspx" Also, i have a butt... |
|