That would be great. I'd like to brush up on my normal forms... I don't know which is which anymore...
bigbrownbeaver
Posts
-
DB Normalisation. -
DataGridView and Combo Boxes (my brain hurts)From MSDN: "Unlike the ComboBox control, the DataGridViewComboBoxCell does not have SelectedIndex and SelectedValue properties. Instead, selecting a value from a drop-down list sets the cell Value property." I am not sure what will happen when you set the value, although I will assume that it will change the selection. You can then read the Value property to get the value back. There is a way you can make your own selected index property by comparing each item to the Value property and returning the index when the objects match. Hope this helps.
-
Bonus points to anyone that can figure this one out.I don't understand .Net memory management myself... I seriously think a
delete
operator wouldnt hurt. Why is there anew
and nodelete
? I don't blame this guy for making mistakes, at least his code is well formatted. I work on VB code that looks like it was written by monkies in a scientific experiment. -
DataBindingComplete firing on form Visibility changeI just looked there, and I found what is causing it, but I still don't know why... It's the ShowInTaskbar property thats causing this to happen. What puzzles me the most is probably that the property is only changed once, but it triggers the DataBindingComplete event 7 times. I have commented out that line until I have some free time figure out what exactly is casuing it, for now people are just going to have to live with the application in their system tray. Thanks for the help mike.
-
DataBindingComplete firing on form Visibility changeI have a DataGridView that runs hidden in the system tray, and when I unhide it the DataBindingComplete event fires anywhere between 3 and 8 times for the datagridview on the form, drastically slowing down the application. Is there something wrong with the databinding event? MSDN states that changes in the datasource will cause this event to fire. Why is changing the visibility firing it? This is the code for the system tray double click event.
Private Sub sysTray_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles sysTray.MouseDoubleClick
Me.Visible = Not Me.Visible
Me.ShowInTaskbar = Me.Visible
Me.WindowState = FormWindowState.Normal
End SubAnd here is the code in the databindingcomplete event:
Private Sub dgErrors_DataBindingComplete(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewBindingCompleteEventArgs) Handles dgErrors.DataBindingComplete
Debug.WriteLine("Fired event: dgErrors_DataBindingComplete: by " + CType(sender, Control).Name + " event Type: " + e.ListChangedType.ToString())
End SubThe code produces the following output when double clicking on the system tray icon:
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: Reset
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: Reset
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: Reset
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: Reset
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: Reset
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: Reset
Fired event: dgErrors_DataBindingComplete: by dgErrors event Type: ResetI dont understand why it is firing 7 times. In fact I don't understand why it is firing at all. I need another event for the datagrid that fires only once, or I need to fix what is happening here somehow, any suggestions? Thanx in advance for answers
-
Trimming off a little too much?I wish I knew what this guy was thinking.
ddl_Operator.DataTextField = ("description").Trim
-
What does it do?Private Sub donothing(param as Object) End Sub
-
New basic syntaxApparently it was stripped out when I posted it. Double wammy
-
New basic syntaxdisable reader(1) return gosub printMainMenu ' disable reader(1) return I found this little pretty in a basic program im writing. the indentation indicates my genius.
-
cross thread..? How to populated a textbox with serial input?IWow that helps me alot... I have been having trouble with my GUI hanging... Thanx!!!
-
Cant close serial port in windows form applicationThe problem is when I close the port my program hangs. When I close the serial port, or the form, my program throws an exception, after hanging for a while. Basically it hangs whenever I call SerialPort.Close(); Help would be greatly appreciated :)
-
cross thread..? How to populated a textbox with serial input?IThis should fix your problem...
public Form1() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; }
-
DreamingId build a robot that brings beer, food, lights my cigars, wipes my ass and cracks jokes about everyones mothers... and he has to look like R2D2
-
CheckedChanged not firing in UpdatePanelThanks alot, that worked fine... Its odd I forgot completely that i had set it to conditional about two weeks ago, and that was causing the problem.
-
CheckedChanged not firing in UpdatePanelI have a serious problem with updatepanel and checkedchanged event. When the checkbox is in the updatepanel the checkedchanged event never fires when i step through my code, even though auto postback is enabled. Is there a little trick to this that I'm missing?
-
how to get values from the database to a dropdown list [modified]Which database? Which language? Use an OleDbConnection and a command object to perform a sql query and then as you loop through your results populate the list. You can find documentation on this in the MSDN.
-
Programmed Developers to Enrage UsWhen the cache gets NULL the DB goes to the bank to get more?
-
What sort of best practices coding do you use?Brilliant idea... but Some things are more subjective than others, best practices for you might not be best practices for someone else, I know my code is noobish, but finding your own rule set for programming is important, then sticking to it. I fear that a CodeReview forum would just become a R18 flaming forum, and no conclusions will really be reached. for (int iq = 0;iq > -1;iq++);